-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
171 lines (138 loc) · 4.55 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
#!/usr/bin/make -f
# Makefile for DISTRHO Plugins #
# ---------------------------- #
# Created by falkTX, Christopher Arndt, and Patrick Desaulniers
#
SHELL=/bin/bash
# error out if DPF is missing, unless the current rule is 'submodules'
define MISSING_SUBMODULES_ERROR
=============================================================================
DPF library not found in directory 'dpf'.
Please run "make submodules" to clone the missing Git submodules, then retry.
=============================================================================
endef
ifneq ($(MAKECMDGOALS), submodules)
ifeq (,$(wildcard dpf/Makefile.base.mk))
$(info $(MISSING_SUBMODULES_ERROR))
$(error Unable to continue)
else
include dpf/Makefile.base.mk
endif
endif
# --------------------------------------------------------------
# Plugin types to build
BUILD_CLAP ?= true
BUILD_DSSI ?= false
BUILD_JACK ?= false
BUILD_LADSPA ?= true
BUILD_LV2 ?= true
BUILD_VST2 ?= true
BUILD_VST3 ?= true
export BUILD_CLAP BUILD_DSSI BUILD_JACK BUILD_LADSPA BUILD_LV2 BUILD_VST2 BUILD_VST3
# --------------------------------------------------------------
# Installation directories
PREFIX ?= /usr/local
BINDIR ?= $(PREFIX)/bin
LIBDIR ?= $(PREFIX)/lib
DSSI_DIR ?= $(LIBDIR)/dssi
LADSPA_DIR ?= $(LIBDIR)/ladspa
ifneq ($(MACOS_OR_WINDOWS),true)
CLAP_DIR ?= $(LIBDIR)/clap
LV2_DIR ?= $(LIBDIR)/lv2
VST2_DIR ?= $(LIBDIR)/vst
VST3_DIR ?= $(LIBDIR)/vst3
endif
ifeq ($(MACOS),true)
CLAP_DIR ?= /Library/Audio/Plug-Ins/CLAP
LV2_DIR ?= /Library/Audio/Plug-Ins/LV2
VST2_DIR ?= /Library/Audio/Plug-Ins/VST
VST3_DIR ?= /Library/Audio/Plug-Ins/VST3
endif
ifeq ($(WINDOWS),true)
CLAP_DIR ?= $(COMMONPROGRAMFILES)/CLAP
LV2_DIR ?= $(COMMONPROGRAMFILES)/LV2
VST2_DIR ?= $(COMMONPROGRAMFILES)/VST2
VST3_DIR ?= $(COMMONPROGRAMFILES)/VST3
endif
USER_DSSI_DIR ?= $(HOME)/.dssi
USER_LADSPA_DIR ?= $(HOME)/.ladspa
ifneq ($(MACOS_OR_WINDOWS),true)
USER_CLAP_DIR ?= $(HOME)/.clap
USER_LV2_DIR ?= $(HOME)/.lv2
USER_VST2_DIR ?= $(HOME)/.vst
USER_VST3_DIR ?= $(HOME)/.vst3
endif
ifeq ($(MACOS),true)
USER_CLAP_DIR ?= $(HOME)/Library/Audio/Plug-Ins/CLAP
USER_LV2_DIR ?= $(HOME)/Library/Audio/Plug-Ins/LV2
USER_VST2_DIR ?= $(HOME)/Library/Audio/Plug-Ins/VST
USER_VST3_DIR ?= $(HOME)/Library/Audio/Plug-Ins/VST3
endif
ifeq ($(WINDOWS),true)
USER_CLAP_DIR ?= $(APPDATA)/CLAP
USER_LV2_DIR ?= $(APPDATA)/LV2
USER_VST2_DIR ?= $(APPDATA)/VST
USER_VST3_DIR ?= $(APPDATA)/VST3
endif
export DESTDIR PREFIX BINDIR LIBDIR
export CLAP_DIR DSSI_DIR LADSPA_DIR LV2_DIR VST2_DIR VST3_DIR
export USER_CLAP_DIR USER_DSSI_DIR USER_LADSPA_DIR USER_LV2_DIR USER_VST2_DIR USER_VST3_DIR
# --------------------------------------------------------------
PLUGINS = \
diodeladder \
korg35hpf \
korg35lpf \
moogladder \
mooghalfladder \
oberheim \
PLUGIN_BASE_URI = https://chrisarndt.de/plugins/faustfilters
# --------------------------------------------------------------
all: libs plugins gen
# --------------------------------------------------------------
submodules:
-test -d .git && git submodule update --init --recursive
libs: submodules
plugins: libs $(PLUGINS)
# --------------------------------------------------------------
$(PLUGINS):
$(MAKE) all -C plugins/$@
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: plugins dpf/utils/lv2_ttl_generator.exe
@$(CURDIR)/dpf/utils/generate-ttl.sh
dpf/utils/lv2_ttl_generator.exe:
$(MAKE) -C dpf/utils/lv2-ttl-generator WINDOWS=true
endif
# --------------------------------------------------------------
lv2lint: plugins gen
@echo "Please make sure you have the https://github.com/KXStudio/LV2-Extensions bundles"
@echo "installed somewhere on your LV2_PATH."
@for plug in $(PLUGINS); do \
lv2lint -q -Mpack -s lv2_generate_ttl -t "Plugin Author Email" \
-I bin/$${plug,,}.lv2/ "$(PLUGIN_BASE_URI)#$${plug,,}"; \
done
# --------------------------------------------------------------
clean:
$(MAKE) clean -C dpf/utils/lv2-ttl-generator
@for plug in $(PLUGINS); do \
$(MAKE) clean -C plugins/$${plug}; \
done
rm -rf bin build
# --------------------------------------------------------------
install: all
@for plug in $(PLUGINS); do \
$(MAKE) install -C plugins/$${plug}; \
done
install-user: all
@for plug in $(PLUGINS); do \
$(MAKE) install-user -C plugins/$${plug}; \
done
# --------------------------------------------------------------
.PHONY: all clean faust gen install install-user libs lv2lint plugins submodule