move Makefile to top directory
authorrekado <rekado@elephly.net>
Wed, 11 Feb 2015 22:06:36 +0000 (23:06 +0100)
committerrekado <rekado@elephly.net>
Wed, 11 Feb 2015 22:06:36 +0000 (23:06 +0100)
Makefile [new file with mode: 0644]
src/Makefile [deleted file]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
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 (file)
index 49a36a1..0000000
+++ /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