home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / PROG_C / GAWKNT.ZIP / SRC.ZIP / GAWK.MAK < prev    next >
Makefile  |  1994-03-07  |  2KB  |  68 lines

  1. # Makefile for gawk (GNU awk) using Microsoft C
  2. #
  3. # This makefile is designed to work within the limits of the DOS
  4. # command-line length. OS/2 users can use Makefile.os2, which
  5. # has additional targets.
  6. #
  7.  
  8. DEFS = -D_MSC_VER
  9.  
  10.  
  11. #DEBUG = -W3 -Zi -Od
  12. DEBUG=
  13.  
  14. # MODEL = L
  15. # MODEL not used for NT
  16. CC=cl -nologo 
  17. O=.obj
  18.  
  19. # Disable MSC extensions with -Za so that __STDC__ is defined for MSC 6.00A
  20. # MSC 5.1 defines __STDC__=0 regardless of the ANSI flag
  21. # CFLAGS = -Za $(DEFS) $(DEBUG)
  22. CFLAGS = $(DEFS) $(DEBUG)
  23.  
  24. #LIBS = /NOD:$(MODEL)libce $(MODEL)libcer.lib
  25. LIBS =
  26.  
  27. OBJ2=getid$O popen$O
  28.  
  29. AWKOBJS = main$O eval$O builtin$O msg$O iop$O io$O field$O array$O \
  30.     node$O version$O missing$O re$O
  31. ALLOBJS = $(AWKOBJS) awktab$O
  32. GNUOBJS= getopt$O getopt1$O regex$O dfa$O
  33.  
  34. .SUFFIXES: $O .c .y
  35.  
  36. .c$O:
  37.     $(CC) $(CFLAGS) -DGAWK -DHAVE_CONFIG_H -c $<
  38.  
  39. all: gawk.exe
  40.  
  41. gawk.exe: $(ALLOBJS) $(GNUOBJS) $(OBJ2)
  42.     link array.obj awktab.obj builtin.obj dfa.obj eval.obj field.obj \
  43.         getid.obj getopt.obj getopt1.obj io.obj iop.obj main.obj missing.obj \
  44.         msg.obj node.obj popen.obj re.obj version.obj regex.obj setargv.obj  /out:gawk.exe
  45. # link @names3.lnk, $@,,$(LIBS) /NOE /st:30000;
  46.  
  47.  
  48. $(AWKOBJS): awk.h config.h
  49. dfa$O:    awk.h config.h dfa.h
  50. regex$O: awk.h config.h regex.h
  51. main$O: patchlevel.h
  52.  
  53. # A bug in ndmake requires the following rule
  54. awktab$O: awk.h awktab.c
  55.     $(CC) $(CFLAGS) -DGAWK -c awktab.c
  56.  
  57. awktab.c: awk.y
  58.     bison -o $@ awk.y
  59.  
  60. clean:
  61.     rm -f *.o *.obj core awk.output gmon.out make.out y.output
  62.  
  63. .PHONY: test
  64. test:
  65.     @echo Both dmake and GNU make require modifications to test/Makefile,
  66.     @echo but here we go...
  67.     cd test && $(MAKE) -k
  68.