/
Makefile
73 lines (56 loc) · 2.05 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/usr/bin/make -f
# Makefile for DISTRHO Plugins #
# ---------------------------- #
# Created by falkTX
#
# Modified by REIS0
# Convenience command to fetch dpf as git submodule if the dpf subdirectory
# is empty.
# We send the output to stderr instead of stdout, else it ends up as a
# makefile statement with haphazard results.
$(shell [ -f dpf/Makefile.base.mk ] || git submodule update --init --recursive dpf 1>&2)
PLUGIN=mimid
PLUGIN_NAME=MiMi-d
WITH_LTO=true
NOOPT=false
include dpf/Makefile.base.mk
all: dgl plugins gen
# --------------------------------------------------------------
PREFIX ?= /usr/local
DESTDIR ?=
# --------------------------------------------------------------
dgl:
ifeq ($(HAVE_OPENGL),true)
$(MAKE) -C dpf/dgl opengl
endif
plugins: dgl
$(MAKE) WITH_LTO=$(WITH_LTO) NOOPT=$(NOOPT) all -C plugins/$(PLUGIN)
ifneq ($(CROSS_COMPILING),true)
gen: plugins dpf/utils/lv2_ttl_generator
@$(CURDIR)/dpf/utils/generate-ttl.sh
ifeq ($(MACOS),true)
@$(CURDIR)/dpf/utils/generate-vst-bundles.sh
endif
dpf/utils/lv2_ttl_generator:
$(MAKE) -C dpf/utils/lv2-ttl-generator
else
gen:
endif
# --------------------------------------------------------------
clean:
$(MAKE) clean -C dpf/dgl
$(MAKE) clean -C dpf/utils/lv2-ttl-generator
$(MAKE) clean -C plugins/$(PLUGIN)
rm -rf bin build
# --------------------------------------------------------------
# install target just installs, it doesn't attempt to build anything
install:
install -d $(DESTDIR)$(PREFIX)/lib/lv2/$(PLUGIN_NAME).lv2
install -m 755 bin/$(PLUGIN_NAME).lv2/*.so $(DESTDIR)$(PREFIX)/lib/lv2/$(PLUGIN_NAME).lv2
install -m 644 bin/$(PLUGIN_NAME).lv2/*.ttl $(DESTDIR)$(PREFIX)/lib/lv2/$(PLUGIN_NAME).lv2
install -d $(DESTDIR)$(PREFIX)/lib/lv2/$(PLUGIN_NAME).presets.lv2
install -m 644 plugins/$(PLUGIN)/Presets/*.ttl $(DESTDIR)$(PREFIX)/lib/lv2/$(PLUGIN_NAME).presets.lv2
install -d $(DESTDIR)$(PREFIX)/share/doc/$(PLUGIN_NAME)
install -m 644 plugins/$(PLUGIN)/Doc/*.pdf $(DESTDIR)$(PREFIX)/share/doc/$(PLUGIN_NAME)
# --------------------------------------------------------------
.PHONY: plugins