Start basic AU loader code
[carla.git] / Makefile
blob59e8e3e141a709ccd4487fdb0772dc9832885716
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_RTAUDIO),true)
86 3RD_LIBS += $(MODULEDIR)/rtaudio.a
87 3RD_LIBS += $(MODULEDIR)/rtmidi.a
88 endif
90 ALL_LIBS += $(3RD_LIBS)
92 3rd: $(3RD_LIBS)
93 @$(MAKE) -C source/theme
94 ifeq ($(HAVE_QT4),true)
95 @$(MAKE) -C source/bridges-ui ui_lv2-qt4
96 endif
98 libs: $(ALL_LIBS)
100 $(MODULEDIR)/carla_engine.a: .FORCE
101 @$(MAKE) -C source/backend/engine
103 $(MODULEDIR)/carla_engine_plugin.a: $(MODULEDIR)/carla_engine.a
104 @$(MAKE) -C source/backend/engine
106 $(MODULEDIR)/carla_plugin.a: .FORCE
107 @$(MAKE) -C source/backend/plugin
109 $(MODULEDIR)/jackbridge.a: .FORCE
110 @$(MAKE) -C source/jackbridge
112 $(MODULEDIR)/jackbridge.%.a: .FORCE
113 @$(MAKE) -C source/jackbridge $*
115 $(MODULEDIR)/native-plugins.a: .FORCE
116 @$(MAKE) -C source/native-plugins
118 $(MODULEDIR)/theme.qt4.a: .FORCE
119 @$(MAKE) -C source/theme qt4
121 $(MODULEDIR)/theme.qt5.a: .FORCE
122 @$(MAKE) -C source/theme qt5
124 $(MODULEDIR)/%.arm32.a: .FORCE
125 ifneq ($(WINDOWS),true)
126 @$(MAKE) -C source/modules/$* arm32
127 else
128 $(error Trying to build ARM binaries with a Windows toolchain, this cannot work)
129 endif
131 $(MODULEDIR)/%.posix32.a: .FORCE
132 ifneq ($(WINDOWS),true)
133 @$(MAKE) -C source/modules/$* posix32
134 else
135 $(error Trying to build POSIX binaries with a Windows toolchain, this cannot work)
136 endif
138 $(MODULEDIR)/%.posix64.a: .FORCE
139 ifneq ($(WINDOWS),true)
140 @$(MAKE) -C source/modules/$* posix64
141 else
142 $(error Trying to build POSIX binaries with a Windows toolchain, this cannot work)
143 endif
145 $(MODULEDIR)/%.win32.a: .FORCE
146 ifeq ($(WINDOWS),true)
147 @$(MAKE) -C source/modules/$* win32
148 else
149 $(error Trying to build Windows binaries with a regular toolchain, this cannot work)
150 endif
152 $(MODULEDIR)/%.win64.a: .FORCE
153 ifeq ($(WINDOWS),true)
154 @$(MAKE) -C source/modules/$* win64
155 else
156 $(error Trying to build Windows binaries with a regular toolchain, this cannot work)
157 endif
159 $(MODULEDIR)/dgl.wine.a: .FORCE
160 @$(MAKE) -C source/modules/dgl wine
162 $(MODULEDIR)/water.files.a: .FORCE
163 @$(MAKE) -C source/modules/water files
165 $(MODULEDIR)/%.a: .FORCE
166 @$(MAKE) -C source/modules/$*
168 # ---------------------------------------------------------------------------------------------------------------------
170 backend: libs
171 @$(MAKE) -C source/backend
173 bridges-plugin: libs
174 @$(MAKE) -C source/bridges-plugin
176 bridges-ui: libs
177 @$(MAKE) -C source/bridges-ui
179 discovery: libs
180 @$(MAKE) -C source/discovery
182 frontend: backend
183 ifeq ($(HAVE_FRONTEND),true)
184 @$(MAKE) -C source/frontend
185 endif
187 interposer:
188 ifeq ($(LINUX),true)
189 @$(MAKE) -C source/interposer
190 endif
192 libjack: libs
193 @$(MAKE) -C source/libjack
195 lv2-bundles-dep: $(MODULEDIR)/audio_decoder.a $(MODULEDIR)/water.a $(MODULEDIR)/zita-resampler.a
196 @$(MAKE) -C source/native-plugins bundles
198 lv2-bundles: lv2-bundles-dep
199 @$(MAKE) -C source/plugin bundles
201 plugin: backend bridges-plugin bridges-ui discovery
202 @$(MAKE) -C source/plugin
204 ifeq ($(WINDOWS),true)
205 plugin-wine:
206 @$(MAKE) -C source/plugin wine
207 else
208 plugin-wine: $(MODULEDIR)/dgl.wine.a
209 @$(MAKE) -C source/plugin wine
210 endif
212 rest: libs
213 @$(MAKE) -C source/rest
215 theme: libs
216 @$(MAKE) -C source/theme
218 # ---------------------------------------------------------------------------------------------------------------------
219 # static targets
221 static-backend: libs
222 @$(MAKE) -C source/backend static
224 static-plugin: static-backend
225 @$(MAKE) -C source/plugin static
227 # ---------------------------------------------------------------------------------------------------------------------
228 # hacks
230 msys2fix:
231 rm -rf source/includes/serd
232 rm -rf source/includes/sord
233 rm -rf source/includes/sratom
234 rm -rf source/includes/lilv
235 cp -r source/modules/lilv/serd-0.24.0/serd source/includes/serd
236 cp -r source/modules/lilv/sord-0.16.0/sord source/includes/sord
237 cp -r source/modules/lilv/sratom-0.6.0/sratom source/includes/sratom
238 cp -r source/modules/lilv/lilv-0.24.0/lilv source/includes/lilv
240 # ---------------------------------------------------------------------------------------------------------------------
241 # Binaries (arm32)
243 LIBS_ARM32 = $(MODULEDIR)/jackbridge.arm32.a
244 LIBS_ARM32 += $(MODULEDIR)/lilv.arm32.a
245 LIBS_ARM32 += $(MODULEDIR)/rtmempool.arm32.a
246 LIBS_ARM32 += $(MODULEDIR)/water.arm32.a
248 arm32: $(LIBS_ARM32)
249 $(MAKE) -C source/bridges-plugin arm32
250 $(MAKE) -C source/discovery arm32
252 # ---------------------------------------------------------------------------------------------------------------------
253 # Binaries (posix32)
255 LIBS_POSIX32 = $(MODULEDIR)/jackbridge.posix32.a
256 LIBS_POSIX32 += $(MODULEDIR)/lilv.posix32.a
257 LIBS_POSIX32 += $(MODULEDIR)/rtmempool.posix32.a
258 LIBS_POSIX32 += $(MODULEDIR)/water.posix32.a
260 posix32: $(LIBS_POSIX32)
261 $(MAKE) -C source/bridges-plugin posix32
262 $(MAKE) -C source/discovery posix32
264 # ---------------------------------------------------------------------------------------------------------------------
265 # Binaries (posix64)
267 LIBS_POSIX64 = $(MODULEDIR)/jackbridge.posix64.a
268 LIBS_POSIX64 += $(MODULEDIR)/lilv.posix64.a
269 LIBS_POSIX64 += $(MODULEDIR)/rtmempool.posix64.a
270 LIBS_POSIX64 += $(MODULEDIR)/water.posix64.a
272 posix64: $(LIBS_POSIX64)
273 $(MAKE) -C source/bridges-plugin posix64
274 $(MAKE) -C source/discovery posix64
276 # ---------------------------------------------------------------------------------------------------------------------
277 # Binaries (win32)
279 LIBS_WIN32 += $(MODULEDIR)/lilv.win32.a
280 LIBS_WIN32 += $(MODULEDIR)/rtmempool.win32.a
281 LIBS_WIN32 += $(MODULEDIR)/water.win32.a
283 LIBS_WINE32 = $(LIBS_WIN32) $(MODULEDIR)/jackbridge.win32e.a
284 LIBS_RWIN32 = $(LIBS_WIN32) $(MODULEDIR)/jackbridge.win32.a
286 ifeq ($(CC),x86_64-w64-mingw32-gcc)
287 win32:
288 $(MAKE) AR=i686-w64-mingw32-ar CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ win32-i686
290 win32r:
291 $(MAKE) AR=i686-w64-mingw32-ar CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ win32r-i686
292 else
293 win32: win32-i686
294 win32r: win32r-i686
295 endif
297 win32-i686: $(LIBS_WINE32)
298 $(MAKE) BUILDING_FOR_WINE=true -C source/bridges-plugin win32
299 $(MAKE) BUILDING_FOR_WINE=true -C source/discovery win32
301 win32r-i686: $(LIBS_RWIN32)
302 $(MAKE) -C source/bridges-plugin win32
303 $(MAKE) -C source/discovery win32
305 # ---------------------------------------------------------------------------------------------------------------------
306 # Binaries (win64)
308 LIBS_WIN64 += $(MODULEDIR)/lilv.win64.a
309 LIBS_WIN64 += $(MODULEDIR)/rtmempool.win64.a
310 LIBS_WIN64 += $(MODULEDIR)/water.win64.a
312 LIBS_WINE64 = $(LIBS_WIN64) $(MODULEDIR)/jackbridge.win64e.a
313 LIBS_RWIN64 = $(LIBS_WIN64) $(MODULEDIR)/jackbridge.win64.a
315 win64: $(LIBS_WINE64)
316 $(MAKE) BUILDING_FOR_WINE=true -C source/bridges-plugin win64
317 $(MAKE) BUILDING_FOR_WINE=true -C source/discovery win64
319 win64r: $(LIBS_RWIN64)
320 ifeq ($(CC),i686-w64-mingw32-gcc)
321 $(MAKE) CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ -C source/bridges-plugin win64
322 $(MAKE) CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ -C source/discovery win64
323 else
324 $(MAKE) -C source/bridges-plugin win64
325 $(MAKE) -C source/discovery win64
326 endif
328 mingw64:
329 $(MAKE) AR=i686-w64-mingw32-ar CC=i686-w64-mingw32-gcc CXX=i686-w64-mingw32-g++ win32
330 $(MAKE) AR=x86_64-w64-mingw32-ar CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ win64
332 # ---------------------------------------------------------------------------------------------------------------------
333 # Binaries (wine)
335 wine32:
336 $(MAKE) -C source/jackbridge wine32
337 cp -f $(MODULEDIR)/jackbridge-wine32.dll$(LIB_EXT) $(CURDIR)/bin/jackbridge-wine32.dll
339 wine64:
340 $(MAKE) -C source/jackbridge wine64
341 cp -f $(MODULEDIR)/jackbridge-wine64.dll$(LIB_EXT) $(CURDIR)/bin/jackbridge-wine64.dll
343 # ---------------------------------------------------------------------------------------------------------------------
345 clean:
346 $(MAKE) clean -C source/backend
347 $(MAKE) clean -C source/bridges-plugin
348 $(MAKE) clean -C source/bridges-ui
349 $(MAKE) clean -C source/jackbridge
350 $(MAKE) clean -C source/modules
351 $(MAKE) clean -C source/native-plugins
352 $(MAKE) clean -C source/plugin
353 ifneq ($(STATIC_PLUGIN_TARGET),true)
354 $(MAKE) clean -C source/discovery
355 $(MAKE) clean -C source/frontend
356 $(MAKE) clean -C source/interposer
357 $(MAKE) clean -C source/libjack
358 $(MAKE) clean -C source/tests
359 $(MAKE) clean -C source/theme
360 endif
361 rm -f *~ source/*~
363 distclean: clean
364 rm -f bin/*.exe bin/*.dll bin/*.dylib bin/*.so
365 rm -rf build build-lv2
367 cpp:
368 $(MAKE) CPPMODE=true
370 debug:
371 $(MAKE) DEBUG=true
373 doxygen:
374 $(MAKE) doxygen -C source/backend
376 tests:
377 $(MAKE) -C source/tests
379 stoat:
380 stoat --recursive ./build/ --suppression ./data/stoat-supression.txt --whitelist ./data/stoat-whitelist.txt --graph-view ./data/stoat-callgraph.png
382 # stoat --recursive ./build/ \
383 # --suppression ./data/stoat-supression.txt \
384 # --whitelist ./data/stoat-whitelist.txt \
385 # --graph-view ./data/stoat-callgraph.png
387 # ---------------------------------------------------------------------------------------------------------------------
389 install_main:
390 # Create directories
391 install -d $(DESTDIR)$(BINDIR)
392 install -d $(DESTDIR)$(DATADIR)/carla/resources
393 ifeq ($(LINUX),true)
394 install -d $(DESTDIR)$(LIBDIR)/carla/jack
395 else
396 install -d $(DESTDIR)$(LIBDIR)/carla
397 endif
398 install -d $(DESTDIR)$(LIBDIR)/pkgconfig
399 install -d $(DESTDIR)$(INCLUDEDIR)/carla/includes
400 install -d $(DESTDIR)$(INCLUDEDIR)/carla/utils
401 ifeq ($(LINUX),true)
402 ifeq ($(HAVE_JACK),true)
403 ifeq ($(JACKBRIDGE_DIRECT),true)
404 install -d $(DESTDIR)$(JACK_LIBDIR)
405 endif
406 endif
407 endif
409 ifeq ($(HAVE_FRONTEND),true)
410 # Create directories (frontend)
411 install -d $(DESTDIR)$(LIBDIR)/carla/styles
412 install -d $(DESTDIR)$(PREFIX)/share/appdata
413 install -d $(DESTDIR)$(DATADIR)/applications
414 install -d $(DESTDIR)$(DATADIR)/icons/hicolor/16x16/apps
415 install -d $(DESTDIR)$(DATADIR)/icons/hicolor/32x32/apps
416 install -d $(DESTDIR)$(DATADIR)/icons/hicolor/48x48/apps
417 install -d $(DESTDIR)$(DATADIR)/icons/hicolor/128x128/apps
418 install -d $(DESTDIR)$(DATADIR)/icons/hicolor/256x256/apps
419 install -d $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps
420 install -d $(DESTDIR)$(DATADIR)/mime/packages
421 install -d $(DESTDIR)$(DATADIR)/carla/resources/translations
422 install -d $(DESTDIR)$(DATADIR)/carla/common
423 install -d $(DESTDIR)$(DATADIR)/carla/dialogs
424 install -d $(DESTDIR)$(DATADIR)/carla/modgui
425 install -d $(DESTDIR)$(DATADIR)/carla/patchcanvas
426 install -d $(DESTDIR)$(DATADIR)/carla/utils
427 install -d $(DESTDIR)$(DATADIR)/carla/widgets
428 endif
430 # -------------------------------------------------------------------------------------------------------------
432 # Install script files (non-gui)
433 install -m 755 \
434 data/carla-single \
435 $(DESTDIR)$(BINDIR)
437 # Adjust PREFIX value in script files (non-gui)
438 sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
439 $(DESTDIR)$(BINDIR)/carla-single
441 # Install backend libs
442 install -m 644 \
443 bin/libcarla_*.* \
444 $(DESTDIR)$(LIBDIR)/carla
446 # Install other binaries
447 install -m 755 \
448 bin/*bridge-* \
449 bin/carla-discovery-* \
450 $(DESTDIR)$(LIBDIR)/carla
452 ifeq ($(LINUX),true)
453 ifeq ($(HAVE_JACK),true)
454 ifeq ($(JACKBRIDGE_DIRECT),true)
455 # Install internal jack client
456 ln -sf \
457 $(LIBDIR)/carla/libcarla_standalone2.so \
458 $(DESTDIR)$(JACK_LIBDIR)/carla.so
459 endif
460 endif
462 ifneq ($(JACKBRIDGE_DIRECT),true)
463 # Install custom libjack
464 install -m 755 \
465 bin/jack/libjack.so.0 \
466 $(DESTDIR)$(LIBDIR)/carla/jack
467 endif
468 endif
470 # Install pkg-config files
471 install -m 644 \
472 data/pkgconfig/*.pc \
473 $(DESTDIR)$(LIBDIR)/pkgconfig
475 # Adjust PREFIX, LIBDIR, INCLUDEDIR and VERSION in pkg-config files
476 sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
477 $(DESTDIR)$(LIBDIR)/pkgconfig/carla-host-plugin.pc \
478 $(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc \
479 $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc \
480 $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
482 sed $(SED_ARGS) 's?X-LIBDIR-X?$(LIBDIR)?' \
483 $(DESTDIR)$(LIBDIR)/pkgconfig/carla-host-plugin.pc \
484 $(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc \
485 $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc \
486 $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
488 sed $(SED_ARGS) 's?X-INCLUDEDIR-X?$(INCLUDEDIR)?' \
489 $(DESTDIR)$(LIBDIR)/pkgconfig/carla-host-plugin.pc \
490 $(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc \
491 $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc \
492 $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
494 sed $(SED_ARGS) 's?X-VERSION-X?$(VERSION)?' \
495 $(DESTDIR)$(LIBDIR)/pkgconfig/carla-host-plugin.pc \
496 $(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc \
497 $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc \
498 $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
500 # Install headers
501 install -m 644 \
502 source/backend/CarlaBackend.h \
503 source/backend/CarlaHost.h \
504 source/backend/CarlaUtils.h \
505 source/backend/CarlaEngine.hpp \
506 source/backend/CarlaPlugin.hpp \
507 source/backend/CarlaPluginPtr.hpp \
508 $(DESTDIR)$(INCLUDEDIR)/carla
510 install -m 644 \
511 source/includes/CarlaDefines.h \
512 source/includes/CarlaMIDI.h \
513 source/includes/CarlaNative.h \
514 source/includes/CarlaNativePlugin.h \
515 $(DESTDIR)$(INCLUDEDIR)/carla/includes
517 install -m 644 \
518 source/utils/CarlaBackendUtils.hpp \
519 source/utils/CarlaBase64Utils.hpp \
520 source/utils/CarlaBinaryUtils.hpp \
521 source/utils/CarlaBridgeDefines.hpp \
522 source/utils/CarlaBridgeUtils.hpp \
523 source/utils/CarlaMacUtils.hpp \
524 source/utils/CarlaMathUtils.hpp \
525 source/utils/CarlaMemUtils.hpp \
526 source/utils/CarlaMutex.hpp \
527 source/utils/CarlaRingBuffer.hpp \
528 source/utils/CarlaProcessUtils.hpp \
529 source/utils/CarlaRunner.hpp \
530 source/utils/CarlaScopeUtils.hpp \
531 source/utils/CarlaSemUtils.hpp \
532 source/utils/CarlaSha1Utils.hpp \
533 source/utils/CarlaShmUtils.hpp \
534 source/utils/CarlaString.hpp \
535 source/utils/CarlaThread.hpp \
536 source/utils/CarlaTimeUtils.hpp \
537 source/utils/CarlaUtils.hpp \
538 $(DESTDIR)$(INCLUDEDIR)/carla/utils
540 # -------------------------------------------------------------------------------------------------------------
542 ifeq ($(HAVE_FRONTEND),true)
543 ifneq ($(CPPMODE),true)
544 # Install script files (gui)
545 install -m 755 \
546 data/carla \
547 data/carla-database \
548 data/carla-jack-multi \
549 data/carla-jack-single \
550 data/carla-jack-patchbayplugin \
551 data/carla-osc-gui \
552 data/carla-patchbay \
553 data/carla-rack \
554 data/carla-settings \
555 $(DESTDIR)$(BINDIR)
557 # Adjust PREFIX value in script files (gui)
558 sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
559 $(DESTDIR)$(BINDIR)/carla \
560 $(DESTDIR)$(BINDIR)/carla-database \
561 $(DESTDIR)$(BINDIR)/carla-jack-multi \
562 $(DESTDIR)$(BINDIR)/carla-jack-single \
563 $(DESTDIR)$(BINDIR)/carla-jack-patchbayplugin \
564 $(DESTDIR)$(BINDIR)/carla-osc-gui \
565 $(DESTDIR)$(BINDIR)/carla-patchbay \
566 $(DESTDIR)$(BINDIR)/carla-rack \
567 $(DESTDIR)$(BINDIR)/carla-settings
569 ifeq ($(HAVE_LIBLO),true)
570 install -m 755 \
571 data/carla-control \
572 $(DESTDIR)$(BINDIR)
574 sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
575 $(DESTDIR)$(BINDIR)/carla-control
576 endif
578 # Install the real modgui bridge
579 install -m 755 \
580 data/carla-bridge-lv2-modgui \
581 $(DESTDIR)$(LIBDIR)/carla
583 sed $(SED_ARGS) 's?X-PREFIX-X?$(PREFIX)?' \
584 $(DESTDIR)$(LIBDIR)/carla/carla-bridge-lv2-modgui
586 # Install frontend
587 install -m 644 \
588 source/frontend/carla \
589 source/frontend/carla-control \
590 source/frontend/carla-jack-multi \
591 source/frontend/carla-jack-single \
592 source/frontend/carla-patchbay \
593 source/frontend/carla-rack \
594 source/frontend/*.py \
595 $(DESTDIR)$(DATADIR)/carla/
597 install -m 644 \
598 source/frontend/common/*.py \
599 $(DESTDIR)$(DATADIR)/carla/common/
601 install -m 644 \
602 source/frontend/dialogs/*.py \
603 $(DESTDIR)$(DATADIR)/carla/dialogs/
605 install -m 644 \
606 source/frontend/modgui/*.py \
607 $(DESTDIR)$(DATADIR)/carla/modgui/
609 install -m 644 \
610 source/frontend/patchcanvas/*.py \
611 $(DESTDIR)$(DATADIR)/carla/patchcanvas/
613 install -m 644 \
614 source/frontend/utils/*.py \
615 $(DESTDIR)$(DATADIR)/carla/utils/
617 install -m 644 \
618 source/frontend/widgets/*.py \
619 $(DESTDIR)$(DATADIR)/carla/widgets/
621 # Adjust LIBDIR and DATADIR value in python code
622 sed $(SED_ARGS) 's?X_LIBDIR_X = None?X_LIBDIR_X = "$(LIBDIR)"?' \
623 $(DESTDIR)$(DATADIR)/carla/carla_shared.py
625 sed $(SED_ARGS) 's?X_DATADIR_X = None?X_DATADIR_X = "$(DATADIR)"?' \
626 $(DESTDIR)$(DATADIR)/carla/carla_shared.py
628 # Install resources (gui)
629 install -m 755 \
630 bin/resources/carla-plugin \
631 bin/resources/carla-plugin-patchbay \
632 bin/resources/*-ui \
633 $(DESTDIR)$(DATADIR)/carla/resources
634 endif # CPPMODE
636 ifeq ($(HAVE_THEME),true)
637 # Install theme
638 install -m 644 \
639 bin/styles/* \
640 $(DESTDIR)$(LIBDIR)/carla/styles
641 endif
643 # Install desktop files
644 install -m 644 data/desktop/carla.desktop $(DESTDIR)$(DATADIR)/applications
645 install -m 644 data/desktop/carla-rack.desktop $(DESTDIR)$(DATADIR)/applications
646 install -m 644 data/desktop/carla-patchbay.desktop $(DESTDIR)$(DATADIR)/applications
647 install -m 644 data/desktop/carla-jack-single.desktop $(DESTDIR)$(DATADIR)/applications
648 install -m 644 data/desktop/carla-jack-multi.desktop $(DESTDIR)$(DATADIR)/applications
649 ifeq ($(HAVE_LIBLO),true)
650 install -m 644 data/desktop/carla-control.desktop $(DESTDIR)$(DATADIR)/applications
651 endif
653 # Install app data
654 sed -e 's?X-VERSION-X?$(VERSION)?' \
655 data/appdata.xml.in > $(DESTDIR)$(PREFIX)/share/appdata/studio.kx.carla.appdata.xml
657 # Install mime package
658 install -m 644 data/carla.xml $(DESTDIR)$(DATADIR)/mime/packages
660 # Install icons, 16x16
661 install -m 644 resources/16x16/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/16x16/apps
662 install -m 644 resources/16x16/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/16x16/apps
664 # Install icons, 32x32
665 install -m 644 resources/32x32/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/32x32/apps
666 install -m 644 resources/32x32/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/32x32/apps
668 # Install icons, 48x48
669 install -m 644 resources/48x48/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/48x48/apps
670 install -m 644 resources/48x48/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/48x48/apps
672 # Install icons, 128x128
673 install -m 644 resources/128x128/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/128x128/apps
674 install -m 644 resources/128x128/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/128x128/apps
676 # Install icons, 256x256
677 install -m 644 resources/256x256/carla.png $(DESTDIR)$(DATADIR)/icons/hicolor/256x256/apps
678 install -m 644 resources/256x256/carla-control.png $(DESTDIR)$(DATADIR)/icons/hicolor/256x256/apps
680 # Install icons, scalable
681 install -m 644 resources/scalable/carla.svg $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps
682 install -m 644 resources/scalable/carla-control.svg $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps
684 # Install resources (re-use python files)
685 $(LINK) ../common $(DESTDIR)$(DATADIR)/carla/resources
686 $(LINK) ../dialogs $(DESTDIR)$(DATADIR)/carla/resources
687 $(LINK) ../modgui $(DESTDIR)$(DATADIR)/carla/resources
688 $(LINK) ../patchcanvas $(DESTDIR)$(DATADIR)/carla/resources
689 $(LINK) ../utils $(DESTDIR)$(DATADIR)/carla/resources
690 $(LINK) ../widgets $(DESTDIR)$(DATADIR)/carla/resources
691 $(LINK) ../carla_app.py $(DESTDIR)$(DATADIR)/carla/resources
692 $(LINK) ../carla_backend.py $(DESTDIR)$(DATADIR)/carla/resources
693 $(LINK) ../carla_backend_qt.py $(DESTDIR)$(DATADIR)/carla/resources
694 $(LINK) ../carla_frontend.py $(DESTDIR)$(DATADIR)/carla/resources
695 $(LINK) ../carla_host.py $(DESTDIR)$(DATADIR)/carla/resources
696 $(LINK) ../carla_host_control.py $(DESTDIR)$(DATADIR)/carla/resources
697 $(LINK) ../carla_settings.py $(DESTDIR)$(DATADIR)/carla/resources
698 $(LINK) ../carla_skin.py $(DESTDIR)$(DATADIR)/carla/resources
699 $(LINK) ../carla_shared.py $(DESTDIR)$(DATADIR)/carla/resources
700 $(LINK) ../carla_utils.py $(DESTDIR)$(DATADIR)/carla/resources
701 $(LINK) ../carla_widgets.py $(DESTDIR)$(DATADIR)/carla/resources
702 $(LINK) ../externalui.py $(DESTDIR)$(DATADIR)/carla/resources
703 $(LINK) ../resources_rc.py $(DESTDIR)$(DATADIR)/carla/resources
704 $(LINK) ../ui_carla_about.py $(DESTDIR)$(DATADIR)/carla/resources
705 $(LINK) ../ui_carla_edit.py $(DESTDIR)$(DATADIR)/carla/resources
706 $(LINK) ../ui_carla_host.py $(DESTDIR)$(DATADIR)/carla/resources
707 $(LINK) ../ui_carla_parameter.py $(DESTDIR)$(DATADIR)/carla/resources
708 $(LINK) ../ui_carla_plugin_calf.py $(DESTDIR)$(DATADIR)/carla/resources
709 $(LINK) ../ui_carla_plugin_classic.py $(DESTDIR)$(DATADIR)/carla/resources
710 $(LINK) ../ui_carla_plugin_compact.py $(DESTDIR)$(DATADIR)/carla/resources
711 $(LINK) ../ui_carla_plugin_default.py $(DESTDIR)$(DATADIR)/carla/resources
712 $(LINK) ../ui_carla_plugin_presets.py $(DESTDIR)$(DATADIR)/carla/resources
713 $(LINK) ../ui_carla_settings.py $(DESTDIR)$(DATADIR)/carla/resources
714 $(LINK) ../ui_carla_settings_driver.py $(DESTDIR)$(DATADIR)/carla/resources
715 $(LINK) ../ui_inputdialog_value.py $(DESTDIR)$(DATADIR)/carla/resources
716 $(LINK) ../ui_midipattern.py $(DESTDIR)$(DATADIR)/carla/resources
717 $(LINK) ../ui_xycontroller.py $(DESTDIR)$(DATADIR)/carla/resources
719 # Install translations
720 $(foreach l,$(I18N_LANGUAGES),install -m 644 \
721 source/frontend/translations/carla_$(l).qm \
722 $(DESTDIR)$(DATADIR)/carla/resources/translations/;)
724 # Link resources for internal plugin
725 rm -rf $(DESTDIR)$(LIBDIR)/carla/resources
726 $(LINK) ../../share/carla/resources $(DESTDIR)$(LIBDIR)/carla/resources
727 endif # HAVE_FRONTEND
729 # -------------------------------------------------------------------------------------------------------------
731 ifeq ($(CAN_GENERATE_LV2_TTL),true)
732 # Install lv2 plugin
733 install -d $(DESTDIR)$(LIBDIR)/lv2/carla.lv2
735 install -m 644 \
736 bin/carla.lv2/carla.* \
737 bin/carla.lv2/*.ttl \
738 $(DESTDIR)$(LIBDIR)/lv2/carla.lv2
740 # Link binaries for lv2 plugin
741 @for i in `find $(DESTDIR)$(LIBDIR)/carla/ -maxdepth 1 -type f -exec basename {} ';'`; do \
742 $(LINK) ../../carla/$$i $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/$$i; \
743 done
744 rm -f $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/libcarla_standalone2.*
746 ifeq ($(LINUX),true)
747 # Link jack app bridge
748 rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/jack
749 $(LINK) ../../carla/jack $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/jack
750 endif
751 endif # CAN_GENERATE_LV2_TTL
753 ifeq ($(HAVE_FRONTEND),true)
754 # Link resources for lv2 plugin
755 rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/resources
756 $(LINK) ../../../share/carla/resources $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/resources
758 # Link styles for lv2 plugin
759 rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/styles
760 $(LINK) ../../carla/styles $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/styles
761 endif
763 # -------------------------------------------------------------------------------------------------------------
765 ifneq ($(HAIKU),true)
766 ifeq ($(HAVE_FRONTEND),true)
767 # Install vst plugin
768 install -d $(DESTDIR)$(LIBDIR)/vst/carla.vst
770 install -m 644 \
771 bin/CarlaRack*.* \
772 bin/CarlaPatchbay*.* \
773 $(DESTDIR)$(LIBDIR)/vst/carla.vst
775 # Link binaries for vst plugin
776 @for i in `find $(DESTDIR)$(LIBDIR)/carla/ -maxdepth 1 -type f -exec basename {} ';'`; do \
777 $(LINK) ../../carla/$$i $(DESTDIR)$(LIBDIR)/vst/carla.vst/$$i; \
778 done
779 rm -f $(DESTDIR)$(LIBDIR)/vst/carla.vst/libcarla_standalone2.*
781 # Link jack app bridge
782 rm -rf $(DESTDIR)$(LIBDIR)/vst/carla.vst/jack
783 $(LINK) ../../carla/jack $(DESTDIR)$(LIBDIR)/vst/carla.vst/jack
785 # Link resources for vst plugin
786 rm -rf $(DESTDIR)$(LIBDIR)/vst/carla.vst/resources
787 $(LINK) ../../../share/carla/resources $(DESTDIR)$(LIBDIR)/vst/carla.vst/resources
789 # Link styles for vst plugin
790 rm -rf $(DESTDIR)$(LIBDIR)/vst/carla.vst/styles
791 $(LINK) ../../carla/styles $(DESTDIR)$(LIBDIR)/vst/carla.vst/styles
792 endif
793 endif
795 # -------------------------------------------------------------------------------------------------------------
797 ifneq ($(HAVE_FRONTEND),true)
798 # Remove gui files for non-gui build
799 rm $(DESTDIR)$(LIBDIR)/carla/carla-bridge-lv2-modgui
800 ifeq ($(CAN_GENERATE_LV2_TTL),true)
801 rm $(DESTDIR)$(LIBDIR)/lv2/carla.lv2/carla-bridge-lv2-modgui
802 endif
803 endif
805 # ---------------------------------------------------------------------------------------------------------------------
807 ifneq ($(EXTERNAL_PLUGINS),true)
808 install_external_plugins:
809 endif
811 install: install_main install_external_plugins
813 # ---------------------------------------------------------------------------------------------------------------------
815 uninstall:
816 rm -f $(DESTDIR)$(BINDIR)/carla*
817 rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/carla-host-plugin.pc
818 rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/carla-native-plugin.pc
819 rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/carla-standalone.pc
820 rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/carla-utils.pc
821 rm -f $(DESTDIR)$(DATADIR)/applications/carla.desktop
822 rm -f $(DESTDIR)$(DATADIR)/applications/carla-control.desktop
823 rm -f $(DESTDIR)$(DATADIR)/icons/hicolor/*/apps/carla.png
824 rm -f $(DESTDIR)$(DATADIR)/icons/hicolor/*/apps/carla-control.png
825 rm -f $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps/carla.svg
826 rm -f $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps/carla-control.svg
827 rm -f $(DESTDIR)$(DATADIR)/mime/packages/carla.xml
828 rm -rf $(DESTDIR)$(LIBDIR)/carla
829 rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla.lv2
830 rm -rf $(DESTDIR)$(LIBDIR)/lv2/carla-native.lv2
831 rm -rf $(DESTDIR)$(LIBDIR)/vst/carla.vst
832 rm -rf $(DESTDIR)$(DATADIR)/carla
833 rm -rf $(DESTDIR)$(INCLUDEDIR)/carla
835 # ----------------------------------------------------------------------------------------------------------------------------
837 ifeq ($(MACOS),true)
838 ifneq ($(MACOS_OLD),true)
839 HAVE_DIST = true
840 endif
841 endif
843 ifeq ($(WINDOWS),true)
844 HAVE_DIST = true
845 endif
847 ifeq ($(HAVE_DIST),true)
848 include Makefile.dist.mk
849 else
850 dist:
851 endif
853 include Makefile.print.mk
855 # ---------------------------------------------------------------------------------------------------------------------
857 .FORCE:
858 .PHONY: .FORCE
860 # ---------------------------------------------------------------------------------------------------------------------