@@ -1,6 +1,6 @@ | |||
#!/usr/bin/make -f | |||
# Makefile for Carla # | |||
# ---------------------- # | |||
# ------------------ # | |||
# Created by falkTX | |||
# | |||
@@ -13,7 +13,7 @@ LINK = ln -sf | |||
PYUIC ?= pyuic4 | |||
PYRCC ?= pyrcc4 -py3 | |||
# ----------------------------------------------------------------------------------------------------------------------------------------- | |||
# ------------------------------------------------------------------------------------------------------------------------------------- | |||
HAVE_OPENGL = $(shell pkg-config --exists gl && echo true) | |||
HAVE_QTCORE = $(shell pkg-config --exists QtCore && echo true) | |||
@@ -32,7 +32,7 @@ all: CPP RES UI WIDGETS | |||
endif | |||
endif | |||
# ----------------------------------------------------------------------------------------------------------------------------------------- | |||
# ------------------------------------------------------------------------------------------------------------------------------------- | |||
# C++ code | |||
CPP: backend bridges discovery | |||
@@ -70,7 +70,7 @@ wine64: | |||
$(MAKE) -C source/libs jackbridge-win64.dll.so | |||
$(LINK) ../libs/jackbridge-win64.dll.so source/bridges/jackbridge-win64.dll | |||
# ----------------------------------------------------------------------------------------------------------------------------------------- | |||
# ------------------------------------------------------------------------------------------------------------------------------------- | |||
# Resources | |||
RES = source/resources_rc.py | |||
@@ -80,7 +80,7 @@ RES: $(RES) | |||
source/%_rc.py: resources/%.qrc | |||
$(PYRCC) $< -o $@ | |||
# ----------------------------------------------------------------------------------------------------------------------------------------- | |||
# ------------------------------------------------------------------------------------------------------------------------------------- | |||
# UI code | |||
UIs = \ | |||
@@ -100,7 +100,7 @@ UI: $(UIs) | |||
source/ui_%.py: resources/ui/%.ui | |||
$(PYUIC) $< -o $@ | |||
# ----------------------------------------------------------------------------------------------------------------------------------------- | |||
# ------------------------------------------------------------------------------------------------------------------------------------- | |||
# Widgets | |||
WIDGETS = \ | |||
@@ -117,7 +117,7 @@ WIDGETS: $(WIDGETS) | |||
source/%.py: source/widgets/%.py | |||
$(LINK) widgets/$*.py $@ | |||
# ----------------------------------------------------------------------------------------------------------------------------------------- | |||
# ------------------------------------------------------------------------------------------------------------------------------------- | |||
clean: | |||
$(MAKE) clean -C source/backend | |||
@@ -129,12 +129,12 @@ clean: | |||
rm -f $(WIDGETS) | |||
rm -f *~ source/*~ source/*.pyc source/*_rc.py source/ui_*.py | |||
# ----------------------------------------------------------------------------------------------------------------------------------------- | |||
# ------------------------------------------------------------------------------------------------------------------------------------- | |||
debug: | |||
$(MAKE) DEBUG=true | |||
# ----------------------------------------------------------------------------------------------------------------------------------------- | |||
# ------------------------------------------------------------------------------------------------------------------------------------- | |||
install: | |||
# Create directories | |||
@@ -178,7 +178,7 @@ install: | |||
install -m 644 resources/scalable/carla.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/ | |||
install -m 644 resources/scalable/carla-control.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/ | |||
# Install binary data | |||
# Install binaries | |||
install -m 755 \ | |||
source/backend/*.so \ | |||
source/bridges/carla-bridge-* \ | |||
@@ -194,7 +194,7 @@ install: | |||
$(DESTDIR)$(PREFIX)/bin/carla-control \ | |||
$(DESTDIR)$(PREFIX)/bin/carla-single | |||
# ----------------------------------------------------------------------------------------------------------------------------------------- | |||
# ------------------------------------------------------------------------------------------------------------------------------------- | |||
uninstall: | |||
rm -f $(DESTDIR)$(PREFIX)/bin/carla* | |||
@@ -193,35 +193,37 @@ typedef struct _PluginDescriptor { | |||
// ----------------------------------------------------------------------- | |||
// Register plugin | |||
// Register single plugin (plugin-side) | |||
void carla_register_native_plugin(const PluginDescriptor* desc); | |||
// Simple plugins | |||
void carla_register_native_plugin_bypass(); | |||
void carla_register_native_plugin_midiSequencer(); | |||
void carla_register_native_plugin_midiSplit(); | |||
void carla_register_native_plugin_midiThrough(); | |||
void carla_register_native_plugin_midiTranspose(); | |||
void carla_register_native_plugin_nekofilter(); | |||
// DISTRHO plugins (GL) | |||
#ifdef WANT_OPENGL | |||
void carla_register_native_plugin_3BandEQ(); | |||
void carla_register_native_plugin_3BandSplitter(); | |||
void carla_register_native_plugin_PingPongPan(); | |||
#endif | |||
// DISTRHO plugins (Qt) | |||
void carla_register_native_plugin_Notes(); | |||
// Register all plugins (host-side) | |||
static inline | |||
void carla_register_all_plugins() | |||
{ | |||
// Simple plugins | |||
void carla_register_native_plugin_bypass(); | |||
void carla_register_native_plugin_midiSequencer(); | |||
void carla_register_native_plugin_midiSplit(); | |||
void carla_register_native_plugin_midiThrough(); | |||
void carla_register_native_plugin_midiTranspose(); | |||
void carla_register_native_plugin_nekofilter(); | |||
// DISTRHO plugins | |||
void carla_register_native_plugin_3BandEQ(); | |||
void carla_register_native_plugin_3BandSplitter(); | |||
void carla_register_native_plugin_PingPongPan(); | |||
void carla_register_native_plugin_Notes(); | |||
#ifdef WANT_AUDIOFILE | |||
void carla_register_native_plugin_audiofile(); | |||
// AudioFile | |||
void carla_register_native_plugin_audiofile(); | |||
#endif | |||
#ifdef WANT_ZYNADDSUBFX | |||
// ZynAddSubFX | |||
void carla_register_native_plugin_zynaddsubfx(); | |||
// ZynAddSubFX | |||
void carla_register_native_plugin_zynaddsubfx(); | |||
#endif | |||
} | |||
// ----------------------------------------------------------------------- | |||
@@ -8,9 +8,12 @@ include ../../Makefile.mk | |||
# -------------------------------------------------------------- | |||
BUILD_C_FLAGS += -pthread -fvisibility=hidden -fPIC -I. -I.. -I../../includes | |||
BUILD_CXX_FLAGS += -pthread -fvisibility=hidden -fPIC -I. -I.. -I../../includes -I../../libs -I../../utils | |||
LINK_FLAGS += -lpthread | |||
BASE_FLAGS = -pthread -fvisibility=hidden -fPIC -I. -I.. -I../../includes | |||
BASE_FLAGS += $(shell pkg-config --cflags gl) | |||
BUILD_C_FLAGS += $(BASE_FLAGS) | |||
BUILD_CXX_FLAGS += $(BASE_FLAGS) -I../../libs -I../../libs/distrho -I../../utils | |||
LINK_FLAGS += $(shell pkg-config --libs gl) -lpthread | |||
# -------------------------------------------------------------- | |||
@@ -39,10 +42,6 @@ ifeq ($(HAVE_JACK2),true) | |||
BUILD_CXX_FLAGS += -DWANT_JACK_PORT_RENAME | |||
endif | |||
ifeq ($(HAVE_OPENGL),true) | |||
BUILD_CXX_FLAGS += -DWANT_OPENGL | |||
endif | |||
ifeq ($(HAVE_FLUIDSYNTH),true) | |||
BUILD_CXX_FLAGS += -DWANT_FLUIDSYNTH | |||
endif | |||
@@ -51,10 +50,6 @@ ifeq ($(HAVE_LINUXSAMPLER),true) | |||
BUILD_CXX_FLAGS += -DWANT_LINUXSAMPLER | |||
endif | |||
ifeq ($(HAVE_SUIL),true) | |||
BUILD_CXX_FLAGS += -DWANT_SUIL | |||
endif | |||
ifeq ($(HAVE_AF_DEPS),true) | |||
BUILD_CXX_FLAGS += -DWANT_AUDIOFILE | |||
endif | |||
@@ -18,8 +18,6 @@ BUILD_CXX_FLAGS += -DHAVE_GETTIMEOFDAY | |||
BUILD_CXX_FLAGS += -Irtaudio-4.0.11 -Irtmidi-2.0.1 | |||
ifeq ($(DEBUG),true) | |||
BUILD_CXX_FLAGS += -D__RTAUDIO_DEBUG__ -D__RTMIDI_DEBUG__ | |||
else | |||
BUILD_CXX_FLAGS += -D_FORTIFY_SOURCE=2 | |||
endif | |||
endif | |||
@@ -45,6 +43,7 @@ endif | |||
OBJS = \ | |||
CarlaEngine.cpp.o \ | |||
CarlaEngineJack.cpp.o \ | |||
CarlaEnginePlugin.cpp.o \ | |||
CarlaEngineRtAudio.cpp.o \ | |||
CarlaEngineOsc.cpp.o \ | |||
CarlaEngineThread.cpp.o | |||
@@ -73,8 +72,8 @@ debug: | |||
%.cpp.o: %.cpp ../CarlaPlugin.hpp ../CarlaEngine.hpp CarlaEngineInternal.hpp CarlaEngineOsc.hpp CarlaEngineThread.hpp | |||
$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ | |||
$(SHARED): $(OBJS) $(LIBS) | |||
$(SHARED): $(OBJS) | |||
$(CXX) $^ -shared $(LINK_FLAGS) -o $@ | |||
$(STATIC): $(OBJS) $(LIBS) | |||
$(STATIC): $(OBJS) | |||
$(AR) rs $@ $^ |
@@ -8,13 +8,12 @@ include ../Makefile.mk | |||
# -------------------------------------------------------------- | |||
BUILD_CXX_FLAGS += -I../../libs/distrho | |||
BUILD_CXX_FLAGS += $(shell pkg-config --cflags QtCore QtGui gl) | |||
LINK_FLAGS += $(shell pkg-config --libs QtCore QtGui gl) | |||
BUILD_CXX_FLAGS += $(shell pkg-config --cflags QtCore QtGui) | |||
LINK_FLAGS += $(shell pkg-config --libs QtCore QtGui) | |||
ifeq ($(HAVE_AF_DEPS),true) | |||
AF_CXX_FLAGS = $(BUILD_CXX_FLAGS) | |||
AF_CXX_FLAGS += $(shell pkg-config --cflags libavcodec libavformat sndfile) | |||
AF_C_FLAGS = $(BUILD_C_FLAGS) | |||
AF_C_FLAGS += $(shell pkg-config --cflags libavcodec libavformat sndfile) | |||
LINK_FLAGS += $(shell pkg-config --libs libavcodec libavformat sndfile) | |||
endif | |||
@@ -35,18 +34,14 @@ OBJS = \ | |||
midi-transpose.c.o \ | |||
nekofilter.c.o | |||
# DISTRHO plugins (GL) | |||
ifeq ($(HAVE_OPENGL),true) | |||
# DISTRHO plugins | |||
OBJS += \ | |||
distrho-3bandeq.cpp.o \ | |||
distrho-3bandsplitter.cpp.o \ | |||
distrho-pingpongpan.cpp.o | |||
endif | |||
# DISTRHO plugins (Qt) | |||
OBJS += \ | |||
distrho-pingpongpan.cpp.o \ | |||
distrho-notes.cpp.o | |||
# AudioFile | |||
ifeq ($(HAVE_AF_DEPS),true) | |||
OBJS += \ | |||
audiofile.c.o | |||
@@ -62,7 +57,8 @@ endif | |||
SHARED = ../libcarla_native.so | |||
STATIC = ../libcarla_native.a | |||
LIBS = ../../libs/dgl.a | |||
LIBS = ../../libs/dgl.a | |||
LIBS += ../../libs/widgets.a | |||
# -------------------------------------------------------------- | |||
@@ -100,9 +96,12 @@ distrho-3bandsplitter.cpp.o: distrho-3bandsplitter.cpp 3bandsplitter/DistrhoArtw | |||
distrho-pingpongpan.cpp.o: distrho-pingpongpan.cpp pingpongpan/DistrhoArtworkPingPongPan.cpp pingpongpan/DistrhoPluginPingPongPan.cpp pingpongpan/DistrhoUIPingPongPan.cpp distrho/DistrhoPluginCarla.cpp | |||
$(CXX) $< $(BUILD_CXX_FLAGS) -Ipingpongpan -DDISTRHO_NAMESPACE=DISTRHO_PingPongPan -c -o $@ | |||
distrho-notes.cpp.o: distrho-notes.cpp notes/DistrhoPluginNotes.cpp notes/DistrhoUINotes.cpp distrho/DistrhoPluginCarla.cpp moc_DistrhoUINotes.cpp moc_ParamProgressBar.cpp | |||
distrho-notes.cpp.o: distrho-notes.cpp notes/DistrhoPluginNotes.cpp notes/DistrhoUINotes.cpp distrho/DistrhoPluginCarla.cpp moc_DistrhoUINotes.cpp | |||
$(CXX) $< $(BUILD_CXX_FLAGS) -Inotes -DDISTRHO_NAMESPACE=DISTRHO_Notes -c -o $@ | |||
audiofile.c.o: audiofile.c | |||
$(CXX) $< $(AF_C_FLAGS) -c -o $@ | |||
zynaddsubfx.cpp.o: zynaddsubfx.cpp | |||
$(CXX) $< $(ZYN_CXX_FLAGS) -c -o $@ | |||
@@ -114,5 +113,7 @@ zynaddsubfx-src.cpp.o: zynaddsubfx-src.cpp | |||
moc_DistrhoUINotes.cpp: notes/DistrhoUINotes.hpp | |||
$(MOC) $< -o $@ | |||
moc_ParamProgressBar.cpp: notes/ParamProgressBar.hpp | |||
$(MOC) $< -o $@ | |||
# -------------------------------------------------------------- | |||
../libs/%: | |||
$(MAKE) -C ../libs $* |
@@ -8,15 +8,8 @@ include ../Makefile.mk | |||
# -------------------------------------------------------------- | |||
BUILD_CXX_FLAGS += -I../../libs/distrho | |||
BUILD_CXX_FLAGS += $(shell pkg-config --cflags liblo QtCore gl) | |||
LINK_FLAGS += $(shell pkg-config --libs liblo QtCore gl) | |||
ifeq ($(HAVE_SUIL),true) | |||
BUILD_CXX_FLAGS += $(shell pkg-config --cflags suil-0) | |||
LINK_FLAGS += $(shell pkg-config --libs suil-0) | |||
endif | |||
BUILD_CXX_FLAGS += $(shell pkg-config --cflags liblo QtCore) | |||
LINK_FLAGS += $(shell pkg-config --libs liblo QtCore) | |||
ifeq ($(HAVE_FLUIDSYNTH),true) | |||
BUILD_CXX_FLAGS += $(shell pkg-config --cflags fluidsynth) | |||
@@ -1,6 +1,6 @@ | |||
#!/usr/bin/make -f | |||
# Makefile for carla-discovery # | |||
# ----------------------------------------- # | |||
# ---------------------------- # | |||
# Created by falkTX | |||
# | |||
@@ -36,6 +36,16 @@ WIN_32BIT_FLAGS = $(32BIT_FLAGS) | |||
WIN_64BIT_FLAGS = $(64BIT_FLAGS) | |||
WIN_LINK_FLAGS = $(LINK_FLAGS) -static -mwindows -lole32 -luuid -lws2_32 | |||
ifeq ($(CARLA_PLUGIN_SUPPORT),true) | |||
LIBS = ../libs/lilv.a | |||
LIBS_posix32 = ../libs/lilv.posix32.a | |||
LIBS_posix64 = ../libs/lilv.posix64.a | |||
LIBS_win32 = ../libs/lilv.win32.a | |||
LIBS_win64 = ../libs/lilv.win64.a | |||
endif | |||
OBJS = carla-discovery.cpp | |||
# -------------------------------------------------------------- | |||
all: carla-discovery-native | |||
@@ -47,21 +57,19 @@ win64: carla-discovery-win64.exe | |||
# -------------------------------------------------------------- | |||
OBJS = carla-discovery.cpp | |||
carla-discovery-native: $(OBJS) ../libs/lilv.a | |||
carla-discovery-native: $(OBJS) $(LIBS) | |||
$(CXX) $^ $(POSIX_BUILD_FLAGS) $(POSIX_LINK_FLAGS) $(NATIVE_FLAGS) -o $@ && $(STRIP) $@ | |||
carla-discovery-posix32: $(OBJS) ../libs/lilv.posix32.a | |||
carla-discovery-posix32: $(OBJS) $(LIBS_posix32) | |||
$(CXX) $^ $(POSIX_BUILD_FLAGS) $(POSIX_32BIT_FLAGS) $(POSIX_LINK_FLAGS) -o $@ && $(STRIP) $@ | |||
carla-discovery-posix64: $(OBJS) ../libs/lilv.posix64.a | |||
carla-discovery-posix64: $(OBJS) $(LIBS_posix64) | |||
$(CXX) $^ $(POSIX_BUILD_FLAGS) $(POSIX_64BIT_FLAGS) $(POSIX_LINK_FLAGS) -o $@ && $(STRIP) $@ | |||
carla-discovery-win32.exe: $(OBJS) ../libs/lilv.win32.a | |||
carla-discovery-win32.exe: $(OBJS) $(LIBS_win32) | |||
$(CXX) $^ $(WIN_BUILD_FLAGS) $(WIN_32BIT_FLAGS) $(WIN_LINK_FLAGS) -o $@ && $(STRIP) $@ | |||
carla-discovery-win64.exe: $(OBJS) ../libs/lilv.win64.a | |||
carla-discovery-win64.exe: $(OBJS) $(LIBS_win64) | |||
$(CXX) $^ $(WIN_BUILD_FLAGS) $(WIN_64BIT_FLAGS) $(WIN_LINK_FLAGS) -o $@ && $(STRIP) $@ | |||
# -------------------------------------------------------------- | |||