Browse Source

More cleanup

tags/1.9.4
falkTX 12 years ago
parent
commit
d783350e03
7 changed files with 78 additions and 80 deletions
  1. +11
    -11
      Makefile
  2. +23
    -21
      source/backend/CarlaNative.h
  3. +6
    -11
      source/backend/Makefile.mk
  4. +3
    -4
      source/backend/engine/Makefile
  5. +17
    -16
      source/backend/native/Makefile
  6. +2
    -9
      source/backend/plugin/Makefile
  7. +16
    -8
      source/discovery/Makefile

+ 11
- 11
Makefile View File

@@ -1,6 +1,6 @@
#!/usr/bin/make -f #!/usr/bin/make -f
# Makefile for Carla # # Makefile for Carla #
# ---------------------- #
# ------------------ #
# Created by falkTX # Created by falkTX
# #


@@ -13,7 +13,7 @@ LINK = ln -sf
PYUIC ?= pyuic4 PYUIC ?= pyuic4
PYRCC ?= pyrcc4 -py3 PYRCC ?= pyrcc4 -py3


# -----------------------------------------------------------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------------------------------------------------------


HAVE_OPENGL = $(shell pkg-config --exists gl && echo true) HAVE_OPENGL = $(shell pkg-config --exists gl && echo true)
HAVE_QTCORE = $(shell pkg-config --exists QtCore && echo true) HAVE_QTCORE = $(shell pkg-config --exists QtCore && echo true)
@@ -32,7 +32,7 @@ all: CPP RES UI WIDGETS
endif endif
endif endif


# -----------------------------------------------------------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------------------------------------------------------
# C++ code # C++ code


CPP: backend bridges discovery CPP: backend bridges discovery
@@ -70,7 +70,7 @@ wine64:
$(MAKE) -C source/libs jackbridge-win64.dll.so $(MAKE) -C source/libs jackbridge-win64.dll.so
$(LINK) ../libs/jackbridge-win64.dll.so source/bridges/jackbridge-win64.dll $(LINK) ../libs/jackbridge-win64.dll.so source/bridges/jackbridge-win64.dll


# -----------------------------------------------------------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------------------------------------------------------
# Resources # Resources


RES = source/resources_rc.py RES = source/resources_rc.py
@@ -80,7 +80,7 @@ RES: $(RES)
source/%_rc.py: resources/%.qrc source/%_rc.py: resources/%.qrc
$(PYRCC) $< -o $@ $(PYRCC) $< -o $@


# -----------------------------------------------------------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------------------------------------------------------
# UI code # UI code


UIs = \ UIs = \
@@ -100,7 +100,7 @@ UI: $(UIs)
source/ui_%.py: resources/ui/%.ui source/ui_%.py: resources/ui/%.ui
$(PYUIC) $< -o $@ $(PYUIC) $< -o $@


# -----------------------------------------------------------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------------------------------------------------------
# Widgets # Widgets


WIDGETS = \ WIDGETS = \
@@ -117,7 +117,7 @@ WIDGETS: $(WIDGETS)
source/%.py: source/widgets/%.py source/%.py: source/widgets/%.py
$(LINK) widgets/$*.py $@ $(LINK) widgets/$*.py $@


# -----------------------------------------------------------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------------------------------------------------------


clean: clean:
$(MAKE) clean -C source/backend $(MAKE) clean -C source/backend
@@ -129,12 +129,12 @@ clean:
rm -f $(WIDGETS) rm -f $(WIDGETS)
rm -f *~ source/*~ source/*.pyc source/*_rc.py source/ui_*.py rm -f *~ source/*~ source/*.pyc source/*_rc.py source/ui_*.py


# -----------------------------------------------------------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------------------------------------------------------


debug: debug:
$(MAKE) DEBUG=true $(MAKE) DEBUG=true


# -----------------------------------------------------------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------------------------------------------------------


install: install:
# Create directories # 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.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/scalable/apps/
install -m 644 resources/scalable/carla-control.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 \ install -m 755 \
source/backend/*.so \ source/backend/*.so \
source/bridges/carla-bridge-* \ source/bridges/carla-bridge-* \
@@ -194,7 +194,7 @@ install:
$(DESTDIR)$(PREFIX)/bin/carla-control \ $(DESTDIR)$(PREFIX)/bin/carla-control \
$(DESTDIR)$(PREFIX)/bin/carla-single $(DESTDIR)$(PREFIX)/bin/carla-single


# -----------------------------------------------------------------------------------------------------------------------------------------
# -------------------------------------------------------------------------------------------------------------------------------------


uninstall: uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/carla* rm -f $(DESTDIR)$(PREFIX)/bin/carla*


+ 23
- 21
source/backend/CarlaNative.h View File

@@ -193,35 +193,37 @@ typedef struct _PluginDescriptor {


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------


// Register plugin
// Register single plugin (plugin-side)
void carla_register_native_plugin(const PluginDescriptor* desc); 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 #ifdef WANT_AUDIOFILE
void carla_register_native_plugin_audiofile();
// AudioFile
void carla_register_native_plugin_audiofile();
#endif #endif


#ifdef WANT_ZYNADDSUBFX #ifdef WANT_ZYNADDSUBFX
// ZynAddSubFX
void carla_register_native_plugin_zynaddsubfx();
// ZynAddSubFX
void carla_register_native_plugin_zynaddsubfx();
#endif #endif
}


// ----------------------------------------------------------------------- // -----------------------------------------------------------------------




+ 6
- 11
source/backend/Makefile.mk View File

@@ -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 BUILD_CXX_FLAGS += -DWANT_JACK_PORT_RENAME
endif endif


ifeq ($(HAVE_OPENGL),true)
BUILD_CXX_FLAGS += -DWANT_OPENGL
endif

ifeq ($(HAVE_FLUIDSYNTH),true) ifeq ($(HAVE_FLUIDSYNTH),true)
BUILD_CXX_FLAGS += -DWANT_FLUIDSYNTH BUILD_CXX_FLAGS += -DWANT_FLUIDSYNTH
endif endif
@@ -51,10 +50,6 @@ ifeq ($(HAVE_LINUXSAMPLER),true)
BUILD_CXX_FLAGS += -DWANT_LINUXSAMPLER BUILD_CXX_FLAGS += -DWANT_LINUXSAMPLER
endif endif


ifeq ($(HAVE_SUIL),true)
BUILD_CXX_FLAGS += -DWANT_SUIL
endif

ifeq ($(HAVE_AF_DEPS),true) ifeq ($(HAVE_AF_DEPS),true)
BUILD_CXX_FLAGS += -DWANT_AUDIOFILE BUILD_CXX_FLAGS += -DWANT_AUDIOFILE
endif endif


+ 3
- 4
source/backend/engine/Makefile View File

@@ -18,8 +18,6 @@ BUILD_CXX_FLAGS += -DHAVE_GETTIMEOFDAY
BUILD_CXX_FLAGS += -Irtaudio-4.0.11 -Irtmidi-2.0.1 BUILD_CXX_FLAGS += -Irtaudio-4.0.11 -Irtmidi-2.0.1
ifeq ($(DEBUG),true) ifeq ($(DEBUG),true)
BUILD_CXX_FLAGS += -D__RTAUDIO_DEBUG__ -D__RTMIDI_DEBUG__ BUILD_CXX_FLAGS += -D__RTAUDIO_DEBUG__ -D__RTMIDI_DEBUG__
else
BUILD_CXX_FLAGS += -D_FORTIFY_SOURCE=2
endif endif
endif endif


@@ -45,6 +43,7 @@ endif
OBJS = \ OBJS = \
CarlaEngine.cpp.o \ CarlaEngine.cpp.o \
CarlaEngineJack.cpp.o \ CarlaEngineJack.cpp.o \
CarlaEnginePlugin.cpp.o \
CarlaEngineRtAudio.cpp.o \ CarlaEngineRtAudio.cpp.o \
CarlaEngineOsc.cpp.o \ CarlaEngineOsc.cpp.o \
CarlaEngineThread.cpp.o CarlaEngineThread.cpp.o
@@ -73,8 +72,8 @@ debug:
%.cpp.o: %.cpp ../CarlaPlugin.hpp ../CarlaEngine.hpp CarlaEngineInternal.hpp CarlaEngineOsc.hpp CarlaEngineThread.hpp %.cpp.o: %.cpp ../CarlaPlugin.hpp ../CarlaEngine.hpp CarlaEngineInternal.hpp CarlaEngineOsc.hpp CarlaEngineThread.hpp
$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@


$(SHARED): $(OBJS) $(LIBS)
$(SHARED): $(OBJS)
$(CXX) $^ -shared $(LINK_FLAGS) -o $@ $(CXX) $^ -shared $(LINK_FLAGS) -o $@


$(STATIC): $(OBJS) $(LIBS)
$(STATIC): $(OBJS)
$(AR) rs $@ $^ $(AR) rs $@ $^

+ 17
- 16
source/backend/native/Makefile View File

@@ -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) 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) LINK_FLAGS += $(shell pkg-config --libs libavcodec libavformat sndfile)
endif endif


@@ -35,18 +34,14 @@ OBJS = \
midi-transpose.c.o \ midi-transpose.c.o \
nekofilter.c.o nekofilter.c.o


# DISTRHO plugins (GL)
ifeq ($(HAVE_OPENGL),true)
# DISTRHO plugins
OBJS += \ OBJS += \
distrho-3bandeq.cpp.o \ distrho-3bandeq.cpp.o \
distrho-3bandsplitter.cpp.o \ distrho-3bandsplitter.cpp.o \
distrho-pingpongpan.cpp.o
endif

# DISTRHO plugins (Qt)
OBJS += \
distrho-pingpongpan.cpp.o \
distrho-notes.cpp.o distrho-notes.cpp.o


# AudioFile
ifeq ($(HAVE_AF_DEPS),true) ifeq ($(HAVE_AF_DEPS),true)
OBJS += \ OBJS += \
audiofile.c.o audiofile.c.o
@@ -62,7 +57,8 @@ endif
SHARED = ../libcarla_native.so SHARED = ../libcarla_native.so
STATIC = ../libcarla_native.a 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 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 $@ $(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 $@ $(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 zynaddsubfx.cpp.o: zynaddsubfx.cpp
$(CXX) $< $(ZYN_CXX_FLAGS) -c -o $@ $(CXX) $< $(ZYN_CXX_FLAGS) -c -o $@


@@ -114,5 +113,7 @@ zynaddsubfx-src.cpp.o: zynaddsubfx-src.cpp
moc_DistrhoUINotes.cpp: notes/DistrhoUINotes.hpp moc_DistrhoUINotes.cpp: notes/DistrhoUINotes.hpp
$(MOC) $< -o $@ $(MOC) $< -o $@


moc_ParamProgressBar.cpp: notes/ParamProgressBar.hpp
$(MOC) $< -o $@
# --------------------------------------------------------------

../libs/%:
$(MAKE) -C ../libs $*

+ 2
- 9
source/backend/plugin/Makefile View File

@@ -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) ifeq ($(HAVE_FLUIDSYNTH),true)
BUILD_CXX_FLAGS += $(shell pkg-config --cflags fluidsynth) BUILD_CXX_FLAGS += $(shell pkg-config --cflags fluidsynth)


+ 16
- 8
source/discovery/Makefile View File

@@ -1,6 +1,6 @@
#!/usr/bin/make -f #!/usr/bin/make -f
# Makefile for carla-discovery # # Makefile for carla-discovery #
# ----------------------------------------- #
# ---------------------------- #
# Created by falkTX # Created by falkTX
# #


@@ -36,6 +36,16 @@ WIN_32BIT_FLAGS = $(32BIT_FLAGS)
WIN_64BIT_FLAGS = $(64BIT_FLAGS) WIN_64BIT_FLAGS = $(64BIT_FLAGS)
WIN_LINK_FLAGS = $(LINK_FLAGS) -static -mwindows -lole32 -luuid -lws2_32 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 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) $@ $(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) $@ $(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) $@ $(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) $@ $(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) $@ $(CXX) $^ $(WIN_BUILD_FLAGS) $(WIN_64BIT_FLAGS) $(WIN_LINK_FLAGS) -o $@ && $(STRIP) $@


# -------------------------------------------------------------- # --------------------------------------------------------------


Loading…
Cancel
Save