aboutsummaryrefslogtreecommitdiff
path: root/gem2pdp/Makefile.in
blob: a16e25d507944f6427f0d28ddd1053f5b8898c8b (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
PD_DIR = @PD_DIR@
PDP_DIR = @PDP_DIR@
GEM_DIR = @GEM_DIR@

LIBS = @LIBS@
GEM2PDP_VERSION = @GEM2PDP_VERSION@

GEM2PDP_DISTRO = /mnt/c/ydegoyon.free.fr/gem2pdp-$(GEM2PDP_VERSION)
GEM2PDP_TARBALL = $(GEM2PDP_DISTRO).tar.gz
# build flags

GEM2PDP_INCLUDE =  -I$(PD_DIR)/src -I. -I$(PDP_DIR)/include  -I$(GEM_DIR)/src 
GEM2PDP_CPPFLAGS  = -DPD -O2 -funroll-loops -fomit-frame-pointer  -ffast-math \
    -Wall -W -Wno-unused -Wno-parentheses -Wno-switch \
    -DGEM2PDP_VERSION=\"$(GEM2PDP_VERSION)\" -g
PDP_PIDIP_CPPFLAGS  = -O

all: gem2pdp.pd_linux pdp2gem.pd_linux

pdp2gem.pd_linux: pdp2gem.o yuv.o
	rm -f pdp2gem.pd_linux
	gcc -export_dynamic -shared -o pdp2gem.pd_linux pdp2gem.o yuv.o $(LIBS)

gem2pdp.pd_linux: gem2pdp.o yuv.o
	rm -f gem2pdp.pd_linux
	gcc -export_dynamic -shared -o gem2pdp.pd_linux gem2pdp.o yuv.o $(LIBS)

clean:
	rm -f *.o
	rm -f gem2pdp.pd_linux
	rm -f pdp2gem.pd_linux

distro: clean all
	rm *.o
	strip --strip-unneeded gem2pdp.pd_linux
	cd .. && cp -rf gem2pdp /tmp/gem2pdp-$(GEM2PDP_VERSION)
	cd /tmp && tar vczf $(GEM2PDP_TARBALL) gem2pdp-$(GEM2PDP_VERSION)
	cp /mnt/c/ydegoyon.free.fr/gem2pdp-$(GEM2PDP_VERSION).tar.gz /mnt/c/Yves
	rm -rf /tmp/gem2pdp-$(GEM2PDP_VERSION)

.cpp.o:
	cat $(PDP_DIR)/include/pdp.h | grep -v m_pd > pdp-light.h
	g++ $(GEM2PDP_CPPFLAGS) $(GEM2PDP_INCLUDE) -o $*.o -c $*.cpp

.c.o:
	cat $(PDP_DIR)/include/pdp.h | grep -v m_pd > pdp-light.h
	gcc $(GEM2PDP_CPPFLAGS) $(GEM2PDP_INCLUDE) -o $*.o -c $*.c