-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
251 lines (203 loc) · 8.23 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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
#!/usr/bin/make -f
# Makefile for DISTRHO Plugins #
# ---------------------------- #
# Created by falkTX
#
include dpf/Makefile.base.mk
# also set in:
# plugins/Common/IldaeilPlugin.cpp `getVersion`
# plugins/Standalone/macOS/Info.plist
VERSION = 1.3
# ---------------------------------------------------------------------------------------------------------------------
# Build targets
all: carla dgl plugins gen
# ---------------------------------------------------------------------------------------------------------------------
# Build config
PREFIX ?= /usr/local
DESTDIR ?=
# ---------------------------------------------------------------------------------------------------------------------
# Carla config
ifeq ($(WASM),true)
USE_SYSTEM_CARLA_BINS = true
endif
CARLA_EXTRA_ARGS = \
CARLA_BACKEND_NAMESPACE=Ildaeil \
CAN_GENERATE_LV2_TTL=false \
CUSTOM_DPF_PATH=$(CURDIR)/dpf \
DGL_NAMESPACE=IldaeilDGL \
STATIC_PLUGIN_TARGET=true \
USE_FILE_BROWSER=true \
USING_CUSTOM_DPF=true \
HAVE_FFMPEG=false \
HAVE_FLUIDSYNTH=false \
HAVE_PROJECTM=false \
HAVE_ZYN_DEPS=false \
HAVE_ZYN_UI_DEPS=false
ifneq ($(DEBUG),true)
CARLA_EXTRA_ARGS += EXTERNAL_PLUGINS=true
endif
CARLA_TARGETS = static-plugin
ifneq ($(USE_SYSTEM_CARLA_BINS),true)
CARLA_TARGETS += bridges-plugin bridges-ui discovery
ifeq ($(CARLA_EXTRA_TARGETS),true)
# 32bit bridge
ifeq ($(WINDOWS)$(CPU_X86_64),truetrue)
CARLA_TARGETS += win32
else ifneq ($(MACOS)$(WINDOWS),true)
CARLA_TARGETS += posix32
endif
# Windows bridges
ifeq ($(CPU_I386_OR_X86_64)$(LINUX),truetrue)
CARLA_TARGETS += wine32
endif
ifeq ($(CPU_X86_64)$(LINUX),truetrue)
CARLA_TARGETS += wine64
endif
endif # CARLA_EXTRA_TARGETS
endif # USE_SYSTEM_CARLA_BINS
# ---------------------------------------------------------------------------------------------------------------------
# DGL config
DGL_EXTRA_ARGS = \
DISTRHO_NAMESPACE=IldaeilDISTRHO \
DGL_NAMESPACE=IldaeilDGL \
USE_FILE_BROWSER=true
# ---------------------------------------------------------------------------------------------------------------------
# DPF bundled plugins
ifneq ($(MACOS),true)
ILDAEIL_FX_ARGS = VST2_FILENAME=Ildaeil.vst/Ildaeil-FX$(LIB_EXT) CLAP_FILENAME=Ildaeil.clap/Ildaeil-FX.clap
ILDAEIL_MIDI_ARGS = VST2_FILENAME=Ildaeil.vst/Ildaeil-MIDI$(LIB_EXT) CLAP_FILENAME=Ildaeil.clap/Ildaeil-MIDI.clap
ILDAEIL_SYNTH_ARGS = VST2_FILENAME=Ildaeil.vst/Ildaeil-Synth$(LIB_EXT) CLAP_FILENAME=Ildaeil.clap/Ildaeil-Synth.clap
endif
# ---------------------------------------------------------------------------------------------------------------------
# Check for OpenGL + X11 dependencies
ifneq ($(HAIKU_OR_MACOS_OR_WASM_OR_WINDOWS),true)
ifneq ($(HAVE_OPENGL),true)
$(error OpenGL dependency not installed/available)
endif
ifneq ($(HAVE_X11),true)
$(error X11 dependency not installed/available)
endif
ifneq ($(HAVE_XCURSOR),true)
$(warning Xcursor dependency not installed/available)
endif
ifneq ($(HAVE_XEXT),true)
$(warning Xext dependency not installed/available)
endif
ifneq ($(HAVE_XRANDR),true)
$(warning Xrandr dependency not installed/available)
endif
endif
# ---------------------------------------------------------------------------------------------------------------------
carla: dgl
$(MAKE) $(CARLA_EXTRA_ARGS) -C carla $(CARLA_TARGETS)
extra-bins:
$(MAKE) $(CARLA_EXTRA_ARGS) $(DGL_EXTRA_ARGS) $(ILDAEIL_FX_ARGS) carlabins -C plugins/Standalone
ifneq ($(WASM),true)
$(MAKE) $(CARLA_EXTRA_ARGS) $(DGL_EXTRA_ARGS) $(ILDAEIL_FX_ARGS) carlabins -C plugins/FX
$(MAKE) $(CARLA_EXTRA_ARGS) $(DGL_EXTRA_ARGS) $(ILDAEIL_MIDI_ARGS) carlabins -C plugins/MIDI
$(MAKE) $(CARLA_EXTRA_ARGS) $(DGL_EXTRA_ARGS) $(ILDAEIL_SYNTH_ARGS) carlabins -C plugins/Synth
endif
extra-posix32:
$(MAKE) $(CARLA_EXTRA_ARGS) -C carla posix32
extra-win32:
$(MAKE) $(CARLA_EXTRA_ARGS) -C carla win32 AR=i686-w64-mingw32-ar CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++
extra-win64:
$(MAKE) $(CARLA_EXTRA_ARGS) -C carla win64 AR=x86_64-w64-mingw32-ar CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++
extra-wine32:
$(MAKE) $(CARLA_EXTRA_ARGS) -C carla wine32
extra-wine64:
$(MAKE) $(CARLA_EXTRA_ARGS) -C carla wine64
dgl:
$(MAKE) $(DGL_EXTRA_ARGS) -C dpf/dgl opengl
plugins: carla dgl
$(MAKE) $(CARLA_EXTRA_ARGS) $(DGL_EXTRA_ARGS) $(ILDAEIL_FX_ARGS) -C plugins/Standalone
ifneq ($(WASM),true)
$(MAKE) $(CARLA_EXTRA_ARGS) $(DGL_EXTRA_ARGS) $(ILDAEIL_FX_ARGS) -C plugins/FX
$(MAKE) $(CARLA_EXTRA_ARGS) $(DGL_EXTRA_ARGS) $(ILDAEIL_MIDI_ARGS) -C plugins/MIDI
$(MAKE) $(CARLA_EXTRA_ARGS) $(DGL_EXTRA_ARGS) $(ILDAEIL_SYNTH_ARGS) -C plugins/Synth
endif
ifneq ($(CROSS_COMPILING),true)
gen: plugins dpf/utils/lv2_ttl_generator
@$(CURDIR)/dpf/utils/generate-ttl.sh
dpf/utils/lv2_ttl_generator:
$(MAKE) -C dpf/utils/lv2-ttl-generator
else
gen:
endif
jack: carla dgl
$(MAKE) $(CARLA_EXTRA_ARGS) $(DGL_EXTRA_ARGS) $(ILDAEIL_FX_ARGS) -C plugins/Standalone
fx: carla dgl
$(MAKE) $(CARLA_EXTRA_ARGS) $(DGL_EXTRA_ARGS) $(ILDAEIL_FX_ARGS) -C plugins/FX
# ---------------------------------------------------------------------------------------------------------------------
install:
install -d $(DESTDIR)$(PREFIX)/bin
install -d $(DESTDIR)$(PREFIX)/lib/clap/Ildaeil.clap
install -d $(DESTDIR)$(PREFIX)/lib/lv2/Ildaeil-FX.lv2
install -d $(DESTDIR)$(PREFIX)/lib/lv2/Ildaeil-MIDI.lv2
install -d $(DESTDIR)$(PREFIX)/lib/lv2/Ildaeil-Synth.lv2
install -d $(DESTDIR)$(PREFIX)/lib/vst/Ildaeil.vst
install -d $(DESTDIR)$(PREFIX)/lib/vst3/Ildaeil-FX.vst3/$(VST3_BINARY_DIR)
install -d $(DESTDIR)$(PREFIX)/lib/vst3/Ildaeil-Synth.vst3/$(VST3_BINARY_DIR)
install -m 755 bin/Ildaeil$(APP_EXT) $(DESTDIR)$(PREFIX)/bin/
install -m 644 bin/Ildaeil.clap/* $(DESTDIR)$(PREFIX)/lib/clap/Ildaeil.clap/
install -m 644 bin/Ildaeil-FX.lv2/* $(DESTDIR)$(PREFIX)/lib/lv2/Ildaeil-FX.lv2/
install -m 644 bin/Ildaeil-MIDI.lv2/* $(DESTDIR)$(PREFIX)/lib/lv2/Ildaeil-MIDI.lv2/
install -m 644 bin/Ildaeil-Synth.lv2/* $(DESTDIR)$(PREFIX)/lib/lv2/Ildaeil-Synth.lv2/
install -m 644 bin/Ildaeil.vst/* $(DESTDIR)$(PREFIX)/lib/vst/Ildaeil.vst/
install -m 644 bin/Ildaeil-FX.vst3/$(VST3_BINARY_DIR)/* $(DESTDIR)$(PREFIX)/lib/vst3/Ildaeil-FX.vst3/$(VST3_BINARY_DIR)/
install -m 644 bin/Ildaeil-Synth.vst3/$(VST3_BINARY_DIR)/* $(DESTDIR)$(PREFIX)/lib/vst3/Ildaeil-Synth.vst3/$(VST3_BINARY_DIR)/
# ---------------------------------------------------------------------------------------------------------------------
clean:
$(MAKE) $(CARLA_EXTRA_ARGS) distclean -C carla
$(MAKE) $(CARLA_EXTRA_ARGS) clean -C plugins/Standalone
$(MAKE) $(CARLA_EXTRA_ARGS) $(ILDAEIL_FX_ARGS) clean -C plugins/FX
$(MAKE) $(CARLA_EXTRA_ARGS) $(ILDAEIL_MIDI_ARGS) clean -C plugins/MIDI
$(MAKE) $(CARLA_EXTRA_ARGS) $(ILDAEIL_SYNTH_ARGS) clean -C plugins/Synth
$(MAKE) clean -C dpf/dgl
$(MAKE) clean -C dpf/utils/lv2-ttl-generator
rm -rf bin build
rm -f dpf-widgets/opengl/*.d
rm -f dpf-widgets/opengl/*.o
# ---------------------------------------------------------------------------------------------------------------------
# tarball target, generating release source-code tarballs ready for packaging
TAR_ARGS = \
--exclude=".appveyor*" \
--exclude=".ci*" \
--exclude=".clang*" \
--exclude=".drone*" \
--exclude=".editor*" \
--exclude=".git*" \
--exclude="*.kdev*" \
--exclude=".travis*" \
--exclude=".vscode*" \
--exclude="*.d" \
--exclude="*.o" \
--exclude=bin \
--exclude=build \
--exclude=carla/data \
--exclude=carla/source/frontend \
--exclude=carla/source/interposer \
--exclude=carla/source/libjack \
--exclude=carla/source/native-plugins/resources \
--exclude=carla/source/rest \
--exclude=carla/source/tests.old \
--exclude=carla/source/theme \
--exclude=carla/resources \
--exclude=dpf/build \
--exclude=dpf/cmake \
--exclude=dpf/examples \
--exclude=dpf/lac \
--exclude=dpf/tests \
--exclude=dpf-widgets/generic \
--exclude=dpf-widgets/opengl/Blendish* \
--exclude=dpf-widgets/opengl/DearImGuiColorTextEditor* \
--exclude=dpf-widgets/opengl/Quantum* \
--exclude=dpf-widgets/tests \
--transform='s,^\.\.,-.-.,' \
--transform='s,^\.,Ildaeil-$(VERSION),' \
--transform='s,^-\.-\.,..,' \
tarball:
rm -f ../Ildaeil-src-$(VERSION).tar.xz
tar -c --lzma $(TAR_ARGS) -f ../Ildaeil-src-$(VERSION).tar.xz .
# ---------------------------------------------------------------------------------------------------------------------
.PHONY: carla plugins