aboutsummaryrefslogtreecommitdiff
path: root/videogrid/Makefile.in
blob: b87873afae318c90a161daae4f567f5897b6586e (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
56
NAME = videogrid
VERSION = @VIDEOGRID_VERSION@

PD_DIR = @PD_DIR@
GEM_DIR = @GEM_DIR@

FF_CFLAGS = @FF_PACKAGE_CFLAGS@
FF_LIBS   = @FF_PACKAGE_LIBS@

LIBS = @LIBS@
CFLAGS = @CFLAGS@

# choose target by OS
UNAME := $(shell uname)
ifeq ($(UNAME), Linux)
TARGET=pd_linux
else
TARGET=pd_darwin
#FF_CFLAGS=-I/sw/include ??
#PD_DIR=/Applications/Pd-extended.app/Contents/Resources/include ??
endif


current: $(TARGET)

# ----------------------- LINUX -----------------------

pd_linux: $(NAME).pd_linux

.SUFFIXES: .pd_linux

.cc.pd_linux:
	g++ $(FF_CFLAGS) $(CFLAGS) -I$(PD_DIR)/src -I$(GEM_DIR)/src -fPIC -c -O -o videogrid.o videogrid.cc
	g++ $(FF_CFLAGS) $(CFLAGS) -Wl --export-dynamic  -shared -o videogrid.pd_linux videogrid.o $(FF_LIBS) $(LIBS)
	rm -f $*.o 

# ----------------------------------------------------------

# ----------------------- LINUX -----------------------

pd_darwin: $(NAME).pd_darwin

.SUFFIXES: .pd_darwin

.cc.pd_darwin:
	g++ $(FF_CFLAGS) -I$(PD_DIR)/src -I$(GEM_DIR)/src -fPIC -c -O -o videogrid.o videogrid.cc
	g++ $(FF_CFLAGS) $(CFLAGS) -Wl -bundle -undefined dynamic_lookup -o videogrid.pd_darwin videogrid.o $(FF_LIBS) $(LIBS)
	rm -f $*.o 

# ----------------------------------------------------------

install:
	cp *-help.pd $(PD_DIR)/doc/5.reference

clean:
	rm -f *.o *.pd_* so_locations