Browse Source

Small makefile rework

tags/1.9.4
falkTX 11 years ago
parent
commit
e50a5ecf61
7 changed files with 98 additions and 41 deletions
  1. +10
    -6
      source/backend/CarlaNative.h
  2. +7
    -4
      source/backend/Makefile.mk
  3. +1
    -1
      source/backend/engine/Makefile
  4. +53
    -20
      source/backend/native/Makefile
  5. +5
    -3
      source/backend/plugin/Makefile
  6. +20
    -7
      source/backend/standalone/Makefile
  7. +2
    -0
      source/discovery/Makefile

+ 10
- 6
source/backend/CarlaNative.h View File

@@ -210,17 +210,21 @@ 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
// AudioFile
void carla_register_native_plugin_audiofile();
#endif

#ifdef WANT_OPENGL
// DISTRHO plugins (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();

#ifdef WANT_ZYNADDSUBFX
// ZynAddSubFX
void carla_register_native_plugin_zynaddsubfx();


+ 7
- 4
source/backend/Makefile.mk View File

@@ -8,12 +8,11 @@ include ../../Makefile.mk

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

BACKEND_FLAGS = -pthread -fvisibility=hidden -fPIC -I. -I.. -I../../includes
BACKEND_FLAGS += $(shell pkg-config --cflags gl)
BACKEND_FLAGS = -fvisibility=hidden -fPIC
BACKEND_FLAGS += -I. -I.. -I../../includes -I../../libs -I../../utils

BUILD_C_FLAGS += $(BACKEND_FLAGS)
BUILD_CXX_FLAGS += $(BACKEND_FLAGS) -I../../libs -I../../libs/distrho -I../../utils
LINK_FLAGS += $(shell pkg-config --libs gl) -lpthread
BUILD_CXX_FLAGS += $(BACKEND_FLAGS)

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

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

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

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


+ 1
- 1
source/backend/engine/Makefile View File

@@ -69,7 +69,7 @@ debug:

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

%.cpp.o: %.cpp ../CarlaPlugin.hpp ../CarlaEngine.hpp CarlaEngineInternal.hpp CarlaEngineOsc.hpp CarlaEngineThread.hpp
%.cpp.o: %.cpp ../CarlaBackend.hpp ../CarlaEngine.hpp ../CarlaPlugin.hpp CarlaEngineInternal.hpp CarlaEngineOsc.hpp CarlaEngineThread.hpp
$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@

$(SHARED): $(OBJS)


+ 53
- 20
source/backend/native/Makefile View File

@@ -11,16 +11,22 @@ include ../Makefile.mk
BUILD_CXX_FLAGS += $(shell pkg-config --cflags QtCore QtGui) -I../../widgets
LINK_FLAGS += $(shell pkg-config --libs QtCore QtGui)

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

ifeq ($(HAVE_AF_DEPS),true)
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

# -Izynaddsubfx/UI
ifeq ($(HAVE_OPENGL),true)
GL_CXX_FLAGS = $(BUILD_CXX_FLAGS)
GL_CXX_FLAGS += $(shell pkg-config --cflags gl)
LINK_FLAGS += $(shell pkg-config --cflags gl)
endif

ifeq ($(HAVE_ZYN_DEPS),true)
ZYN_CXX_FLAGS = $(BUILD_CXX_FLAGS) -DNTK_GUI
ZYN_CXX_FLAGS = $(BUILD_CXX_FLAGS)
ZYN_CXX_FLAGS += $(shell pkg-config --cflags fftw3 mxml zlib)
LINK_FLAGS += $(shell pkg-config --libs fftw3 mxml zlib)
ifeq ($(HAVE_ZYN_UI_DEPS),true)
@@ -41,21 +47,26 @@ OBJS = \
midi-transpose.c.o \
nekofilter.c.o

# DISTRHO plugins
OBJS += \
distrho-3bandeq.cpp.o \
distrho-3bandsplitter.cpp.o \
distrho-pingpongpan.cpp.o \
distrho-notes.cpp.o

# AudioFile
ifeq ($(HAVE_AF_DEPS),true)
OBJS += \
audiofile.c.o
endif

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

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

ifeq ($(HAVE_ZYN_DEPS),true)
# ZynAddSubFX
OBJS += \
zynaddsubfx.cpp.o \
zynaddsubfx-src.cpp.o
@@ -63,7 +74,7 @@ OBJS += \
ifeq ($(HAVE_ZYN_UI_DEPS),true)
OBJS += zynaddsubfx-ui.cpp.o

ZYN_UI_FILES = \
ZYN_UI_FILES_CPP = \
zynaddsubfx/UI/ADnoteUI.cpp \
zynaddsubfx/UI/BankUI.cpp \
zynaddsubfx/UI/ConfigUI.cpp \
@@ -80,14 +91,35 @@ ZYN_UI_FILES = \
zynaddsubfx/UI/ResonanceUI.cpp \
zynaddsubfx/UI/SUBnoteUI.cpp \
zynaddsubfx/UI/VirKeyboard.cpp

ZYN_UI_FILES_H = \
zynaddsubfx/UI/ADnoteUI.h \
zynaddsubfx/UI/BankUI.h \
zynaddsubfx/UI/ConfigUI.h \
zynaddsubfx/UI/EffUI.h \
zynaddsubfx/UI/EnvelopeUI.h \
zynaddsubfx/UI/FilterUI.h \
zynaddsubfx/UI/LFOUI.h \
zynaddsubfx/UI/MasterUI.h \
zynaddsubfx/UI/MicrotonalUI.h \
zynaddsubfx/UI/OscilGenUI.h \
zynaddsubfx/UI/PADnoteUI.h \
zynaddsubfx/UI/PartUI.h \
zynaddsubfx/UI/PresetsUI.h \
zynaddsubfx/UI/ResonanceUI.h \
zynaddsubfx/UI/SUBnoteUI.h \
zynaddsubfx/UI/VirKeyboard.h
endif
endif

SHARED = ../libcarla_native.so
STATIC = ../libcarla_native.a

LIBS = ../../libs/dgl.a
LIBS += ../../libs/widgets.a
LIBS = ../../libs/widgets.a

ifeq ($(HAVE_OPENGL),true)
LIBS += ../../libs/dgl.a
endif

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

@@ -95,7 +127,8 @@ all: $(STATIC)

clean:
rm -f $(OBJS) $(SHARED) $(STATIC)
rm -f $(ZYN_UI_FILES)
rm -f $(ZYN_UI_FILES_CPP)
rm -f $(ZYN_UI_FILES_H)
rm -f moc_*.cpp

debug:
@@ -117,21 +150,21 @@ $(STATIC): $(OBJS)

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

audiofile.c.o: audiofile.c
$(CC) $< $(AF_C_FLAGS) -c -o $@

distrho-3bandeq.cpp.o: distrho-3bandeq.cpp 3bandeq/DistrhoArtwork3BandEQ.cpp 3bandeq/DistrhoPlugin3BandEQ.cpp 3bandeq/DistrhoUI3BandEQ.cpp distrho/DistrhoPluginCarla.cpp
$(CXX) $< $(BUILD_CXX_FLAGS) -I3bandeq -DDISTRHO_NAMESPACE=DISTRHO_3BandEQ -c -o $@
$(CXX) $< $(GL_CXX_FLAGS) -I3bandeq -DDISTRHO_NAMESPACE=DISTRHO_3BandEQ -c -o $@

distrho-3bandsplitter.cpp.o: distrho-3bandsplitter.cpp 3bandsplitter/DistrhoArtwork3BandSplitter.cpp 3bandsplitter/DistrhoPlugin3BandSplitter.cpp 3bandsplitter/DistrhoUI3BandSplitter.cpp distrho/DistrhoPluginCarla.cpp
$(CXX) $< $(BUILD_CXX_FLAGS) -I3bandsplitter -DDISTRHO_NAMESPACE=DISTRHO_3BandSplitter -c -o $@
$(CXX) $< $(GL_CXX_FLAGS) -I3bandsplitter -DDISTRHO_NAMESPACE=DISTRHO_3BandSplitter -c -o $@

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) $< $(GL_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
$(CXX) $< $(BUILD_CXX_FLAGS) -Inotes -DDISTRHO_NAMESPACE=DISTRHO_Notes -c -o $@

audiofile.c.o: audiofile.c
$(CC) $< $(AF_C_FLAGS) -c -o $@

zynaddsubfx.cpp.o: zynaddsubfx.cpp $(ZYN_UI_FILES)
$(CXX) $< $(ZYN_CXX_FLAGS) -c -o $@



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

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

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

BUILD_CXX_FLAGS += $(shell pkg-config --cflags liblo QtCore)
LINK_FLAGS += $(shell pkg-config --libs liblo QtCore)
BUILD_CXX_FLAGS += $(shell pkg-config --cflags liblo QtCore QtGui)
LINK_FLAGS += $(shell pkg-config --libs liblo QtCore QtGui)

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

ifeq ($(HAVE_FLUIDSYNTH),true)
BUILD_CXX_FLAGS += $(shell pkg-config --cflags fluidsynth)
@@ -51,7 +53,7 @@ debug:

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

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

$(SHARED): $(OBJS)


+ 20
- 7
source/backend/standalone/Makefile View File

@@ -9,8 +9,7 @@ include ../Makefile.mk
# --------------------------------------------------------------
# Common

LINK_FLAGS += $(shell pkg-config --libs gl liblo QtCore QtXml)
LINK_FLAGS += -lX11
LINK_FLAGS += $(shell pkg-config --libs liblo QtCore QtGui QtXml)

# --------------------------------------------------------------
# Engine
@@ -18,9 +17,11 @@ LINK_FLAGS += -lX11
ifeq ($(HAVE_ALSA),true)
LINK_FLAGS += $(shell pkg-config --libs alsa)
endif

ifeq ($(HAVE_JACK),true)
LINK_FLAGS += $(shell pkg-config --libs jack)
endif

ifeq ($(HAVE_PULSEAUDIO),true)
LINK_FLAGS += $(shell pkg-config --libs libpulse-simple)
endif
@@ -31,6 +32,7 @@ endif
ifeq ($(HAVE_FLUIDSYNTH),true)
LINK_FLAGS += $(shell pkg-config --libs fluidsynth)
endif

ifeq ($(HAVE_LINUXSAMPLER),true)
LINK_FLAGS += $(shell pkg-config --libs linuxsampler)
endif
@@ -43,11 +45,16 @@ LINK_FLAGS += $(shell pkg-config --libs QtGui)
ifeq ($(HAVE_AF_DEPS),true)
LINK_FLAGS += $(shell pkg-config --libs libavcodec libavformat sndfile)
endif

ifeq ($(HAVE_OPENGL),true)
LINK_FLAGS += $(shell pkg-config --libs gl)
endif

ifeq ($(HAVE_ZYN_DEPS),true)
LINK_FLAGS += $(shell pkg-config --libs fftw3 mxml zlib)
# ifeq ($(HAVE_ZYN_UI_DEPS),true)
ifeq ($(HAVE_ZYN_UI_DEPS),true)
LINK_FLAGS += $(shell pkg-config --libs ntk ntk_images)
# endif
endif
endif

# --------------------------------------------------------------
@@ -55,11 +62,17 @@ endif
LIBS = ../libcarla_engine.a
LIBS += ../libcarla_plugin.a
LIBS += ../libcarla_native.a
LIBS += ../../libs/dgl.a
LIBS += ../../libs/lilv.a
LIBS += ../../libs/rtmempool.a
LIBS += ../../libs/widgets.a

ifeq ($(CARLA_PLUGIN_SUPPORT),true)
LIBS += ../../libs/lilv.a
endif

ifeq ($(HAVE_OPENGL),true)
LIBS += ../../libs/dgl.a
endif

OBJS = \
CarlaStandalone.cpp.o

@@ -78,7 +91,7 @@ debug:

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

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

$(SHARED): $(OBJS) $(LIBS)


+ 2
- 0
source/discovery/Makefile View File

@@ -12,6 +12,8 @@ BUILD_CXX_FLAGS += -I../backend -I../includes -I../utils
BUILD_CXX_FLAGS += $(shell pkg-config --cflags QtCore)
LINK_FLAGS += $(shell pkg-config --libs QtCore)

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

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


Loading…
Cancel
Save