home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / gawk-2.15.6-base.tgz / gawk-2.15.6-base.tar / fsf / gawk / pc / Makefile.msc < prev    next >
Makefile  |  1993-12-19  |  1KB  |  69 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. # For MSC 5.1
  11. #DEFS = -D_MSC_VER=510
  12.  
  13. # MSC 6.00A has _MSC_VER predefined
  14. #DEFS =
  15.  
  16.  
  17. #DEBUG = -W3 -Zi -Od
  18. DEBUG=
  19.  
  20. MODEL = L
  21. CC=cl -nologo -A$(MODEL)
  22. O=.obj
  23.  
  24. # Disable MSC extensions with -Za so that __STDC__ is defined for MSC 6.00A
  25. # MSC 5.1 defines __STDC__=0 regardless of the ANSI flag
  26. CFLAGS = -Za $(DEFS) $(DEBUG)
  27.  
  28. #LIBS = /NOD:$(MODEL)libce $(MODEL)libcer.lib
  29. LIBS =
  30.  
  31. OBJ2=getid$O popen$O
  32.  
  33. AWKOBJS = main$O eval$O builtin$O msg$O iop$O io$O field$O array$O \
  34.     node$O version$O missing$O re$O
  35. ALLOBJS = $(AWKOBJS) awktab$O
  36. GNUOBJS= getopt$O getopt1$O regex$O dfa$O
  37.  
  38. .SUFFIXES: $O .c .y
  39.  
  40. .c$O:
  41.     $(CC) $(CFLAGS) -DGAWK -DHAVE_CONFIG_H -c $<
  42.  
  43. all: gawk.exe
  44.  
  45. gawk.exe: $(ALLOBJS) $(GNUOBJS) $(OBJ2)
  46.     link @names.lnk, $@,,$(LIBS) /NOE /st:30000;
  47.  
  48.  
  49. $(AWKOBJS): awk.h config.h
  50. dfa$O:    awk.h config.h dfa.h
  51. regex$O: awk.h config.h regex.h
  52. main$O: patchlev.h
  53.  
  54. # A bug in ndmake requires the following rule
  55. awktab$O: awk.h awktab.c
  56.     $(CC) $(CFLAGS) -DGAWK -c awktab.c
  57.  
  58. awktab.c: awk.y
  59.     bison -o $@ awk.y
  60.  
  61. clean:
  62.     rm -f *.o *.obj core awk.output gmon.out make.out y.output
  63.  
  64. .PHONY: test
  65. test:
  66.     @echo Both dmake and GNU make require modifications to test/Makefile,
  67.     @echo but here we go...
  68.     cd test && $(MAKE) -k
  69.