add Makefile
authorrekado <rekado@elephly.net>
Sun, 13 Jan 2013 14:43:32 +0000 (22:43 +0800)
committerrekado <rekado@elephly.net>
Sun, 13 Jan 2013 14:47:05 +0000 (22:47 +0800)
For now this depends on larsl's `lv2-c++-tools`, which can be downloaded
from http://freecode.com/projects/lv2-c-tools . Revert to plain C later.

src/Makefile [new file with mode: 0644]

diff --git a/src/Makefile b/src/Makefile
new file mode 100644 (file)
index 0000000..981cca6
--- /dev/null
@@ -0,0 +1,25 @@
+BUNDLE = lv2-mdaPiano.lv2
+INSTALL_DIR = /usr/local/lib/lv2
+
+SOURCES = *.cpp
+FLAGS = -fPIC -DPIC -O $(WARNINGS)
+WARNINGS = #-g -Wall -pedantic
+
+$(BUNDLE): manifest.ttl mdaPiano.ttl mdaPiano.so data/samples.raw presets
+       rm -rf $(BUNDLE)
+       mkdir $(BUNDLE)
+       cp -r $^ $(BUNDLE)
+
+mdaPiano.so: $(SOURCES) mdaPiano.peg
+       $(CXX) $(FLAGS) -shared $(SOURCES) `pkg-config --cflags --libs lv2-plugin` -o $@
+
+mdaPiano.peg: mdaPiano.ttl
+       lv2peg $^ mdaPiano.peg
+
+install: $(BUNDLE)
+       mkdir -p $(INSTALL_DIR)
+       rm -rf $(INSTALL_DIR)/$(BUNDLE)
+       cp -R $(BUNDLE) $(INSTALL_DIR)
+
+clean:
+       rm -rf $(BUNDLE) mdaPiano.so mdaPiano.peg