Chris@38
|
1
|
Chris@38
|
2 LIBRARY_EXT ?= .so
|
Chris@38
|
3 LIBRARY ?= vampyhost$(LIBRARY_EXT)
|
Chris@38
|
4 CXX ?= g++
|
Chris@38
|
5 CC ?= gcc
|
Chris@38
|
6
|
Chris@52
|
7 SRC_DIR := native
|
Chris@52
|
8
|
Chris@103
|
9 PLUGIN_EXT ?= $(LIBRARY_EXT)
|
Chris@103
|
10 TESTPLUG_DIR := test/vamp-test-plugin
|
Chris@103
|
11 TESTPLUG := $(TESTPLUG_DIR)/vamp-test-plugin$(PLUGIN_EXT)
|
Chris@103
|
12
|
Chris@52
|
13 HEADERS := $(SRC_DIR)/PyPluginObject.h $(SRC_DIR)/PyRealTime.h $(SRC_DIR)/FloatConversion.h $(SRC_DIR)/VectorConversion.h
|
Chris@52
|
14 SOURCES := $(SRC_DIR)/PyPluginObject.cpp $(SRC_DIR)/PyRealTime.cpp $(SRC_DIR)/VectorConversion.cpp $(SRC_DIR)/vampyhost.cpp
|
Chris@70
|
15
|
Chris@70
|
16 PY := $(wildcard vamp/*.py)
|
Chris@62
|
17 TESTS := $(wildcard test/test_*.py)
|
Chris@38
|
18
|
Chris@38
|
19 OBJECTS := $(SOURCES:.cpp=.o)
|
Chris@38
|
20 OBJECTS := $(OBJECTS:.c=.o)
|
Chris@38
|
21
|
Chris@107
|
22 default: $(LIBRARY)
|
Chris@107
|
23
|
Chris@62
|
24 all: $(LIBRARY) .tests
|
Chris@62
|
25
|
Chris@103
|
26 .tests: $(LIBRARY) $(PY) $(TESTPLUG) $(TESTS)
|
Chris@103
|
27 VAMP_PATH=$(TESTPLUG_DIR) $(NOSE)
|
Chris@62
|
28 @touch $@
|
Chris@107
|
29
|
Chris@107
|
30 test: $(LIBRARY) $(PY) $(TESTPLUG) $(TESTS)
|
Chris@107
|
31 VAMP_PATH=$(TESTPLUG_DIR) $(NOSE)
|
Chris@107
|
32
|
Chris@107
|
33 $(LIBRARY): $(OBJECTS)
|
Chris@107
|
34 $(CXX) -o $@ $^ $(LDFLAGS)
|
Chris@38
|
35
|
Chris@103
|
36 $(TESTPLUG):
|
Chris@104
|
37 $(MAKE) -C $(TESTPLUG_DIR) -f Makefile$(MAKEFILE_EXT) VAMPSDK_DIR=../../../vamp-plugin-sdk
|
Chris@103
|
38
|
Chris@38
|
39 clean:
|
Chris@103
|
40 $(MAKE) -C $(TESTPLUG_DIR) -f Makefile$(MAKEFILE_EXT) clean
|
Chris@108
|
41 rm -f $(OBJECTS) .tests
|
Chris@38
|
42
|
Chris@38
|
43 distclean: clean
|
Chris@103
|
44 $(MAKE) -C $(TESTPLUG_DIR) -f Makefile$(MAKEFILE_EXT) distclean
|
Chris@38
|
45 rm -f $(LIBRARY)
|
Chris@38
|
46
|
Chris@38
|
47 depend:
|
Chris@103
|
48 $(MAKE) -C $(TESTPLUG_DIR) -f Makefile$(MAKEFILE_EXT) depend
|
Chris@103
|
49 makedepend -Y -fMakefile.inc $(SOURCES) $(HEADERS)
|
Chris@38
|
50
|
Chris@38
|
51 # DO NOT DELETE
|
Chris@38
|
52
|
Chris@52
|
53 native/PyPluginObject.o: native/PyPluginObject.h native/FloatConversion.h
|
Chris@52
|
54 native/PyPluginObject.o: native/VectorConversion.h native/PyRealTime.h
|
Chris@52
|
55 native/PyRealTime.o: native/PyRealTime.h
|
Chris@52
|
56 native/VectorConversion.o: native/FloatConversion.h native/VectorConversion.h
|
Chris@52
|
57 native/vampyhost.o: native/PyRealTime.h native/PyPluginObject.h
|
Chris@52
|
58 native/vampyhost.o: native/VectorConversion.h
|