summaryrefslogtreecommitdiff
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
parentceb5345396425ad526be34c79eae2b4dfe886d5b (diff)
move Makefile to top directory
-rw-r--r--Makefile38
-rw-r--r--src/Makefile32
2 files changed, 38 insertions, 32 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
diff --git a/src/Makefile b/src/Makefile
deleted file mode 100644
index 49a36a1..0000000
--- a/src/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-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) -D$(BUILD_TYPE)
-WARNINGS = -g -Wall -pedantic
-
-$(BUNDLE): $(TYPE)/manifest.ttl $(TYPE)/$(TYPE).ttl $(TYPE).so $(TYPE)/presets $(TYPE)/data/*.raw
- rm -rf $(BUNDLE)
- mkdir $(BUNDLE)
- cp -r $^ $(BUNDLE)
-
-$(TYPE).so: $(SOURCES) ports.peg
- $(CXX) $(FLAGS) -shared $(SOURCES) `pkg-config --cflags --libs lvtk-plugin-1` -o $@
-
-ports.peg: $(TYPE)/$(TYPE).ttl
- ttl2c $^ ports.peg
-
-install: $(BUNDLE)
- mkdir -p $(INSTALL_DIR)
- rm -rf $(INSTALL_DIR)/$(BUNDLE)
- cp -R $(BUNDLE) $(INSTALL_DIR)
-
-clean:
- rm -rf $(BUNDLE) $(TYPE).so ports.peg