aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile.nt
blob: 52bdb9888560df3e3e0f1fd8ddd6edef70b1ce5f (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
# ----------------------- NT -----------------------

.PHONY: clean cleaner all zexy

LIBNAME=zexy

current: $(LIBNAME)

PREFIX=C:\Programme\pd

EXT=dll
CC=cl
LD=link

DEFS=/D__WIN32__ /DPD /DZEXY_LIBRARY
IFLAGS=/I. /I$(PREFIX)\src
WFLAGS=/W3 /WX /nologo

## for LinePrinter-support: (if you don't want it, comment it out)
DEFS += /DZ_WANT_LPT

.SUFFIXES: .$(EXT)

SOURCES=$(sort $(filter %.c, $(wildcard *.c)))

CFLAGS = /O2 $(DEFS) $(IFLAGS) $(WFLAGS)
LIBS = libc.lib oldnames.lib kernel32.lib pd.lib
LFLAGS = /dll /export:$(LIBNAME)_setup /LIBPATH:"$(PREFIX)\bin"


TARGETS = $(SOURCES:.c=.obj)


$(TARGETS): %.obj : %.c
	$(CC) $(CFLAGS) /c $*.c


$(LIBNAME): $(TARGETS)
	$(LD) $(LFLAGS) /out:$(LIBNAME).$(EXT) *.obj $(LIBS)

clean:
	del /f *.obj $(LIBNAME).$(EXT)

cleaner: clean
	del /f *~ _* config.* $(LIBNAME).$(EXT)