File: Makefile

package info (click to toggle)
caps 0.9.26-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 924 kB
  • sloc: cpp: 10,867; ansic: 1,324; makefile: 78; python: 38
file content (100 lines) | stat: -rw-r--r-- 2,498 bytes parent folder | download
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
VERSION = 0.9.26

PREFIX = /usr
DESTDIR = 

CC = g++

OPTS = -O3 -ffast-math -funroll-loops -Wall -fPIC -DPIC 
#OPTS = -fPIC -DPIC -g -DDEBUG 

_LDFLAGS = -shared 
STRIP = strip

-include defines.make

CFLAGS += $(OPTS) $(_CFLAGS)
LDFLAGS += $(_LDFLAGS) $(CFLAGS)

PLUG = caps

SOURCES = $(wildcard *.cc) $(wildcard dsp/*.cc)
OBJECTS	= $(SOURCES:.cc=.o) 
HEADERS = $(wildcard *.h) $(wildcard dsp/*.h) $(wildcard util/*.h) $(wildcard dsp/tonestack/*.h)

DEST = $(PREFIX)/lib/ladspa
RDFDEST = $(PREFIX)/share/ladspa/rdf

# targets following -------------------------------------------------------------

all: depend $(PLUG).so tags

run: all
	@#python bin/enhance_dp_wsop.py
	@#python -i bin/rack.py White AutoFilter cream.Audio.Meter Pan
	@#python -i bin/rack.py White AutoFilter Pan
	@#python -i bin/rack.py Click Plate
	@#python -i bin/rack.py PhaserII 
	@#~/cream/gdb-python html/graph.py Eq4p,a.f=100,a.gain=30.png
	@#~/cream/gdb-python bin/eqtest.py
	@#~/cream/gdb-python bin/fractalstest.py
	@#python bin/sinsweep.py
	@#python -i ~/reve/bin/noisegate.py
	@#rack.py Noisegate AmpVI Plate
	@#python ~/reve/bin/hum.py
	@#python bin/cabtest.py
	@#python bin/spicetest.py
	@#python bin/test.py
	@#cd ~/reve && python bin/cabmake.py
	@python ~/bin/rack.py

rdf: $(PLUG).rdf
$(PLUG).rdf: all tools/make-rdf.py
	python tools/make-rdf.py > $(PLUG).rdf

$(PLUG).so: $(OBJECTS)
	$(CC) $(ARCH) $(LDFLAGS) -o $@ $(OBJECTS)

.cc.s: 
	$(CC) $(ARCH) $(CFLAGS) -S $<

.cc.o: depend 
	$(CC) $(ARCH) $(CFLAGS) -o $@ -c $<

tags: $(SOURCES) $(HEADERS)
	@-if [ -x /usr/bin/ctags ]; then ctags $(SOURCES) $(HEADERS) >/dev/null 2>&1 ; fi

install: all
	@$(STRIP) $(PLUG).so > /dev/null
	install -d $(DESTDIR)$(DEST)
	install -m 644 $(PLUG).so $(DESTDIR)$(DEST)
	install -d $(DESTDIR)$(RDFDEST)
	install -m 644 $(PLUG).rdf $(DESTDIR)$(RDFDEST)

fake-install: all
	-rm $(DESTDIR)$(DEST)/$(PLUG).so
	ln -s `pwd`/$(PLUG).so $(DESTDIR)$(DEST)/$(PLUG).so
	-rm $(DESTDIR)$(RDFDEST)/$(PLUG).rdf
	ln -s `pwd`/$(PLUG).rdf $(DESTDIR)$(RDFDEST)/$(PLUG).rdf

rdf-install:
	install -d $(DESTDIR)$(RDFDEST)
	install -m 644 $(PLUG).rdf $(DESTDIR)$(RDFDEST)

uninstall:
	-rm $(DESTDIR)$(DEST)/$(PLUG).so
	-rm $(DESTDIR)$(RDFDEST)/$(PLUG).rdf

clean:
	rm -f $(OBJECTS) $(PLUG).so *.s depend

version.h:
	@VERSION=$(VERSION) python tools/make-version.h.py

dist: all $(PLUG).rdf version.h
	tools/make-dist.py caps $(VERSION) $(CFLAGS)

depend: $(SOURCES) $(HEADERS)
	$(CC) -MM $(CFLAGS) $(DEFINES) $(SOURCES) > depend

-include depend