summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrekado <rekado@elephly.net>2013-01-13 22:43:32 +0800
committerrekado <rekado@elephly.net>2013-01-13 22:47:05 +0800
commit1e00b49cd54355c45c6bea5db4699d411a8a2f8b (patch)
tree3b505e3eda4c4d437cbdd8b0d030e62399fb42ba /src
parenta7770f277da1c66b5aecf6b207cf7197a1fbe329 (diff)
add Makefile
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.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile
new file mode 100644
index 0000000..981cca6
--- /dev/null
+++ b/src/Makefile
@@ -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