Mercurial > hg > piper-cpp
diff Makefile @ 75:81e1c48e97f9
Rearrange and rename to Piper C++ structure
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Mon, 10 Oct 2016 16:31:09 +0100 |
parents | 6c908ee3ad3b |
children | 6fad5154778e |
line wrap: on
line diff
--- a/Makefile Mon Oct 10 15:31:44 2016 +0100 +++ b/Makefile Mon Oct 10 16:31:09 2016 +0100 @@ -1,39 +1,46 @@ + +VAMPSDK_DIR := ../vamp-plugin-sdk +PIPER_DIR := ../piper CXXFLAGS := -Wall -Werror -g3 -std=c++11 -INCFLAGS := -Ivamp-plugin-sdk -Ijson -I/usr/local/include -Icapnproto -I. +INCFLAGS := -I$(VAMPSDK_DIR) -I. -I/usr/local/include -LDFLAGS := vamp-plugin-sdk/libvamp-hostsdk.a -L/usr/local/lib -lcapnp -lkj -ldl +LDFLAGS := $(VAMPSDK_DIR)/libvamp-hostsdk.a -L/usr/local/lib -lcapnp -lkj -ldl -#!!! todo: proper dependencies +all: o bin bin/piper-convert bin/piper-vamp-server -all: bin/vampipe-convert bin/vampipe-server +bin: + mkdir bin -bin/vampipe-convert: o/vampipe-convert.o o/json11.o o/piper.capnp.o +o: + mkdir o + +bin/piper-convert: o/convert.o o/json11.o o/piper.capnp.o c++ $(CXXFLAGS) $^ -o $@ $(LDFLAGS) -bin/vampipe-server: o/vampipe-server.o o/piper.capnp.o +bin/piper-vamp-server: o/server.o o/piper.capnp.o c++ $(CXXFLAGS) $^ -o $@ $(LDFLAGS) -capnproto/piper.capnp.h: capnproto/piper.capnp - capnp compile $< -oc++ +vamp-capnp/piper.capnp.h: $(PIPER_DIR)/capnp/piper.capnp + capnp compile -oc++:vamp-capnp --src-prefix=$(PIPER_DIR)/capnp $< -o/piper.capnp.o: capnproto/piper.capnp.c++ capnproto/piper.capnp.h +o/piper.capnp.o: vamp-capnp/piper.capnp.c++ vamp-capnp/piper.capnp.h c++ $(CXXFLAGS) $(INCFLAGS) -c $< -o $@ -o/json11.o: json/json11/json11.cpp +o/json11.o: json11/json11.cpp c++ $(CXXFLAGS) -c $< -o $@ -o/vampipe-convert.o: utilities/vampipe-convert.cpp capnproto/piper.capnp.h capnproto/VampnProto.h json/VampJson.h +o/convert.o: vamp-server/convert.cpp vamp-capnp/piper.capnp.h vamp-capnp/VampnProto.h vamp-json/VampJson.h c++ $(CXXFLAGS) $(INCFLAGS) -c $< -o $@ -o/vampipe-server.o: utilities/vampipe-server.cpp capnproto/piper.capnp.h capnproto/VampnProto.h +o/server.o: vamp-server/server.cpp vamp-capnp/piper.capnp.h vamp-capnp/VampnProto.h c++ $(CXXFLAGS) $(INCFLAGS) -c $< -o $@ test: all - test/test-vampipe-server.sh + test/test-server.sh clean: - rm -f */*.o capnproto/piper.capnp.h capnproto/piper.capnp.c++ + rm -f */*.o vamp-capnp/piper.capnp.h vamp-capnp/piper.capnp.c++ distclean: clean rm -f bin/*