1# Please edit PREFIX and INSTALL_DIR to your needs.
2
3BUNDLE = abGate.lv2
4PREFIX = /usr
5INSTALL_DIR = $(DESTDIR)$(PREFIX)/lib/lv2
6
7$(BUNDLE): manifest.ttl gate.ttl gate.so gate_gui.so bypass_on.png bypass_off.png knob.png background.png
8	rm -rf $(BUNDLE)
9	mkdir $(BUNDLE)
10	cp $^ $(BUNDLE)
11
12gate.so: gate.cpp
13	g++ $(LDFLAGS) -m32 -O3 -shared -fPIC -DPIC gate.cpp `pkg-config --cflags --libs lv2core` -o gate.so
14
15gate_gui.so: gate_gui.cpp main_window.cpp main_window.h knob.cpp knob.h toggle.cpp toggle.h preset_widget.cpp preset_widget.h presets.cpp presets.h preset.cpp preset.h
16	g++ $(LDFLAGS) -m32 -O3 -shared -fPIC -DPIC gate_gui.cpp main_window.cpp knob.cpp toggle.cpp preset_widget.cpp presets.cpp preset.cpp `pkg-config --cflags gtkmm-2.4 --libs lv2core gthread-2.0` -o gate_gui.so
17
18install: $(BUNDLE)
19	mkdir -p $(INSTALL_DIR)
20	rm -rf $(INSTALL_DIR)/$(BUNDLE)
21	cp -R $(BUNDLE) $(INSTALL_DIR)
22
23clean:
24	rm -rf $(BUNDLE) gate.so gate_gui.so
25