# Makefile for gawk extensions Mar 2003 # - for GNU C (mingw32) [Windows32 executable for Windows 9x/NT] # - for Microsoft C 7 [16bit ececutable for DOS] # see README.pc for comments #------------------------------------------------------------------------ # Some makes do not define MAKE (and ndmake does not allow a define). # Define MAK to be your make command. #MAKE = dmake MAK = $(MAKE) $(MAKEFILE) #MAK = $(MAKE) #MAKEFILE = -f Makefile #MAK = make45 $(MAKEFILE) VCCFLAGS=-nologo -O2 -DWIN32 -DWIN32_EXTENSION -D__STDC__=0 -DGAWK -I.. -DHAVE_CONFIG_H -DDYNAMIC VCLDFLAGS=-LD ../gawk.lib VCCC=cl -nologo MWCFLAGS=-O -shared -DWIN32 -DWIN32_EXTENSION -DGAWK -I.. -DHAVE_CONFIG_H -DDYNAMIC MWLDFLAGS=-s -Wl,--enable-stdcall-fixup -L.. -lgawk MWCC=gcc # this DEFFILE will work provided the exported function is always called # dlload DEFFILE=pcext.def default: @echo "Enter $(MAK) target " @echo " where 'target' is chosen from " @echo " mingw32 . Windows32 exe [Mingw32 GNU C] " @echo " vcWin32 . Windows32 exe [Microsoft Visual C] " .SUFFIXES: .c .dll .c.dll: $(CC) $(CFLAGS) $< -o$@ $(LDFLAGS) $(DEFFILE) # dl.c, fork.c, and filefuncs.c don't compile cleanly... all : readfile.dll ordchr.dll arrayparm.dll vcWin32: $(MAK) CFLAGS="$(VCCFLAGS)" LDFLAGS="$(VCLDFLAGS)" CC="$(VCCC)" all mingw32: $(MAK) CFLAGS="$(MWCFLAGS)" LDFLAGS="$(MWLDFLAGS)" CC="$(MWCC)" all clean: -rm *.dll -rm *.o -rm *.obj -rm *.lib