summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrekado <rekado@elephly.net>2013-07-27 22:12:47 +0800
committerrekado <rekado@elephly.net>2013-07-27 22:12:47 +0800
commitdb0f7f143b1538acdb22d005c6379f009c59d7f5 (patch)
tree3726165b8f33649752923ab2f2b9b95427c1a945
parent91500c2c593190897c0dacfce1eafd7907df8241 (diff)
generalise Makefile
-rw-r--r--src/Makefile23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/Makefile b/src/Makefile
index ece96d5..e9901a4 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,20 +1,27 @@
-BUNDLE = lv2-mdaPiano.lv2
+TYPE = mdaPiano
+ifeq ($(TYPE),mdaPiano)
+ BUILD_TYPE = PIANO
+else
+ BUILD_TYPE = EPIANO
+endif
+
+BUNDLE = lv2-$(TYPE).lv2
INSTALL_DIR = /usr/local/lib/lv2
SOURCES = *.cpp
-FLAGS = -fPIC -DPIC -O $(WARNINGS)
-WARNINGS = #-g -Wall -pedantic
+FLAGS = -fPIC -DPIC -O $(WARNINGS) -D$(BUILD_TYPE)
+WARNINGS = -g -Wall -pedantic
-$(BUNDLE): manifest.ttl mdaPiano.ttl mdaPiano.so presets data/*.raw
+$(BUNDLE): manifest.ttl $(TYPE).ttl $(TYPE).so $(TYPE)/presets $(TYPE)/data/*.raw
rm -rf $(BUNDLE)
mkdir $(BUNDLE)
cp -r $^ $(BUNDLE)
-mdaPiano.so: $(SOURCES) mdaPiano.peg
+$(TYPE).so: $(SOURCES) $(TYPE).peg
$(CXX) $(FLAGS) -shared $(SOURCES) `pkg-config --cflags --libs lvtk-plugin-1` -o $@
-mdaPiano.peg: mdaPiano.ttl
- ttl2c $^ mdaPiano.peg
+$(TYPE).peg: $(TYPE).ttl
+ ttl2c $^ $(TYPE).peg
install: $(BUNDLE)
mkdir -p $(INSTALL_DIR)
@@ -22,4 +29,4 @@ install: $(BUNDLE)
cp -R $(BUNDLE) $(INSTALL_DIR)
clean:
- rm -rf $(BUNDLE) mdaPiano.so mdaPiano.peg
+ rm -rf $(BUNDLE) $(addprefix $(TYPE),.so .peg)