Mercurial > hg > vampy-host
annotate Makefile.inc @ 104:9db1ea00b1e6
Add OSX makefile, export Vamp SDK dir to subprocess
author | Chris Cannam |
---|---|
date | Mon, 15 Jun 2015 16:46:48 +0100 |
parents | 141d3bfe1503 |
children | 56d0e5cd4ac8 |
rev | line source |
---|---|
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@62 | 22 all: $(LIBRARY) .tests |
Chris@62 | 23 |
Chris@38 | 24 $(LIBRARY): $(OBJECTS) |
Chris@38 | 25 $(CXX) -o $@ $^ $(LDFLAGS) |
Chris@62 | 26 |
Chris@103 | 27 .tests: $(LIBRARY) $(PY) $(TESTPLUG) $(TESTS) |
Chris@103 | 28 VAMP_PATH=$(TESTPLUG_DIR) $(NOSE) |
Chris@62 | 29 @touch $@ |
Chris@38 | 30 |
Chris@103 | 31 $(TESTPLUG): |
Chris@104 | 32 $(MAKE) -C $(TESTPLUG_DIR) -f Makefile$(MAKEFILE_EXT) VAMPSDK_DIR=../../../vamp-plugin-sdk |
Chris@103 | 33 |
Chris@38 | 34 clean: |
Chris@103 | 35 $(MAKE) -C $(TESTPLUG_DIR) -f Makefile$(MAKEFILE_EXT) clean |
Chris@38 | 36 rm -f $(OBJECTS) |
Chris@38 | 37 |
Chris@38 | 38 distclean: clean |
Chris@103 | 39 $(MAKE) -C $(TESTPLUG_DIR) -f Makefile$(MAKEFILE_EXT) distclean |
Chris@38 | 40 rm -f $(LIBRARY) |
Chris@38 | 41 |
Chris@38 | 42 depend: |
Chris@103 | 43 $(MAKE) -C $(TESTPLUG_DIR) -f Makefile$(MAKEFILE_EXT) depend |
Chris@103 | 44 makedepend -Y -fMakefile.inc $(SOURCES) $(HEADERS) |
Chris@38 | 45 |
Chris@38 | 46 # DO NOT DELETE |
Chris@38 | 47 |
Chris@52 | 48 native/PyPluginObject.o: native/PyPluginObject.h native/FloatConversion.h |
Chris@52 | 49 native/PyPluginObject.o: native/VectorConversion.h native/PyRealTime.h |
Chris@52 | 50 native/PyRealTime.o: native/PyRealTime.h |
Chris@52 | 51 native/VectorConversion.o: native/FloatConversion.h native/VectorConversion.h |
Chris@52 | 52 native/vampyhost.o: native/PyRealTime.h native/PyPluginObject.h |
Chris@52 | 53 native/vampyhost.o: native/VectorConversion.h |