summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorrekado <rekado@elephly.net>2015-02-11 23:06:36 +0100
committerrekado <rekado@elephly.net>2015-02-11 23:06:36 +0100
commitd8584d0dcc40409682e5ce6cb87c7b102a79601c (patch)
tree7247ab8490ffbfe6535ba014e32789ba1b88f841 /Makefile
parentceb5345396425ad526be34c79eae2b4dfe886d5b (diff)
move Makefile to top directory
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile38
1 files changed, 38 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..c46eee2
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,38 @@
+TYPE = mdaPiano
+ifeq ($(TYPE),mdaPiano)
+ BUILD_TYPE = PIANO
+else
+ BUILD_TYPE = EPIANO
+endif
+
+BUNDLE = lv2-$(TYPE).lv2
+PREFIX = /usr/local
+INSTALL_DIR = $(PREFIX)/lib/lv2
+
+SOURCES = src/*.cpp
+FLAGS = -fPIC -DPIC -O $(WARNINGS) -D$(BUILD_TYPE)
+WARNINGS = -g -Wall -pedantic
+
+build/$(BUNDLE): src/$(TYPE)/manifest.ttl \
+ src/$(TYPE)/$(TYPE).ttl \
+ build/$(TYPE).so \
+ src/$(TYPE)/presets \
+ src/$(TYPE)/data/*.raw
+ rm -rf build/$(BUNDLE)
+ mkdir -p build/$(BUNDLE)
+ cp -r $^ build/$(BUNDLE)
+
+build/$(TYPE).so: $(SOURCES) src/ports.peg
+ mkdir -p build
+ $(CXX) $(FLAGS) -shared $(SOURCES) `pkg-config --cflags --libs lvtk-plugin-1` -o $@
+
+src/ports.peg: src/$(TYPE)/$(TYPE).ttl
+ ttl2c $^ src/ports.peg
+
+install: build/$(BUNDLE)
+ mkdir -p $(INSTALL_DIR)
+ rm -rf $(INSTALL_DIR)/$(BUNDLE)
+ cp -R build/$(BUNDLE) $(INSTALL_DIR)
+
+clean:
+ rm -rf build src/ports.peg