Browse Source

More makefile tweaks

tags/1.9.4
falkTX 11 years ago
parent
commit
45e7406e9e
5 changed files with 48 additions and 78 deletions
  1. +5
    -9
      source/backend/Makefile.mk
  2. +4
    -3
      source/backend/plugin/Makefile
  3. +14
    -37
      source/backend/standalone/Makefile
  4. +24
    -23
      source/bridges/Makefile
  5. +1
    -6
      source/utils/Lv2AtomQueue.hpp

+ 5
- 9
source/backend/Makefile.mk View File

@@ -8,8 +8,7 @@ include ../../Makefile.mk

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

BACKEND_FLAGS = -fvisibility=hidden -fPIC
BACKEND_FLAGS += -I. -I.. -I../../includes -I../../libs -I../../utils
BACKEND_FLAGS = -I. -I.. -I../../includes -I../../libs -I../../utils

BUILD_C_FLAGS += $(BACKEND_FLAGS)
BUILD_CXX_FLAGS += $(BACKEND_FLAGS)
@@ -19,18 +18,16 @@ BUILD_CXX_FLAGS += $(BACKEND_FLAGS)
BUILD_CXX_FLAGS += -DWANT_NATIVE

ifeq ($(CARLA_PLUGIN_SUPPORT),true)
BUILD_C_FLAGS += -DWANT_LV2
BUILD_CXX_FLAGS += -DWANT_LADSPA -DWANT_DSSI -DWANT_LV2 -DWANT_VST
ifeq ($(CARLA_VESTIGE_HEADER),true)
BUILD_CXX_FLAGS += -DVESTIGE_HEADER
endif
endif

ifeq ($(CARLA_RTAUDIO_SUPPORT),true)
BUILD_CXX_FLAGS += -DWANT_RTAUDIO
endif

ifeq ($(CARLA_VESTIGE_HEADER),true)
BUILD_CXX_FLAGS += -DVESTIGE_HEADER
endif

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

ifeq ($(HAVE_FLUIDSYNTH),true)
@@ -58,8 +55,7 @@ endif

ifeq ($(HAVE_ZYN_DEPS),true)
BUILD_CXX_FLAGS += -DWANT_ZYNADDSUBFX
endif

ifeq ($(HAVE_ZYN_UI_DEPS),true)
BUILD_CXX_FLAGS += -DWANT_ZYNADDSUBFX_UI
endif
endif

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

@@ -59,7 +59,10 @@ debug:

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

%.cpp.o: %.cpp moc_CarlaPluginGui.cpp ../CarlaBackend.hpp ../CarlaEngine.hpp ../CarlaPlugin.hpp CarlaPluginGui.hpp CarlaPluginInternal.hpp CarlaPluginThread.hpp
%.cpp.o: %.cpp ../CarlaBackend.hpp ../CarlaEngine.hpp ../CarlaPlugin.hpp CarlaPluginGui.hpp CarlaPluginInternal.hpp CarlaPluginThread.hpp
$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@

CarlaPluginGui.cpp.o: CarlaPluginGui.cpp moc_CarlaPluginGui.cpp CarlaPluginGui.hpp ../CarlaBackend.hpp ../CarlaEngine.hpp ../CarlaPlugin.hpp CarlaPluginInternal.hpp CarlaPluginThread.hpp
$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@

moc_%.cpp: %.hpp
@@ -67,5 +70,3 @@ moc_%.cpp: %.hpp

$(TARGET): $(OBJS)
$(AR) rs $@ $^

.PRECIOUS: moc_%.cpp

+ 14
- 37
source/backend/standalone/Makefile View File

@@ -8,7 +8,8 @@ include ../Makefile.mk

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

BUILD_CXX_FLAGS += $(shell pkg-config --cflags liblo) -I../../theme
BUILD_CXX_FLAGS += -I../../theme
BUILD_CXX_FLAGS += $(shell pkg-config --cflags liblo)

ifeq ($(HAVE_QT4),true)
BUILD_CXX_FLAGS += $(shell pkg-config --cflags QtCore QtGui)
@@ -39,7 +40,7 @@ LINK_FLAGS += $(shell pkg-config --libs libpulse-simple)
endif

# --------------------------------------------------------------
# Samplers
# Plugin

ifeq ($(HAVE_FLUIDSYNTH),true)
LINK_FLAGS += $(shell pkg-config --libs fluidsynth)
@@ -59,9 +60,9 @@ W32_LIBS += -lrpcrt4
endif
else
ifeq ($(MACOS),true)
DGL_LIBS = -framework Cocoa
DGL_LIBS = -framework Cocoa
else
DGL_LIBS = -lX11
DGL_LIBS = -lX11
endif
endif

@@ -140,45 +141,21 @@ debug:
$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@

../libcarla_standalone.dll: $(OBJS) $(LIBS)
$(CXX) $^ -shared $(LINK_FLAGS) $(W32_LIBS) -Wl,--output-def,$@.def -o $@ && $(STRIP) $@
$(CXX) $^ -shared $(LINK_FLAGS) $(W32_LIBS) -Wl,--output-def,$@.def -o $@ $(CMD_STRIP) $@

../libcarla_standalone.dylib: $(OBJS) $(LIBS)
$(CXX) $^ -dynamiclib $(LINK_FLAGS) -framework CoreAudio -framework CoreMIDI -framework CoreFoundation -o $@
$(CXX) $^ -dynamiclib $(LINK_FLAGS) -framework CoreAudio -framework CoreMIDI -framework CoreFoundation -o $@ $(CMD_STRIP) $@

../libcarla_standalone.so: $(OBJS) $(LIBS)
$(CXX) $^ -shared $(LINK_FLAGS) -o $@ && $(STRIP) $@
$(CXX) $^ -shared $(LINK_FLAGS) -o $@ $(CMD_STRIP) $@

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

../libcarla_engine.a:
$(MAKE) -C ../engine
.FORCE:
.PHONY: .FORCE

../libcarla_plugin.a:
$(MAKE) -C ../plugin
../libcarla_%.a: .FORCE
$(MAKE) -C ../$*

../libcarla_native.a:
$(MAKE) -C ../native

../../libs/dgl.a:
$(MAKE) -C ../../libs dgl

../../libs/lilv.a:
$(MAKE) -C ../../libs lilv

../../libs/rtmempool.a:
$(MAKE) -C ../../libs rtmempool

../../libs/theme.a:
$(MAKE) -C ../../libs theme

../../libs/widgets.a:
$(MAKE) -C ../../libs widgets

.PHONY: ../libcarla_engine.a \
../libcarla_plugin.a \
../libcarla_native.a \
../../libs/dgl.a \
../../libs/lilv.a \
../../libs/rtmempool.a \
../../libs/theme.a \
../../libs/widgets.a
../../libs/%.a: .FORCE
$(MAKE) -C ../../libs $*

+ 24
- 23
source/bridges/Makefile View File

@@ -8,16 +8,16 @@ include ../Makefile.mk

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

QT_UI_FLAGS = -I../theme

ifeq ($(HAVE_QT4),true)
QT_UI_FLAGS = $(shell pkg-config --cflags QtGui)
QT_UI_LIBS = $(shell pkg-config --libs QtGui)
QT_UI_FLAGS += $(shell pkg-config --cflags QtGui)
QT_UI_LIBS = $(shell pkg-config --libs QtGui)
else
QT_UI_FLAGS = $(shell pkg-config --cflags Qt5Gui Qt5Widgets)
QT_UI_LIBS = $(shell pkg-config --libs Qt5Gui Qt5Widgets)
QT_UI_FLAGS += $(shell pkg-config --cflags Qt5Gui Qt5Widgets)
QT_UI_LIBS = $(shell pkg-config --libs Qt5Gui Qt5Widgets)
endif

QT_UI_FLAGS += -I../theme

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

BUILD_CXX_FLAGS += -DBUILD_BRIDGE
@@ -248,7 +248,7 @@ OBJS_UI_LV2_GTK2 = CarlaBridgeUI-LV2__lv2-gtk2.o \
CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitGtk__lv2-gtk2.o

carla-bridge-lv2-gtk2: $(OBJS_UI_LV2_GTK2) $(OBJS_UI_LV2_LIBS)
$(CXX) $^ $(LINK_UI_LV2_GTK2_FLAGS) -o $@ && $(STRIP) $@
$(CXX) $^ $(LINK_UI_LV2_GTK2_FLAGS) -o $@ $(CMD_STRIP) $@

%__lv2-gtk2.o: %.cpp
$(CXX) $< $(BUILD_UI_LV2_GTK2_FLAGS) -c -o $@
@@ -261,7 +261,7 @@ OBJS_UI_LV2_GTK3 = CarlaBridgeUI-LV2__lv2-gtk3.o \
CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitGtk__lv2-gtk3.o

carla-bridge-lv2-gtk3: $(OBJS_UI_LV2_GTK3) $(OBJS_UI_LV2_LIBS)
$(CXX) $^ $(LINK_UI_LV2_GTK3_FLAGS) -o $@ && $(STRIP) $@
$(CXX) $^ $(LINK_UI_LV2_GTK3_FLAGS) -o $@ $(CMD_STRIP) $@

%__lv2-gtk3.o: %.cpp
$(CXX) $< $(BUILD_UI_LV2_GTK3_FLAGS) -c -o $@
@@ -274,7 +274,7 @@ OBJS_UI_LV2_QT4 = CarlaBridgeUI-LV2__lv2-qt4.o \
CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitQt__lv2-qt4.o

carla-bridge-lv2-qt4: $(OBJS_UI_LV2_QT4) $(OBJS_UI_LV2_LIBS)
$(CXX) $^ $(LINK_UI_LV2_QT4_FLAGS) -o $@ && $(STRIP) $@
$(CXX) $^ $(LINK_UI_LV2_QT4_FLAGS) -o $@ $(CMD_STRIP) $@

%__lv2-qt4.o: %.cpp
$(CXX) $< $(BUILD_UI_LV2_QT4_FLAGS) -c -o $@
@@ -287,7 +287,7 @@ OBJS_UI_LV2_QT5 = CarlaBridgeUI-LV2__lv2-qt5.o \
CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitQt__lv2-qt5.o

carla-bridge-lv2-qt5: $(OBJS_UI_LV2_QT5) $(OBJS_UI_LV2_LIBS)
$(CXX) $^ $(LINK_UI_LV2_QT5_FLAGS) -o $@ && $(STRIP) $@
$(CXX) $^ $(LINK_UI_LV2_QT5_FLAGS) -o $@ $(CMD_STRIP) $@

%__lv2-qt5.o: %.cpp
$(CXX) $< $(BUILD_UI_LV2_QT5_FLAGS) -c -o $@
@@ -300,7 +300,7 @@ OBJS_UI_LV2_X11 = CarlaBridgeUI-LV2__lv2-x11.o \
CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitQt__lv2-x11.o

carla-bridge-lv2-x11: $(OBJS_UI_LV2_X11) $(OBJS_UI_LV2_LIBS) ../libs/theme.a
$(CXX) $^ $(LINK_UI_LV2_X11_FLAGS) -o $@ && $(STRIP) $@
$(CXX) $^ $(LINK_UI_LV2_X11_FLAGS) -o $@ $(CMD_STRIP) $@

%__lv2-x11.o: %.cpp
$(CXX) $< $(BUILD_UI_LV2_X11_FLAGS) -c -o $@
@@ -313,7 +313,7 @@ OBJS_UI_VST_HWND = CarlaBridgeUI-VST__vst-hwnd.o \
CarlaBridgeToolkit__vst.o CarlaBridgeToolkitQt__vst-hwnd.o

carla-bridge-vst-hwnd.exe: $(OBJS_UI_VST_HWND) ../libs/theme.a
$(CXX) $^ $(LINK_UI_VST_HWND_FLAGS) -o $@ && $(STRIP) $@
$(CXX) $^ $(LINK_UI_VST_HWND_FLAGS) -o $@ $(CMD_STRIP) $@

%__vst-hwnd.o: %.cpp
$(CXX) $< $(BUILD_UI_VST_HWND_FLAGS) -c -o $@
@@ -326,7 +326,7 @@ OBJS_UI_VST_X11 = CarlaBridgeUI-VST__vst-x11.o \
CarlaBridgeToolkit__vst.o CarlaBridgeToolkitQt__vst-x11.o

carla-bridge-vst-x11: $(OBJS_UI_VST_X11) ../libs/theme.a
$(CXX) $^ $(LINK_UI_VST_X11_FLAGS) -o $@ && $(STRIP) $@
$(CXX) $^ $(LINK_UI_VST_X11_FLAGS) -o $@ $(CMD_STRIP) $@

%__vst-x11.o: %.cpp
$(CXX) $< $(BUILD_UI_VST_X11_FLAGS) -c -o $@
@@ -382,7 +382,7 @@ OBJS_NATIVE += \
endif

carla-bridge-native: $(FILES) $(OBJS_NATIVE)
$(CXX) $(OBJS_NATIVE) $(NATIVE_LINK_FLAGS) -o $@ && $(STRIP) $@
$(CXX) $(OBJS_NATIVE) $(NATIVE_LINK_FLAGS) -o $@ $(CMD_STRIP) $@

%__native.o: %.cpp
$(CXX) $< $(NATIVE_BUILD_FLAGS) -c -o $@
@@ -425,7 +425,7 @@ OBJS_POSIX32 += \
../libs/rtmempool.posix32.a

carla-bridge-posix32: $(FILES) $(OBJS_POSIX32)
$(CXX) $(OBJS_POSIX32) $(POSIX_LINK_FLAGS) $(POSIX_32BIT_FLAGS) -o $@ && $(STRIP) $@
$(CXX) $(OBJS_POSIX32) $(POSIX_LINK_FLAGS) $(POSIX_32BIT_FLAGS) -o $@ $(CMD_STRIP) $@

%__posix32.o: %.cpp
$(CXX) $< $(POSIX_BUILD_FLAGS) $(POSIX_32BIT_FLAGS) -c -o $@
@@ -468,7 +468,7 @@ OBJS_POSIX64 += \
../libs/rtmempool.posix64.a

carla-bridge-posix64: $(FILES) $(OBJS_POSIX64)
$(CXX) $(OBJS_POSIX64) $(POSIX_LINK_FLAGS) $(POSIX_64BIT_FLAGS) -o $@ && $(STRIP) $@
$(CXX) $(OBJS_POSIX64) $(POSIX_LINK_FLAGS) $(POSIX_64BIT_FLAGS) -o $@ $(CMD_STRIP) $@

%__posix64.o: %.cpp
$(CXX) $< $(POSIX_BUILD_FLAGS) $(POSIX_64BIT_FLAGS) -c -o $@
@@ -511,7 +511,7 @@ OBJS_WIN32 += \
../libs/rtmempool.win32.a

carla-bridge-win32.exe: $(FILES) $(OBJS_WIN32) ../libs/jackbridge-win32.dll
$(CXX) $(OBJS_WIN32) $(WIN_32BIT_FLAGS) $(WIN_LINK_FLAGS) -ljackbridge-win32 -o $@ && $(STRIP) $@
$(CXX) $(OBJS_WIN32) $(WIN_32BIT_FLAGS) $(WIN_LINK_FLAGS) -ljackbridge-win32 -o $@ $(CMD_STRIP) $@

%__win32.o: %.cpp
$(CXX) $< $(WIN_BUILD_FLAGS) $(WIN_32BIT_FLAGS) -c -o $@
@@ -554,7 +554,7 @@ OBJS_WIN64 += \
../libs/rtmempool.win64.a

carla-bridge-win64.exe: $(FILES) $(OBJS_WIN64) ../libs/jackbridge-win64.dll
$(CXX) $(OBJS_WIN64) $(WIN_64BIT_FLAGS) $(WIN_LINK_FLAGS) -ljackbridge-win64 -o $@ && $(STRIP) $@
$(CXX) $(OBJS_WIN64) $(WIN_64BIT_FLAGS) $(WIN_LINK_FLAGS) -ljackbridge-win64 -o $@ $(CMD_STRIP) $@

%__win64.o: %.cpp
$(CXX) $< $(WIN_BUILD_FLAGS) $(WIN_64BIT_FLAGS) -c -o $@
@@ -566,13 +566,14 @@ carla-bridge-win64.exe: $(FILES) $(OBJS_WIN64) ../libs/jackbridge-win64.dll

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

../backend/libcarla_native.a:
$(MAKE) -C ../backend/native
.FORCE:
.PHONY: .FORCE

../libs/widgets.a:
$(MAKE) -C ../libs widgets
../backend/libcarla_native.a: .FORCE
$(MAKE) -C ../backend/native

.PHONY: ../backend/libcarla_native.a ../libs/widgets.a
../libs/%.a: .FORCE
$(MAKE) -C ../libs $*

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



+ 1
- 6
source/utils/Lv2AtomQueue.hpp View File

@@ -145,7 +145,7 @@ public:
fRetAtom.atom.type = fData[fIndex].type;
std::memcpy(fRetAtom.data, fDataPool + fData[fIndex].poolOffset, fData[fIndex].size);

*portIndex = fData[index].portIndex;
*portIndex = fData[fIndex].portIndex;
*atom = (LV2_Atom*)&fRetAtom;

fData[fIndex].portIndex = 0;
@@ -181,11 +181,6 @@ private:
struct RetAtom {
LV2_Atom atom;
unsigned char data[MAX_POOL_SIZE];
#ifdef CARLA_PROPER_CPP11_SUPPORT
RetAtom() = delete;
RetAtom(RetAtom&) = delete;
RetAtom(const RetAtom&) = delete;
#endif
} fRetAtom;

unsigned short fIndex, fIndexPool;


Loading…
Cancel
Save