Another fix..
[carla.git] / Makefile
blobb9e0a1815a5aa66d7345e4a0afb35d0533e99e34
1 #!/usr/bin/make -f
2 # Makefile for Carla #
3 # ------------------ #
4 # Created by falkTX
7 CWD=source
8 include source/Makefile.mk
10 # ---------------------------------------------------------------------------------------------------------------------
12 PREFIX := /usr/local
13 BINDIR := $(PREFIX)/bin
14 LIBDIR := $(PREFIX)/lib
15 DATADIR := $(PREFIX)/share
16 INCLUDEDIR := $(PREFIX)/include
17 DESTDIR :=
19 ifeq ($(DEBUG),true)
20 MODULEDIR := $(CURDIR)/build/modules/Debug
21 else
22 MODULEDIR := $(CURDIR)/build/modules/Release
23 endif
25 # see also cmake/CMakeLists.txt, source/common/__init__.py and source/includes/CarlaDefines.h
26 VERSION := 2.6.0-alpha1
28 -include Makefile.user.mk
30 # ---------------------------------------------------------------------------------------------------------------------
32 TARGETS = backend frontend theme
34 ifneq ($(WASM),true)
35 TARGETS += bridges-plugin bridges-ui discovery interposer libjack plugin
36 endif
38 all: $(TARGETS)
40 # ---------------------------------------------------------------------------------------------------------------------
41 # Binaries (native)
43 ifneq ($(STATIC_PLUGIN_TARGET),true)
44 ALL_LIBS += $(MODULEDIR)/carla_engine.a
45 endif
46 ALL_LIBS += $(MODULEDIR)/carla_engine_plugin.a
47 ALL_LIBS += $(MODULEDIR)/carla_plugin.a
48 ALL_LIBS += $(MODULEDIR)/jackbridge.a
49 ifeq ($(STATIC_PLUGIN_TARGET),true)
50 ALL_LIBS += $(MODULEDIR)/jackbridge.min.a
51 endif
52 ALL_LIBS += $(MODULEDIR)/native-plugins.a
53 ALL_LIBS += $(MODULEDIR)/rtmempool.a
55 3RD_LIBS += $(MODULEDIR)/audio_decoder.a
56 3RD_LIBS += $(MODULEDIR)/lilv.a
57 ifneq ($(STATIC_PLUGIN_TARGET),true)
58 3RD_LIBS += $(MODULEDIR)/sfzero.a
59 endif
60 3RD_LIBS += $(MODULEDIR)/water.a
61 3RD_LIBS += $(MODULEDIR)/zita-resampler.a
63 ifeq ($(HAVE_DGL),true)
64 ifneq ($(USING_CUSTOM_DPF),true)
65 3RD_LIBS += $(MODULEDIR)/dgl.a
66 endif
67 endif
69 ifeq ($(HAVE_HYLIA),true)
70 3RD_LIBS += $(MODULEDIR)/hylia.a
71 endif
73 ifeq ($(HAVE_QT4),true)
74 3RD_LIBS += $(MODULEDIR)/theme.qt4.a
75 endif
77 ifeq ($(HAVE_QT5),true)
78 3RD_LIBS += $(MODULEDIR)/theme.qt5.a
79 endif
81 ifeq ($(HAVE_YSFX),true)
82 3RD_LIBS += $(MODULEDIR)/ysfx.a
83 endif
85 ifeq ($(USING_JUCE),true)
86 3RD_LIBS += $(MODULEDIR)/carla_juce.a
87 3RD_LIBS += $(MODULEDIR)/juce_audio_basics.a
88 ifeq ($(USING_JUCE_AUDIO_DEVICES),true)
89 3RD_LIBS += $(MODULEDIR)/juce_audio_devices.a
90 endif
91 3RD_LIBS += $(MODULEDIR)/juce_audio_processors.a
92 3RD_LIBS += $(MODULEDIR)/juce_core.a
93 3RD_LIBS += $(MODULEDIR)/juce_data_structures.a
94 3RD_LIBS += $(MODULEDIR)/juce_events.a
95 3RD_LIBS += $(MODULEDIR)/juce_graphics.a
96 3RD_LIBS += $(MODULEDIR)/juce_gui_basics.a
97 3RD_LIBS += $(MODULEDIR)/juce_gui_extra.a
98 endif
100 ifeq ($(USING_RTAUDIO),true)
101 3RD_LIBS += $(MODULEDIR)/rtaudio.a
102 3RD_LIBS += $(MODULEDIR)/rtmidi.a
103 endif
105 ALL_LIBS += $(3RD_LIBS)
107 3rd: $(3RD_LIBS)
108 @$(MAKE) -C source/theme
109 ifeq ($(HAVE_QT4),true)
110 @$(MAKE) -C source/bridges-ui ui_lv2-qt4
111 endif
113 libs: $(ALL_LIBS)
115 $(MODULEDIR)/carla_engine.a: .FORCE
116 @$(MAKE) -C source/backend/engine
118 $(MODULEDIR)/carla_engine_plugin.a: $(MODULEDIR)/carla_engine.a
119 @$(MAKE) -C source/backend/engine
121 $(MODULEDIR)/carla_plugin.a: .FORCE
122 @$(MAKE) -C source/backend/plugin
124 $(MODULEDIR)/jackbridge.a: .FORCE
125 @$(MAKE) -C source/jackbridge
127 $(MODULEDIR)/jackbridge.%.a: .FORCE
128 @$(MAKE) -C source/jackbridge $*
130 $(MODULEDIR)/native-plugins.a: .FORCE
131 @$(MAKE) -C source/native-plugins
133 $(MODULEDIR)/theme.qt4.a: .FORCE
134 @$(MAKE) -C source/theme qt4
136 $(MODULEDIR)/theme.qt5.a: .FORCE
137 @$(MAKE) -C source/theme qt5
139 $(MODULEDIR)/%.arm32.a: .FORCE
140 ifneq ($(WINDOWS),true)
141 @$(MAKE) -C source/modules/$* arm32
142 else
143 $(error Trying to build ARM binaries with a Windows toolchain, this cannot work)
144 endif
146 $(MODULEDIR)/%.posix32.a: .FORCE
147 ifneq ($(WINDOWS),true)
148 @$(MAKE) -C source/modules/$* posix32
149 else
150 $(error Trying to build POSIX binaries with a Windows toolchain, this cannot work)
151 endif
153 $(MODULEDIR)/%.posix64.a: .FORCE
154 ifneq ($(WINDOWS),true)
155 @$(MAKE) -C source/modules/$* posix64
156 else
157 $(error Trying to build POSIX binaries with a Windows toolchain, this cannot work)
158 endif
160 $(MODULEDIR)/%.win32.a: .FORCE
161 ifeq ($(WINDOWS),true)
162 @$(MAKE) -C source/modules/$* win32
163 else
164 $(error Trying to build Windows binaries with a regular toolchain, this cannot work)
165 endif
167 $(MODULEDIR)/%.win64.a: .FORCE
168 ifeq ($(WINDOWS),true)
169 @$(MAKE) -C source/modules/$* win64
170 else
171 $(error Trying to build Windows binaries with a regular toolchain, this cannot work)
172 endif
174 $(MODULEDIR)/dgl.wine.a: .FORCE
175 @$(MAKE) -C source/modules/dgl wine
177 $(MODULEDIR)/water.files.a: .FORCE
178 @$(MAKE) -C source/modules/water files
180 $(MODULEDIR)/%.a: .FORCE
181 @$(MAKE) -C source/modules/$*
183 # ---------------------------------------------------------------------------------------------------------------------
185 backend: libs
186 @$(MAKE) -C source/backend
188 bridges-plugin: libs
189 @$(MAKE) -C source/bridges-plugin
191 bridges-ui: libs
192 @$(MAKE) -C source/bridges-ui
194 discovery: libs
195 @$(MAKE) -C source/discovery
197 frontend: backend
198 ifeq ($(HAVE_FRONTEND),true)
199 @$(MAKE) -C source/frontend
200 endif
202 interposer:
203 ifeq ($(LINUX),true)
204 @$(MAKE) -C source/interposer
205 endif
207 libjack: libs
208 @$(MAKE) -C source/libjack
210 lv2-bundles-dep: $(MODULEDIR)/audio_decoder.a $(MODULEDIR)/water.a $(MODULEDIR)/zita-resampler.a
211 @$(MAKE) -C source/native-plugins bundles
213 lv2-bundles: lv2-bundles-dep
214 @$(MAKE) -C source/plugin bundles
216 plugin: backend bridges-plugin bridges-ui discovery
217 @$(MAKE) -C source/plugin
219 ifeq ($(WINDOWS),true)
220 plugin-wine:
221 @$(MAKE) -C source/plugin wine
222 else
223 plugin-wine: $(MODULEDIR)/dgl.wine.a
224 @$(MAKE) -C source/plugin wine
225 endif
227 rest: libs
228 @$(MAKE) -C source/rest
230 theme: libs
231 @$(MAKE) -C source/theme
233 # ---------------------------------------------------------------------------------------------------------------------
234 # static targets
236 static-backend: libs
237 @$(MAKE) -C source/backend static
239 static-plugin: static-backend
240 @$(MAKE) -C source/plugin static
242 # ---------------------------------------------------------------------------------------------------------------------
243 # hacks
245 msys2fix:
246 rm -rf source/includes/serd
247 rm -rf source/includes/sord
248 rm -rf source/includes/sratom
249 rm -rf source/includes/lilv
250 cp -r source/modules/lilv/serd-0.24.0/serd source/includes/serd
251 cp -r source/modules/lilv/sord-0.16.0/sord source/includes/sord
252 cp -r source/modules/lilv/sratom-0.6.0/sratom source/includes/sratom
253 cp -r source/modules/lilv/lilv-0.24.0/lilv source/includes/lilv
255 # ---------------------------------------------------------------------------------------------------------------------
256 # Binaries (arm32)
258 LIBS_ARM32 = $(MODULEDIR)/jackbridge.arm32.a
259 LIBS_ARM32 += $(MODULEDIR)/lilv.arm32.a
260 LIBS_ARM32 += $(MODULEDIR)/rtmempool.arm32.a
261 LIBS_ARM32 += $(MODULEDIR)/water.arm32.a
263 arm32: $(LIBS_ARM32)
264 $(MAKE) -C source/bridges-plugin arm32
265 $(MAKE) -C source/discovery arm32
267 # ---------------------------------------------------------------------------------------------------------------------
268 # Binaries (posix32)
270 LIBS_POSIX32 = $(MODULEDIR)/jackbridge.posix32.a
271 LIBS_POSIX32 += $(MODULEDIR)/lilv.posix32.a
272 LIBS_POSIX32 += $(MODULEDIR)/rtmempool.posix32.a
273 LIBS_POSIX32 += $(MODULEDIR)/water.posix32.a
275 posix32: $(LIBS_POSIX32)
276 $(MAKE) -C source/bridges-plugin posix32
277 $(MAKE) -C source/discovery posix32
279 # ---------------------------------------------------------------------------------------------------------------------
280 # Binaries (posix64)
282 LIBS_POSIX64 = $(MODULEDIR)/jackbridge.posix64.a
283 LIBS_POSIX64 += $(MODULEDIR)/lilv.posix64.a
284 LIBS_POSIX64 += $(MODULEDIR)/rtmempool.posix64.a
285 LIBS_POSIX64 += $(MODULEDIR)/water.posix64.a
287 posix64: $(LIBS_POSIX64)
288 $(MAKE) -C source/bridges-plugin posix64
289 $(MAKE) -C source/discovery posix64
291 # ---------------------------------------------------------------------------------------------------------------------
292 # Binaries (win32)
294 LIBS_WIN32 += $(MODULEDIR)/lilv.win32.a
295 LIBS_WIN32 += $(MODULEDIR)/rtmempool.win32.a
296 LIBS_WIN32 += $(MODULEDIR)/water.win32.a
298 LIBS_WINE32 = $(LIBS_WIN32) $(MODULEDIR)/jackbridge.win32e.a
299 LIBS_RWIN32 = $(LIBS_WIN32) $(MODULEDIR)/jackbridge.win32.a
301 ifeq ($(CC),x86_64-w64-mingw32-gcc)
302 win32:
303 $(MAKE) AR=i686-w64-mingw32-ar CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ win32-i686
305 win32r:
306 $(MAKE) AR=i686-w64-mingw32-ar CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ win32r-i686
307 else
308 win32: win32-i686
309 win32r: win32r-i686
310 endif
312 win32-i686: $(LIBS_WINE32)
313 $(MAKE) BUILDING_FOR_WINE=true -C source/bridges-plugin win32
314 $(MAKE) BUILDING_FOR_WINE=true -C source/discovery win32
316 win32r-i686: $(LIBS_RWIN32)
317 $(MAKE) -C source/bridges-plugin win32
318 $(MAKE) -C source/discovery win32
320 # ---------------------------------------------------------------------------------------------------------------------
321 # Binaries (win64)
323 LIBS_WIN64 += $(MODULEDIR)/lilv.win64.a
324 LIBS_WIN64 += $(MODULEDIR)/rtmempool.win64.a
325 LIBS_WIN64 += $(MODULEDIR)/water.win64.a
327 LIBS_WINE64 = $(LIBS_WIN64) $(MODULEDIR)/jackbridge.win64e.a
328 LIBS_RWIN64 = $(LIBS_WIN64) $(MODULEDIR)/jackbridge.win64.a
330 win64: $(LIBS_WINE64)
331 $(MAKE) BUILDING_FOR_WINE=true -C source/bridges-plugin win64
332 $(MAKE) BUILDING_FOR_WINE=true -C source/discovery win64
334 win64r: $(LIBS_RWIN64)
335 ifeq ($(CC),i686-w64-mingw32-gcc)
336 $(MAKE) CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ -C source/bridges-plugin win64
337 $(MAKE) CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ -C source/discovery win64
338 else
339 $(MAKE) -C source/bridges-plugin win64
340 $(MAKE) -C source/discovery win64
341 endif
343 # ---------------------------------------------------------------------------------------------------------------------
344 # Binaries (wine)
346 wine32:
347 $(MAKE) -C source/jackbridge wine32
348 cp -f $(MODULEDIR)/jackbridge-wine32.dll$(LIB_EXT) $(CURDIR)/bin/jackbridge-wine32.dll
350 wine64:
351 $(MAKE) -C source/jackbridge wine64
352 cp -f $(MODULEDIR)/jackbridge-wine64.dll$(LIB_EXT) $(CURDIR)/bin/jackbridge-wine64.dll
354 # ---------------------------------------------------------------------------------------------------------------------
356 clean:
357 $(MAKE) clean -C source/backend
358 $(MAKE) clean -C source/bridges-plugin
359 $(MAKE) clean -C source/bridges-ui
360 $(MAKE) clean -C source/jackbridge
361 $(MAKE) clean -C source/modules
362 $(MAKE) clean -C source/native-plugins
363 $(MAKE) clean -C source/plugin
364 ifneq ($(STATIC_PLUGIN_TARGET),true)
365 $(MAKE) clean -C source/discovery
366 $(MAKE) clean -C source/frontend
367 $(MAKE) clean -C source/interposer
368 $(MAKE) clean -C source/libjack
369 $(MAKE) clean -C source/tests
370 $(MAKE) clean -C source/theme
371 endif
372 rm -f *~ source/*~
374 distclean: clean
375 rm -f bin/*.exe bin/*.dll bin/*.dylib bin/*.so
376 rm -rf build build-lv2
378 cpp:
379 $(MAKE) CPPMODE=true
381 debug:
382 $(MAKE) DEBUG=true
384 doxygen:
385 $(MAKE) doxygen -C source/backend
387 tests:
388 $(MAKE) -C source/tests
390 stoat:
391 stoat --recursive ./build/ --suppression ./data/stoat-supression.txt --whitelist ./data/stoat-whitelist.txt --graph-view ./data/stoat-callgraph.png
393 # stoat --recursive ./build/ \
394 # --suppression ./data/stoat-supression.txt \
395 # --whitelist ./data/stoat-whitelist.txt \
396 # --graph-view ./data/stoat-callgraph.png
398 # ---------------------------------------------------------------------------------------------------------------------
400 install_main:
401 # Create directories
402 install -d $(DESTDIR)$(BINDIR)
403 install -d $(DESTDIR)$(DATADIR)/carla/resources
404 ifeq ($(LINUX),true)
405 install -d $(DESTDIR)$(LIBDIR)/carla/jack
406 else
407 install -d $(DESTDIR)$(LIBDIR)/carla
408 endif
409 install -d $(DESTDIR)$(LIBDIR)/pkgconfig
410 install -d $(DESTDIR)$(INCLUDEDIR)/carla/includes
411 install -d $(DESTDIR)$(INCLUDEDIR)/carla/utils
412 ifeq ($(LINUX),true)
413 ifeq ($(HAVE_JACK),true)
414 ifeq ($(JACKBRIDGE_DIRECT),true)
415 install -d $(DESTDIR)$(JACK_LIBDIR)
416 endif
417 endif
418 endif
420 ifeq ($(HAVE_FRONTEND),true)
421 # Create directories (frontend)
422 install -d $(DESTDIR)$(LIBDIR)/carla/styles
423 install -d $(DESTDIR)$(PREFIX)/share/appdata
424 install -d $(DESTDIR)$(DATADIR)/applications
425 install -d $(DESTDIR)$(DATADIR)/icons/hicolor/16x16/apps
426 install -d $(DESTDIR)$(DATADIR)/icons/hicolor/32x32/apps
427 install -d $(DESTDIR)$(DATADIR)/icons/hicolor/48x48/apps
428 install -d $(DESTDIR)$(DATADIR)/icons/hicolor/128x128/apps
429 install -d $(DESTDIR)$(DATADIR)/icons/hicolor/256x256/apps
430 install -d $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps
431 install -d $(DESTDIR)$(DATADIR)/mime/packages
432 install -d $(DESTDIR)$(DATADIR)/carla/resources/translations
433 install -d $(DESTDIR)$(DATADIR)/carla/common
434 install -d $(DESTDIR)$(DATADIR)/carla/dialogs
435 install -d $(DESTDIR)$(DATADIR)/carla/modgui
436 install -d $(DESTDIR)$(DATADIR)/carla/patchcanvas
437 install -d $(DESTDIR)$(DATADIR)/carla/utils
438 install -d $(DESTDIR)$(DATADIR)/carla/widgets
439 endif
441 # -------------------------------------------------------------------------------------------------------------
443 # Install script files (non-gui)
444 install -m 755 \
445 data/carla-single \
446 $(DESTDIR)$(BINDIR)
448 # Adjust PREFIX value in script files (non-gui)
449 sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
450 $(DESTDIR)$(BINDIR)/carla-single
452 # Install backend libs
453 install -m 644 \
454 bin/libcarla_*.* \
455 $(DESTDIR)$(LIBDIR)/carla
457 # Install other binaries
458 install -m 755 \
459 bin/*bridge-* \
460 bin/carla-discovery-* \
461 $(DESTDIR)$(LIBDIR)/carla
463 ifeq ($(LINUX),true)
464 ifeq ($(HAVE_JACK),true)
465 ifeq ($(JACKBRIDGE_DIRECT),true)
466 # Install internal jack client
467 ln -sf \
468 $(LIBDIR)/carla/libcarla_standalone2.so \
469 $(DESTDIR)$(JACK_LIBDIR)/carla.so
470 endif
471 endif
473 ifneq ($(JACKBRIDGE_DIRECT),true)
474 # Install custom libjack
475 install -m 755 \
476 bin/jack/libjack.so.0 \
477 $(DESTDIR)$(LIBDIR)/carla/jack
478 endif
479 endif
481 # Install pkg-config files
482 install -m 644 \
483 data/pkgconfig/*.pc \
484 $(DESTDIR)$(LIBDIR)/pkgconfig
486 # Adjust PREFIX, LIBDIR, INCLUDEDIR and VERSION in pkg-config files
487 sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
488 $(DESTDIR)$(LIBDIR)/pkgconfig/carla-host-plugin.pc \
489 $(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc \
490 $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc \
491 $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
493 sed $(SED_ARGS) 's?X-LIBDIR-X?$(LIBDIR)?' \
494 $(DESTDIR)$(LIBDIR)/pkgconfig/carla-host-plugin.pc \
495 $(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc \
496 $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc \
497 $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
499 sed $(SED_ARGS) 's?X-INCLUDEDIR-X?$(INCLUDEDIR)?' \
500 $(DESTDIR)$(LIBDIR)/pkgconfig/carla-host-plugin.pc \
501 $(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc \
502 $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc \
503 $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
505 sed $(SED_ARGS) 's?X-VERSION-X?$(VERSION)?' \
506 $(DESTDIR)$(LIBDIR)/pkgconfig/carla-host-plugin.pc \
507 $(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc \
508 $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc \
509 $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
511 # Install headers
512 install -m 644 \
513 source/backend/CarlaBackend.h \
514 source/backend/CarlaHost.h \
515 source/backend/CarlaUtils.h \
516 source/backend/CarlaEngine.hpp \
517 source/backend/CarlaPlugin.hpp \
518 source/backend/CarlaPluginPtr.hpp \
519 $(DESTDIR)$(INCLUDEDIR)/carla
521 install -m 644 \
522 source/includes/CarlaDefines.h \
523 source/includes/CarlaMIDI.h \
524 source/includes/CarlaNative.h \
525 source/includes/CarlaNativePlugin.h \
526 $(DESTDIR)$(INCLUDEDIR)/carla/includes
528 install -m 644 \
529 source/utils/CarlaBackendUtils.hpp \
530 source/utils/CarlaBase64Utils.hpp \
531 source/utils/CarlaBinaryUtils.hpp \
532 source/utils/CarlaBridgeDefines.hpp \
533 source/utils/CarlaBridgeUtils.hpp \
534 source/utils/CarlaMacUtils.hpp \
535 source/utils/CarlaMathUtils.hpp \
536 source/utils/CarlaMemUtils.hpp \
537 source/utils/CarlaMutex.hpp \
538 source/utils/CarlaRingBuffer.hpp \
539 source/utils/CarlaProcessUtils.hpp \
540 source/utils/CarlaRunner.hpp \
541 source/utils/CarlaScopeUtils.hpp \
542 source/utils/CarlaSemUtils.hpp \
543 source/utils/CarlaSha1Utils.hpp \
544 source/utils/CarlaShmUtils.hpp \
545 source/utils/CarlaString.hpp \
546 source/utils/CarlaThread.hpp \
547 source/utils/CarlaTimeUtils.hpp \
548 source/utils/CarlaUtils.hpp \
549 $(DESTDIR)$(INCLUDEDIR)/carla/utils
551 # -------------------------------------------------------------------------------------------------------------
553 ifeq ($(HAVE_FRONTEND),true)
554 ifneq ($(CPPMODE),true)
555 # Install script files (gui)
556 install -m 755 \
557 data/carla \
558 data/carla-database \
559 data/carla-jack-multi \
560 data/carla-jack-single \
561 data/carla-jack-patchbayplugin \
562 data/carla-osc-gui \
563 data/carla-patchbay \
564 data/carla-rack \
565 data/carla-settings \
566 $(DESTDIR)$(BINDIR)
568 # Adjust PREFIX value in script files (gui)
569 sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
570 $(DESTDIR)$(BINDIR)/carla \
571 $(DESTDIR)$(BINDIR)/carla-database \
572 $(DESTDIR)$(BINDIR)/carla-jack-multi \
573 $(DESTDIR)$(BINDIR)/carla-jack-single \
574 $(DESTDIR)$(BINDIR)/carla-jack-patchbayplugin \
575 $(DESTDIR)$(BINDIR)/carla-osc-gui \
576 $(DESTDIR)$(BINDIR)/carla-patchbay \
577 $(DESTDIR)$(BINDIR)/carla-rack \
578 $(DESTDIR)$(BINDIR)/carla-settings
580 ifeq ($(HAVE_LIBLO),true)
581 install -m 755 \
582 data/carla-control \
583 $(DESTDIR)$(BINDIR)
585 sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
586 $(DESTDIR)$(BINDIR)/carla-control
587 endif
589 # Install the real modgui bridge
590 install -m 755 \
591 data/carla-bridge-lv2-modgui \
592 $(DESTDIR)$(LIBDIR)/carla
594 sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
595 $(DESTDIR)$(LIBDIR)/carla/carla-bridge-lv2-modgui
597 # Install frontend
598 install -m 644 \
599 source/frontend/carla \
600 source/frontend/carla-control \
601 source/frontend/carla-jack-multi \
602 source/frontend/carla-jack-single \
603 source/frontend/carla-patchbay \
604 source/frontend/carla-rack \
605 source/frontend/*.py \
606 $(DESTDIR)$(DATADIR)/carla/
608 install -m 644 \
609 source/frontend/common/*.py \
610 $(DESTDIR)$(DATADIR)/carla/common/
612 install -m 644 \
613 source/frontend/dialogs/*.py \
614 $(DESTDIR)$(DATADIR)/carla/dialogs/
616 install -m 644 \
617 source/frontend/modgui/*.py \
618 $(DESTDIR)$(DATADIR)/carla/modgui/
620 install -m 644 \
621 source/frontend/patchcanvas/*.py \
622 $(DESTDIR)$(DATADIR)/carla/patchcanvas/
624 install -m 644 \
625 source/frontend/utils/*.py \
626 $(DESTDIR)$(DATADIR)/carla/utils/
628 install -m 644 \
629 source/frontend/widgets/*.py \
630 $(DESTDIR)$(DATADIR)/carla/widgets/
632 # Adjust LIBDIR and DATADIR value in python code
633 sed $(SED_ARGS) 's?X_LIBDIR_X = None?X_LIBDIR_X = "$(LIBDIR)"?' \
634 $(DESTDIR)$(DATADIR)/carla/carla_shared.py
636 sed $(SED_ARGS) 's?X_DATADIR_X = None?X_DATADIR_X = "$(DATADIR)"?' \
637 $(DESTDIR)$(DATADIR)/carla/carla_shared.py
639 # Install resources (gui)
640 install -m 755 \
641 bin/resources/carla-plugin \
642 bin/resources/carla-plugin-patchbay \
643 bin/resources/*-ui \
644 $(DESTDIR)$(DATADIR)/carla/resources
645 endif # CPPMODE
647 ifeq ($(HAVE_THEME),true)
648 # Install theme
649 install -m 644 \
650 bin/styles/* \
651 $(DESTDIR)$(LIBDIR)/carla/styles
652 endif
654 # Install desktop files
655 install -m 644 data/desktop/carla.desktop $(DESTDIR)$(DATADIR)/applications
656 install -m 644 data/desktop/carla-rack.desktop $(DESTDIR)$(DATADIR)/applications
657 install -m 644 data/desktop/carla-patchbay.desktop $(DESTDIR)$(DATADIR)/applications
658 install -m 644 data/desktop/carla-jack-single.desktop $(DESTDIR)$(DATADIR)/applications
659 install -m 644 data/desktop/carla-jack-multi.desktop $(DESTDIR)$(DATADIR)/applications
660 ifeq ($(HAVE_LIBLO),true)
661 install -m 644 data/desktop/carla-control.desktop $(DESTDIR)$(DATADIR)/applications
662 endif
664 # Install app data
665 sed -e 's?X-VERSION-X?$(VERSION)?' \
666 data/appdata.xml.in > $(DESTDIR)$(PREFIX)/share/appdata/studio.kx.carla.appdata.xml
668 # Install mime package
669 install -m 644 data/carla.xml $(DESTDIR)$(DATADIR)/mime/packages
671 # Install icons, 16x16
672 install -m 644 resources/16x16/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/16x16/apps
673 install -m 644 resources/16x16/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/16x16/apps
675 # Install icons, 32x32
676 install -m 644 resources/32x32/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/32x32/apps
677 install -m 644 resources/32x32/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/32x32/apps
679 # Install icons, 48x48
680 install -m 644 resources/48x48/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/48x48/apps
681 install -m 644 resources/48x48/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/48x48/apps
683 # Install icons, 128x128
684 install -m 644 resources/128x128/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/128x128/apps
685 install -m 644 resources/128x128/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/128x128/apps
687 # Install icons, 256x256
688 install -m 644 resources/256x256/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/256x256/apps
689 install -m 644 resources/256x256/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/256x256/apps
691 # Install icons, scalable
692 install -m 644 resources/scalable/carla.svg $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps
693 install -m 644 resources/scalable/carla-control.svg $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps
695 # Install resources (re-use python files)
696 $(LINK) ../common $(DESTDIR)$(DATADIR)/carla/resources
697 $(LINK) ../dialogs $(DESTDIR)$(DATADIR)/carla/resources
698 $(LINK) ../modgui $(DESTDIR)$(DATADIR)/carla/resources
699 $(LINK) ../patchcanvas $(DESTDIR)$(DATADIR)/carla/resources
700 $(LINK) ../utils $(DESTDIR)$(DATADIR)/carla/resources
701 $(LINK) ../widgets $(DESTDIR)$(DATADIR)/carla/resources
702 $(LINK) ../carla_app.py $(DESTDIR)$(DATADIR)/carla/resources
703 $(LINK) ../carla_backend.py $(DESTDIR)$(DATADIR)/carla/resources
704 $(LINK) ../carla_backend_qt.py $(DESTDIR)$(DATADIR)/carla/resources
705 $(LINK) ../carla_frontend.py $(DESTDIR)$(DATADIR)/carla/resources
706 $(LINK) ../carla_host.py $(DESTDIR)$(DATADIR)/carla/resources
707 $(LINK) ../carla_host_control.py $(DESTDIR)$(DATADIR)/carla/resources
708 $(LINK) ../carla_settings.py $(DESTDIR)$(DATADIR)/carla/resources
709 $(LINK) ../carla_skin.py $(DESTDIR)$(DATADIR)/carla/resources
710 $(LINK) ../carla_shared.py $(DESTDIR)$(DATADIR)/carla/resources
711 $(LINK) ../carla_utils.py $(DESTDIR)$(DATADIR)/carla/resources
712 $(LINK) ../carla_widgets.py $(DESTDIR)$(DATADIR)/carla/resources
713 $(LINK) ../externalui.py $(DESTDIR)$(DATADIR)/carla/resources
714 $(LINK) ../resources_rc.py $(DESTDIR)$(DATADIR)/carla/resources
715 $(LINK) ../ui_carla_about.py $(DESTDIR)$(DATADIR)/carla/resources
716 $(LINK) ../ui_carla_edit.py $(DESTDIR)$(DATADIR)/carla/resources
717 $(LINK) ../ui_carla_host.py $(DESTDIR)$(DATADIR)/carla/resources
718 $(LINK) ../ui_carla_parameter.py $(DESTDIR)$(DATADIR)/carla/resources
719 $(LINK) ../ui_carla_plugin_calf.py $(DESTDIR)$(DATADIR)/carla/resources
720 $(LINK) ../ui_carla_plugin_classic.py $(DESTDIR)$(DATADIR)/carla/resources
721 $(LINK) ../ui_carla_plugin_compact.py $(DESTDIR)$(DATADIR)/carla/resources
722 $(LINK) ../ui_carla_plugin_default.py $(DESTDIR)$(DATADIR)/carla/resources
723 $(LINK) ../ui_carla_plugin_presets.py $(DESTDIR)$(DATADIR)/carla/resources
724 $(LINK) ../ui_carla_settings.py $(DESTDIR)$(DATADIR)/carla/resources
725 $(LINK) ../ui_carla_settings_driver.py $(DESTDIR)$(DATADIR)/carla/resources
726 $(LINK) ../ui_inputdialog_value.py $(DESTDIR)$(DATADIR)/carla/resources
727 $(LINK) ../ui_midipattern.py $(DESTDIR)$(DATADIR)/carla/resources
728 $(LINK) ../ui_xycontroller.py $(DESTDIR)$(DATADIR)/carla/resources
730 # Install translations
731 $(foreach l,$(I18N_LANGUAGES),install -m 644 \
732 source/frontend/translations/carla_$(l).qm \
733 $(DESTDIR)$(DATADIR)/carla/resources/translations/;)
735 # Link resources for internal plugin
736 rm -rf $(DESTDIR)$(LIBDIR)/carla/resources
737 $(LINK) ../../share/carla/resources $(DESTDIR)$(LIBDIR)/carla/resources
738 endif # HAVE_FRONTEND
740 # -------------------------------------------------------------------------------------------------------------
742 ifeq ($(CAN_GENERATE_LV2_TTL),true)
743 # Install lv2 plugin
744 install -d $(DESTDIR)$(LIBDIR)/lv2/carla.lv2
746 install -m 644 \
747 bin/carla.lv2/carla.* \
748 bin/carla.lv2/*.ttl \
749 $(DESTDIR)$(LIBDIR)/lv2/carla.lv2
751 # Link binaries for lv2 plugin
752 @for i in `find $(DESTDIR)$(LIBDIR)/carla/ -maxdepth 1 -type f -exec basename {} ';'`; do \
753 $(LINK) ../../carla/$$i $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/$$i; \
754 done
755 rm -f $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/libcarla_standalone2.*
757 ifeq ($(LINUX),true)
758 # Link jack app bridge
759 rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/jack
760 $(LINK) ../../carla/jack $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/jack
761 endif
762 endif # CAN_GENERATE_LV2_TTL
764 ifeq ($(HAVE_FRONTEND),true)
765 # Link resources for lv2 plugin
766 rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/resources
767 $(LINK) ../../../share/carla/resources $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/resources
769 # Link styles for lv2 plugin
770 rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/styles
771 $(LINK) ../../carla/styles $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/styles
772 endif
774 # -------------------------------------------------------------------------------------------------------------
776 ifneq ($(HAIKU),true)
777 ifeq ($(HAVE_FRONTEND),true)
778 # Install vst plugin
779 install -d $(DESTDIR)$(LIBDIR)/vst/carla.vst
781 install -m 644 \
782 bin/CarlaRack*.* \
783 bin/CarlaPatchbay*.* \
784 $(DESTDIR)$(LIBDIR)/vst/carla.vst
786 # Link binaries for vst plugin
787 @for i in `find $(DESTDIR)$(LIBDIR)/carla/ -maxdepth 1 -type f -exec basename {} ';'`; do \
788 $(LINK) ../../carla/$$i $(DESTDIR)$(LIBDIR)/vst/carla.vst/$$i; \
789 done
790 rm -f $(DESTDIR)$(LIBDIR)/vst/carla.vst/libcarla_standalone2.*
792 # Link jack app bridge
793 rm -rf $(DESTDIR)$(LIBDIR)/vst/carla.vst/jack
794 $(LINK) ../../carla/jack $(DESTDIR)$(LIBDIR)/vst/carla.vst/jack
796 # Link resources for vst plugin
797 rm -rf $(DESTDIR)$(LIBDIR)/vst/carla.vst/resources
798 $(LINK) ../../../share/carla/resources $(DESTDIR)$(LIBDIR)/vst/carla.vst/resources
800 # Link styles for vst plugin
801 rm -rf $(DESTDIR)$(LIBDIR)/vst/carla.vst/styles
802 $(LINK) ../../carla/styles $(DESTDIR)$(LIBDIR)/vst/carla.vst/styles
803 endif
804 endif
806 # -------------------------------------------------------------------------------------------------------------
808 ifneq ($(HAVE_FRONTEND),true)
809 # Remove gui files for non-gui build
810 rm $(DESTDIR)$(LIBDIR)/carla/carla-bridge-lv2-modgui
811 ifeq ($(CAN_GENERATE_LV2_TTL),true)
812 rm $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/carla-bridge-lv2-modgui
813 endif
814 endif
816 # ---------------------------------------------------------------------------------------------------------------------
818 ifneq ($(EXTERNAL_PLUGINS),true)
819 install_external_plugins:
820 endif
822 install: install_main install_external_plugins
824 # ---------------------------------------------------------------------------------------------------------------------
826 uninstall:
827 rm -f $(DESTDIR)$(BINDIR)/carla*
828 rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/carla-host-plugin.pc
829 rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc
830 rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc
831 rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
832 rm -f $(DESTDIR)$(DATADIR)/applications/carla.desktop
833 rm -f $(DESTDIR)$(DATADIR)/applications/carla-control.desktop
834 rm -f $(DESTDIR)$(DATADIR)/icons/hicolor/*/apps/carla.png
835 rm -f $(DESTDIR)$(DATADIR)/icons/hicolor/*/apps/carla-control.png
836 rm -f $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps/carla.svg
837 rm -f $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps/carla-control.svg
838 rm -f $(DESTDIR)$(DATADIR)/mime/packages/carla.xml
839 rm -rf $(DESTDIR)$(LIBDIR)/carla
840 rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla.lv2
841 rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla-native.lv2
842 rm -rf $(DESTDIR)$(LIBDIR)/vst/carla.vst
843 rm -rf $(DESTDIR)$(DATADIR)/carla
844 rm -rf $(DESTDIR)$(INCLUDEDIR)/carla
846 # ----------------------------------------------------------------------------------------------------------------------------
848 ifeq ($(MACOS),true)
849 ifneq ($(MACOS_OLD),true)
850 HAVE_DIST = true
851 endif
852 endif
854 ifeq ($(WINDOWS),true)
855 HAVE_DIST = true
856 endif
858 ifeq ($(HAVE_DIST),true)
859 include Makefile.dist.mk
860 else
861 dist:
862 endif
864 include Makefile.print.mk
866 # ---------------------------------------------------------------------------------------------------------------------
868 .FORCE:
869 .PHONY: .FORCE
871 # ---------------------------------------------------------------------------------------------------------------------