1# $MawkId: vs6.mak,v 1.3 2012/10/27 10:55:58 tom Exp $ 2# Microsoft C makefile for mawk, 3# 4# Tested with Microsoft Visual Studio 6 using nmake. 5############################################################################### 6# copyright 2010,2012 Thomas E. Dickey 7# 8# This is a source file for mawk, an implementation of 9# the AWK programming language. 10# 11# Mawk is distributed without warranty under the terms of 12# the GNU General Public License, version 2, 1991. 13############################################################################### 14 15!include <ntwin32.mak> 16 17#======================================================================== 18 19CFLAGS = -I. -DLOCAL_REGEXP $(cflags) 20 21.c.obj: 22 $(CC) $(CFLAGS) -c $< 23 24OBJ1 = parse.obj array.obj bi_funct.obj bi_vars.obj cast.obj code.obj \ 25 da.obj error.obj execute.obj fcall.obj 26 27OBJ2 = field.obj files.obj fin.obj hash.obj jmp.obj init.obj \ 28 kw.obj main.obj matherr.obj 29 30OBJ3 = memory.obj print.obj re_cmpl.obj scan.obj scancode.obj split.obj \ 31 zmalloc.obj version.obj regexp.obj dosexec.obj 32 33MAWK_OBJ = $(OBJ1) $(OBJ2) $(OBJ3) 34 35mawk.exe : $(MAWK_OBJ) 36 $(link) $(LDFLAGS) $(MAWK_OBJ) $(LIBS) -out:mawk.exe -map:mawk.map 37 38config.h : msdos/vs6.h 39 copy msdos\vs6.h config.h 40 41dosexec.c : msdos/dosexec.c 42 copy msdos\dosexec.c dosexec.c 43 44mawk_test : mawk.exe # test that we have a sane mawk 45 @echo you may have to run the test manually 46 cd test && mawktest.bat 47 48fpe_test : mawk.exe # test FPEs are handled OK 49 @echo testing floating point exception handling 50 @echo you may have to run the test manually 51 cd test && fpe_test.bat 52 53check : mawk_test fpe_test 54 55################################################### 56# FIXME 57# parse.c is provided 58# so you don't need to make it. 59# 60# But if you do: here's how: 61# To make it with byacc 62# YACC=byacc 63# parse.c : parse.y 64# $(YACC) -d parse.y 65# rename y_tab.h parse.h 66# rename y_tab.c parse.c 67######################################## 68 69scancode.c : makescan.c scan.h 70 $(CC) -o makescan.exe makescan.c 71 makescan.exe > scancode.c 72 del makescan.exe 73 74clean : 75 -del *.bak 76 -del *.exe 77 -del *.ilk 78 -del *.map 79 -del *.pdb 80 -del *.obj 81 82distclean : clean 83 -del dosexec.c 84 -del scancode.c 85 -del config.h 86 87# dependencies of .objs on .h 88array.obj : array.h bi_vars.h config.h field.h mawk.h memory.h nstd.h sizes.h symtype.h types.h zmalloc.h 89bi_funct.obj : array.h bi_funct.h bi_vars.h config.h field.h files.h fin.h init.h mawk.h memory.h nstd.h regexp.h repl.h sizes.h symtype.h types.h zmalloc.h 90bi_vars.obj : array.h bi_vars.h config.h field.h init.h mawk.h memory.h nstd.h sizes.h symtype.h types.h zmalloc.h 91cast.obj : array.h config.h field.h mawk.h memory.h nstd.h parse.h repl.h scan.h scancode.h sizes.h symtype.h types.h zmalloc.h 92code.obj : array.h code.h config.h field.h init.h jmp.h mawk.h memory.h nstd.h sizes.h symtype.h types.h zmalloc.h 93da.obj : array.h bi_funct.h code.h config.h field.h mawk.h memory.h nstd.h repl.h sizes.h symtype.h types.h zmalloc.h 94error.obj : array.h bi_vars.h config.h mawk.h nstd.h parse.h scan.h scancode.h sizes.h symtype.h types.h 95execute.obj : array.h bi_funct.h bi_vars.h code.h config.h field.h fin.h mawk.h memory.h nstd.h regexp.h repl.h sizes.h symtype.h types.h zmalloc.h 96fcall.obj : array.h code.h config.h mawk.h memory.h nstd.h sizes.h symtype.h types.h zmalloc.h 97field.obj : array.h bi_vars.h config.h field.h init.h mawk.h memory.h nstd.h parse.h regexp.h repl.h scan.h scancode.h sizes.h symtype.h types.h zmalloc.h 98files.obj : array.h config.h files.h fin.h init.h mawk.h memory.h nstd.h sizes.h symtype.h types.h zmalloc.h 99fin.obj : array.h bi_vars.h config.h field.h fin.h mawk.h memory.h nstd.h parse.h scan.h scancode.h sizes.h symtype.h types.h zmalloc.h 100hash.obj : array.h config.h mawk.h memory.h nstd.h sizes.h symtype.h types.h zmalloc.h 101init.obj : array.h bi_vars.h code.h config.h field.h init.h mawk.h memory.h nstd.h sizes.h symtype.h types.h zmalloc.h 102jmp.obj : array.h code.h config.h init.h jmp.h mawk.h memory.h nstd.h sizes.h symtype.h types.h zmalloc.h 103kw.obj : array.h config.h init.h mawk.h nstd.h parse.h sizes.h symtype.h types.h 104main.obj : array.h code.h config.h files.h init.h mawk.h memory.h nstd.h sizes.h symtype.h types.h zmalloc.h 105makescan.obj : config.h nstd.h scancode.h 106matherr.obj : array.h config.h init.h mawk.h nstd.h sizes.h symtype.h types.h 107memory.obj : config.h mawk.h memory.h nstd.h sizes.h types.h zmalloc.h 108parse.obj : array.h bi_funct.h bi_vars.h code.h config.h field.h files.h jmp.h mawk.h memory.h nstd.h sizes.h symtype.h types.h zmalloc.h 109print.obj : array.h bi_funct.h bi_vars.h config.h field.h files.h mawk.h memory.h nstd.h parse.h scan.h scancode.h sizes.h symtype.h types.h zmalloc.h 110re_cmpl.obj : array.h config.h mawk.h memory.h nstd.h parse.h regexp.h repl.h scan.h scancode.h sizes.h symtype.h types.h zmalloc.h 111scan.obj : array.h code.h config.h field.h files.h fin.h init.h mawk.h memory.h nstd.h parse.h repl.h scan.h scancode.h sizes.h symtype.h types.h zmalloc.h 112split.obj : array.h bi_funct.h bi_vars.h config.h field.h mawk.h memory.h nstd.h parse.h regexp.h repl.h scan.h scancode.h sizes.h symtype.h types.h zmalloc.h 113version.obj : array.h config.h init.h mawk.h nstd.h patchlev.h sizes.h symtype.h types.h 114zmalloc.obj : config.h mawk.h nstd.h sizes.h types.h zmalloc.h 115regexp.obj : rexpdb.c rexp4.c rexp2.c regexp_system.c sizes.h mawk.h rexp0.c rexp1.c config.h rexp.h regexp.h nstd.h rexp3.c rexp.c field.h 116