1 # Microsoft C makefile for mawk,
2 # an implementation of The AWK Programming Language, 1988.
4 # Tested with Microsoft C vers 6 and 7, using the following make utils:
5 # dmake-3.8, GNUish make, Kneller's Ndmake, and Microsoft's nmake
7 #========================== Configuration ===============================
10 # -Gs remove stack probes, -G2 requires 286-or-better
11 # -O,-Ot optimize for time, -Os optimize for size
12 # MSDOS and _MSC_VER are predefined.
15 CFLAGS = -AL -O $(DEFS)
19 # Link and bind for DOS-only programs
23 # Link and bind for bound OS/2 and DOS programs
25 LF2=$(MSCLIB)p,mawk.def
29 #========================================================================
35 OBJ1 = parse.obj array.obj bi_funct.obj bi_vars.obj cast.obj code.obj \
36 da.obj error.obj execute.obj fcall.obj
38 OBJ2 = field.obj files.obj fin.obj hash.obj jmp.obj init.obj \
39 kw.obj main.obj matherr.obj
41 OBJ3 = memory.obj print.obj re_cmpl.obj scan.obj scancode.obj split.obj \
42 zmalloc.obj version.obj dosexec.obj
44 OBJ = $(OBJ1) $(OBJ2) $(OBJ3)
46 REXP_OBJ = rexp.obj rexp0.obj rexp1.obj rexp2.obj rexp3.obj rexpdb.obj
50 mawk.exe : $(OBJ) $(REXP_OBJ) $(RSP)
51 link @$(RSP) setargv.obj/NOE,$@,,/NOD:llibce $(LF2)/STACK:$(STACK);
54 $(RSP) : $(OBJ) $(REXP_OBJ)
58 echo $(REXP_OBJ)+ >> $@
60 RFLAGS=-I. -Irexp -DMAWK
62 rexp.obj : rexp/rexp.c rexp/rexp.h
63 $(CC) $(CFLAGS) $(RFLAGS) -c rexp/rexp.c
65 rexp0.obj : rexp/rexp0.c rexp/rexp.h
66 $(CC) $(CFLAGS) $(RFLAGS) -c rexp/rexp0.c
68 rexp1.obj : rexp/rexp1.c rexp/rexp.h
69 $(CC) $(CFLAGS) $(RFLAGS) -c rexp/rexp1.c
71 rexp2.obj : rexp/rexp2.c rexp/rexp.h
72 $(CC) $(CFLAGS) $(RFLAGS) -c rexp/rexp2.c
74 rexp3.obj : rexp/rexp3.c rexp/rexp.h
75 $(CC) $(CFLAGS) $(RFLAGS) -c rexp/rexp3.c
77 rexpdb.obj : rexp/rexpdb.c rexp/rexp.h
78 $(CC) $(CFLAGS) $(RFLAGS) -c rexp/rexpdb.c
80 config.h : msdos/msc.h
81 copy msdos\msc.h config.h
84 dosexec.c : msdos/dosexec.c
85 copy msdos\dosexec.c dosexec.c
87 test : mawk.exe # test that we have a sane mawk
88 @echo you may have to run the test manually
89 cd test && mawktest.bat
91 fpe_test : mawk.exe # test FPEs are handled OK
92 @echo testing floating point exception handling
93 @echo you may have to run the test manually
94 cd test && fpe_test.bat
96 ###################################################
98 # so you don't need to make it.
100 # But if you do: here's how:
101 # To make it with bison under msdos
105 # rename y_tab.h parse.h
106 # rename y_tab.c parse.c
107 ########################################
109 #scancode.c : makescan.c scan.h
110 # $(CC) -o makescan.exe makescan.c
111 # makescan.exe > scancode.c
119 del config.h dosexec.c
123 # dependencies of .objs on .h
124 array.obj : config.h field.h bi_vars.h mawk.h symtype.h nstd.h memory.h zmalloc.h types.h sizes.h
125 bi_funct.obj : config.h field.h bi_vars.h mawk.h init.h regexp.h symtype.h nstd.h repl.h memory.h bi_funct.h files.h zmalloc.h fin.h types.h sizes.h
126 bi_vars.obj : config.h field.h bi_vars.h mawk.h init.h symtype.h nstd.h memory.h zmalloc.h types.h sizes.h
127 cast.obj : config.h field.h mawk.h parse.h symtype.h nstd.h memory.h repl.h scan.h zmalloc.h types.h sizes.h
128 code.obj : config.h field.h code.h mawk.h init.h symtype.h nstd.h memory.h jmp.h zmalloc.h types.h sizes.h
129 da.obj : config.h field.h code.h mawk.h symtype.h nstd.h memory.h repl.h bi_funct.h zmalloc.h types.h sizes.h
130 error.obj : config.h bi_vars.h mawk.h parse.h vargs.h symtype.h nstd.h scan.h types.h sizes.h
131 execute.obj : config.h field.h bi_vars.h code.h mawk.h regexp.h symtype.h nstd.h memory.h repl.h bi_funct.h zmalloc.h types.h fin.h sizes.h
132 fcall.obj : config.h code.h mawk.h symtype.h nstd.h memory.h zmalloc.h types.h sizes.h
133 field.obj : config.h field.h bi_vars.h mawk.h init.h parse.h regexp.h symtype.h nstd.h memory.h repl.h scan.h zmalloc.h types.h sizes.h
134 files.obj : config.h mawk.h nstd.h memory.h files.h zmalloc.h types.h fin.h sizes.h
135 fin.obj : config.h field.h bi_vars.h mawk.h parse.h symtype.h nstd.h memory.h scan.h zmalloc.h types.h fin.h sizes.h
136 hash.obj : config.h mawk.h symtype.h nstd.h memory.h zmalloc.h types.h sizes.h
137 init.obj : config.h field.h bi_vars.h code.h mawk.h init.h symtype.h nstd.h memory.h zmalloc.h types.h sizes.h
138 jmp.obj : config.h code.h mawk.h init.h symtype.h nstd.h memory.h jmp.h zmalloc.h types.h sizes.h
139 kw.obj : config.h mawk.h init.h parse.h symtype.h nstd.h types.h sizes.h
140 main.obj : config.h field.h bi_vars.h code.h mawk.h init.h symtype.h nstd.h memory.h files.h zmalloc.h types.h fin.h sizes.h
141 makescan.obj : parse.h symtype.h scan.h
142 matherr.obj : config.h mawk.h nstd.h types.h sizes.h
143 memory.obj : config.h mawk.h nstd.h memory.h zmalloc.h types.h sizes.h
144 parse.obj : config.h field.h bi_vars.h code.h mawk.h symtype.h nstd.h memory.h bi_funct.h files.h zmalloc.h jmp.h types.h sizes.h
145 print.obj : config.h field.h bi_vars.h mawk.h parse.h symtype.h nstd.h memory.h scan.h bi_funct.h files.h zmalloc.h types.h sizes.h
146 re_cmpl.obj : config.h mawk.h parse.h regexp.h symtype.h nstd.h memory.h repl.h scan.h zmalloc.h types.h sizes.h
147 scan.obj : config.h field.h code.h mawk.h init.h parse.h symtype.h nstd.h memory.h repl.h scan.h files.h zmalloc.h types.h fin.h sizes.h
148 split.obj : config.h field.h bi_vars.h mawk.h parse.h regexp.h symtype.h nstd.h memory.h scan.h bi_funct.h zmalloc.h types.h sizes.h
149 version.obj : config.h mawk.h patchlev.h nstd.h types.h sizes.h
150 zmalloc.obj : config.h mawk.h nstd.h zmalloc.h types.h sizes.h