aboutsummaryrefslogtreecommitdiff
path: root/externals/build/win/makefile
blob: c9289591f2d567e906e1dfd79cd17db381c56704 (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

# Adapt the PDPATH if your pd is not installed in the standard place

PDPATH="$(PROGRAMFILES)/pd"




EXTERNALS = $(shell ls ../src)

all:
	make -k externals

externals: $(EXTERNALS:.c=.dll)

.SUFFIXES: .dll

DEFINES = -DPD -DNT 
CFLAGS = -Wall -W -Wshadow -Wstrict-prototypes \
    -Wno-unused -Wno-parentheses -Wno-switch

INCLUDE = -I. -I.. -I$(PDPATH)/src


%.dll: ../src/%.c
	$(CC) -mms-bitfields $(CFLAGS) $(DEFINES) $(INCLUDE) -o "$*.o" -c "../src/$*.c"
	gcc -shared -o "$*.dll" "$*.o" $(PDPATH)/bin/pd.dll \
		`test -f $*.libs && cat $*.libs` `test -f ../src/$*.libs && cat ../src/$*.libs` 

clean:
	-rm *.a *.def *.dll *.o

install-doc:
	@test -d $(PDPATH)/doc/5.reference || mkdir -p $(PDPATH)/doc/5.reference
	cd ../doc && make all
	cp -r ../doc/* $(PDPATH)/doc/5.reference

install: install-doc
	@test -d $(PDPATH)/extra || mkdir -p $(PDPATH)/extra
	install *.dll $(PDPATH)/extra