blob: fe8f5b479dcf0c34e8e088f893c4da654d3ed9cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# 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
|