Browse Source

Revert to *not* use config.h file, it breaks non-native builds

tags/1.9.6
falkTX 9 years ago
parent
commit
dbc2a3ac62
4 changed files with 63 additions and 128 deletions
  1. +22
    -121
      Makefile
  2. +32
    -0
      source/Makefile.mk
  3. +4
    -2
      source/includes/CarlaDefines.h
  4. +5
    -5
      source/native-plugins/Makefile

+ 22
- 121
Makefile View File

@@ -36,113 +36,6 @@ endif

all: BIN RES UI WIDGETS

# ----------------------------------------------------------------------------------------------------------------------------
# Config

config: source/carla_config.py source/includes/config.h

source/carla_config.py:
@echo "#!/usr/bin/env python3" > $@
@echo "# -*- coding: utf-8 -*-" >> $@
ifeq ($(DEFAULT_QT),4)
@echo "config_UseQt5 = False" >> $@
else
@echo "config_UseQt5 = True" >> $@
endif

source/includes/config.h:
@echo "/* Carla config, auto-generated file */" > $@
@echo "" >> $@

@echo "/* additional audio drivers, Linux only */" >> $@
ifeq ($(HAVE_ALSA),true)
@echo "#define HAVE_ALSA" >> $@
else
@echo "// #define HAVE_ALSA" >> $@
endif
ifeq ($(HAVE_PULSEAUDIO),true)
@echo "#define HAVE_PULSEAUDIO" >> $@
else
@echo "// #define HAVE_PULSEAUDIO" >> $@
endif
@echo "" >> $@

@echo "/* optional libs for extra backend features */" >> $@
ifeq ($(HAVE_LIBLO),true)
@echo "#define HAVE_LIBLO" >> $@
else
@echo "// #define HAVE_LIBLO" >> $@
endif
ifeq ($(HAVE_LIBMAGIC),true)
@echo "#define HAVE_LIBMAGIC" >> $@
else
@echo "// #define HAVE_LIBMAGIC" >> $@
endif
ifeq ($(HAVE_FLUIDSYNTH),true)
@echo "#define HAVE_FLUIDSYNTH" >> $@
else
@echo "// #define HAVE_FLUIDSYNTH" >> $@
endif
ifeq ($(HAVE_LINUXSAMPLER),true)
@echo "#define HAVE_LINUXSAMPLER" >> $@
else
@echo "// #define HAVE_LINUXSAMPLER" >> $@
endif
@echo "" >> $@

@echo "/* optional libs for extra plugins and UIs */" >> $@
ifeq ($(HAVE_DGL),true)
@echo "#define HAVE_DGL" >> $@
else
@echo "// #define HAVE_DGL" >> $@
endif
ifeq ($(HAVE_PROJECTM),true)
@echo "#define HAVE_PROJECTM" >> $@
else
@echo "// #define HAVE_PROJECTM" >> $@
endif
ifeq ($(HAVE_ZYN_DEPS),true)
@echo "#define HAVE_ZYN_DEPS" >> $@
else
@echo "// #define HAVE_ZYN_DEPS" >> $@
endif
ifeq ($(HAVE_ZYN_UI_DEPS),true)
@echo "#define HAVE_ZYN_UI_DEPS" >> $@
else
@echo "// #define HAVE_ZYN_UI_DEPS" >> $@
endif
@echo "" >> $@

@echo "/* extra toolkits/frameworks for plugin UIs (native) */" >> $@
ifeq ($(HAVE_X11),true)
@echo "#define HAVE_X11" >> $@
else
@echo "// #define HAVE_X11" >> $@
endif
@echo "" >> $@

@echo "/* extra toolkits/frameworks for plugin UIs (bridges, Linux only) */" >> $@
ifeq ($(HAVE_GTK2),true)
@echo "#define HAVE_GTK2" >> $@
else
@echo "// #define HAVE_GTK2" >> $@
endif
ifeq ($(HAVE_GTK3),true)
@echo "#define HAVE_GTK3" >> $@
else
@echo "// #define HAVE_GTK3" >> $@
endif
ifeq ($(HAVE_QT4),true)
@echo "#define HAVE_QT4" >> $@
else
@echo "// #define HAVE_QT4" >> $@
endif
ifeq ($(HAVE_QT5),true)
@echo "#define HAVE_QT5" >> $@
else
@echo "// #define HAVE_QT5" >> $@
endif

# ----------------------------------------------------------------------------------------------------------------------------
# Binaries (native)

@@ -188,7 +81,7 @@ ifeq ($(HAVE_QT5),true)
ALL_LIBS += $(MODULEDIR)/theme.qt5.a
endif

libs: config $(ALL_LIBS)
libs: $(ALL_LIBS)

$(MODULEDIR)/carla_engine.a: .FORCE
@$(MAKE) -C source/backend/engine
@@ -247,7 +140,7 @@ discovery: libs
@$(MAKE) -C source/discovery

ifeq ($(LINUX),true)
interposer: config
interposer:
@$(MAKE) -C source/interposer
else
interposer:
@@ -257,7 +150,7 @@ plugin: backend bridges-plugin bridges-ui discovery
@$(MAKE) -C source/plugin

ifeq ($(HAVE_QT),true)
theme: config
theme:
@$(MAKE) -C source/theme
else
theme:
@@ -281,7 +174,7 @@ LIBS_POSIX32 += $(MODULEDIR)/juce_gui_basics.posix32.a
LIBS_POSIX32 += $(MODULEDIR)/juce_gui_extra.posix32.a
endif

posix32: config $(LIBS_POSIX32)
posix32: $(LIBS_POSIX32)
$(MAKE) -C source/bridges-plugin posix32
$(MAKE) -C source/discovery posix32

@@ -303,7 +196,7 @@ LIBS_POSIX64 += $(MODULEDIR)/juce_gui_basics.posix64.a
LIBS_POSIX64 += $(MODULEDIR)/juce_gui_extra.posix64.a
endif

posix64: config $(LIBS_POSIX64)
posix64: $(LIBS_POSIX64)
$(MAKE) -C source/bridges-plugin posix64
$(MAKE) -C source/discovery posix64

@@ -321,7 +214,7 @@ LIBS_WIN32 += $(MODULEDIR)/juce_gui_basics.win32.a
LIBS_WIN32 += $(MODULEDIR)/lilv.win32.a
LIBS_WIN32 += $(MODULEDIR)/rtmempool.win32.a

win32: config $(LIBS_WIN32)
win32: $(LIBS_WIN32)
$(MAKE) -C source/bridges-plugin win32
$(MAKE) -C source/discovery win32

@@ -339,18 +232,18 @@ LIBS_WIN64 += $(MODULEDIR)/juce_gui_basics.win64.a
LIBS_WIN64 += $(MODULEDIR)/lilv.win64.a
LIBS_WIN64 += $(MODULEDIR)/rtmempool.win64.a

win64: config $(LIBS_WIN64)
win64: $(LIBS_WIN64)
$(MAKE) -C source/bridges-plugin win64
$(MAKE) -C source/discovery win64

# ----------------------------------------------------------------------------------------------------------------------------
# Binaries (wine)

wine32: config
wine32:
$(MAKE) -C source/jackbridge wine32
cp -f $(MODULEDIR)/jackbridge-wine32.dll.so $(BINDIR)/jackbridge-wine32.dll

wine64: config
wine64:
$(MAKE) -C source/jackbridge wine64
cp -f $(MODULEDIR)/jackbridge-wine64.dll.so $(BINDIR)/jackbridge-wine64.dll

@@ -400,9 +293,19 @@ RES = \
bin/resources/ui_carla_settings.py \
bin/resources/ui_carla_settings_driver.py \
bin/resources/ui_inputdialog_value.py \
source/carla_config.py \
source/resources_rc.py

RES: config $(RES)
RES: $(RES)

source/carla_config.py:
@echo "#!/usr/bin/env python3" > $@
@echo "# -*- coding: utf-8 -*-" >> $@
ifeq ($(DEFAULT_QT),4)
@echo "config_UseQt5 = False" >> $@
else
@echo "config_UseQt5 = True" >> $@
endif

source/resources_rc.py: resources/resources.qrc resources/*/*.png resources/*/*.svg
$(PYRCC) $< -o $@
@@ -437,7 +340,7 @@ UIs = \
source/ui_carla_settings_driver.py \
source/ui_inputdialog_value.py

UI: config $(UIs)
UI: $(UIs)

source/ui_%.py: resources/ui/%.ui
$(PYUIC) $< -o $@
@@ -458,7 +361,7 @@ WIDGETS = \
source/pixmapkeyboard.py \
source/racklistwidget.py

WIDGETS: config $(WIDGETS)
WIDGETS: $(WIDGETS)

source/%.py: source/widgets/%.py
$(LINK) widgets/$*.py $@
@@ -476,7 +379,6 @@ clean:
rm -f $(UIs)
rm -f $(WIDGETS)
rm -f *~ source/*~ source/*.pyc source/*_rc.py source/ui_*.py
rm -f source/carla_config.py source/includes/config.h

distclean: clean
rm -f bin/*.dll bin/*.so
@@ -608,7 +510,6 @@ endif

install -m 644 \
source/includes/CarlaDefines.h \
source/includes/config.h \
$(DESTDIR)$(PREFIX)/include/carla/includes/

# Install resources


+ 32
- 0
source/Makefile.mk View File

@@ -172,8 +172,10 @@ HAVE_PROJECTM = $(shell pkg-config --exists libprojectM && echo true)
HAVE_ZYN_DEPS = $(shell pkg-config --exists fftw3 mxml zlib && echo true)
HAVE_ZYN_UI_DEPS = $(shell pkg-config --exists ntk_images ntk && echo true)

ifeq ($(UNIX),true)
# libmagic doesn't have a pkg-config file, so we need to call the compiler to test it
HAVE_LIBMAGIC = $(shell echo '\#include <magic.h>' | $(CC) $(CFLAGS) -x c -w -c - -o .libmagic-tmp 2>/dev/null && echo true)
endif

# --------------------------------------------------------------
# Set Qt tools
@@ -251,6 +253,34 @@ endif
# --------------------------------------------------------------
# Set base defines

ifeq ($(HAVE_DGL),true)
BASE_FLAGS += -DHAVE_DGL
endif

ifeq ($(HAVE_LIBLO),true)
BASE_FLAGS += -DHAVE_LIBLO
endif

ifeq ($(HAVE_LIBMAGIC),true)
BASE_FLAGS += -DHAVE_LIBMAGIC
endif

ifeq ($(HAVE_FLUIDSYNTH),true)
BASE_FLAGS += -DHAVE_FLUIDSYNTH
endif

ifeq ($(HAVE_LINUXSAMPLER),true)
BASE_FLAGS += -DHAVE_LINUXSAMPLER
endif

ifeq ($(HAVE_PROJECTM),true)
BASE_FLAGS += -DHAVE_PROJECTM
endif

ifeq ($(HAVE_X11),true)
BASE_FLAGS += -DHAVE_X11
endif

ifeq ($(CARLA_VESTIGE_HEADER),true)
BASE_FLAGS += -DVESTIGE_HEADER
endif
@@ -347,8 +377,10 @@ endif
# Set libs stuff (part 3)

ifeq ($(HAVE_ZYN_DEPS),true)
NATIVE_PLUGINS_FLAGS += -DHAVE_ZYN_DEPS
NATIVE_PLUGINS_LIBS += $(shell pkg-config --libs fftw3 mxml zlib)
ifeq ($(HAVE_ZYN_UI_DEPS),true)
NATIVE_PLUGINS_FLAGS += -DHAVE_ZYN_UI_DEPS
NATIVE_PLUGINS_LIBS += $(shell pkg-config --libs ntk_images ntk)
endif
endif


+ 4
- 2
source/includes/CarlaDefines.h View File

@@ -18,8 +18,10 @@
#ifndef CARLA_DEFINES_H_INCLUDED
#define CARLA_DEFINES_H_INCLUDED

/* Configuration */
#include "config.h"
/* IDE Helper */
#ifndef REAL_BUILD
# include "config.h"
#endif

/* Compatibility with non-clang compilers */
#ifndef __has_feature


+ 5
- 5
source/native-plugins/Makefile View File

@@ -183,27 +183,27 @@ $(OBJDIR)/%.c.o: %.c
$(OBJDIR)/distrho-3bandeq.cpp.o: distrho-3bandeq.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling $<"
@$(CXX) $< $(BUILD_CXX_FLAGS) -DDISTRHO_NAMESPACE=DISTRHO_3BandEQ -Idistrho-3bandeq -I$(CWD)/modules/dgl -c -o $@
@$(CXX) $< $(BUILD_CXX_FLAGS) -DDISTRHO_NAMESPACE=DISTRHO_3BandEQ -Idistrho-3bandeq -I$(CWD)/modules/dgl -Wno-effc++ -c -o $@

$(OBJDIR)/distrho-3bandsplitter.cpp.o: distrho-3bandsplitter.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling $<"
@$(CXX) $< $(BUILD_CXX_FLAGS) -DDISTRHO_NAMESPACE=DISTRHO_3BandSplitter -Idistrho-3bandsplitter -I$(CWD)/modules/dgl -c -o $@
@$(CXX) $< $(BUILD_CXX_FLAGS) -DDISTRHO_NAMESPACE=DISTRHO_3BandSplitter -Idistrho-3bandsplitter -I$(CWD)/modules/dgl -Wno-effc++ -c -o $@

$(OBJDIR)/distrho-mverb.cpp.o: distrho-mverb.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling $<"
@$(CXX) $< $(BUILD_CXX_FLAGS) -DDISTRHO_NAMESPACE=DISTRHO_MVerb -Idistrho-mverb -I$(CWD)/modules/dgl -c -o $@
@$(CXX) $< $(BUILD_CXX_FLAGS) -DDISTRHO_NAMESPACE=DISTRHO_MVerb -Idistrho-mverb -I$(CWD)/modules/dgl -Wno-effc++ -c -o $@

$(OBJDIR)/distrho-nekobi.cpp.o: distrho-nekobi.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling $<"
@$(CXX) $< $(BUILD_CXX_FLAGS) -DDISTRHO_NAMESPACE=DISTRHO_Nekobi -Idistrho-nekobi -I$(CWD)/modules/dgl -c -o $@
@$(CXX) $< $(BUILD_CXX_FLAGS) -DDISTRHO_NAMESPACE=DISTRHO_Nekobi -Idistrho-nekobi -I$(CWD)/modules/dgl -Wno-effc++ -c -o $@

$(OBJDIR)/distrho-pingpongpan.cpp.o: distrho-pingpongpan.cpp
-@mkdir -p $(OBJDIR)
@echo "Compiling $<"
@$(CXX) $< $(BUILD_CXX_FLAGS) -DDISTRHO_NAMESPACE=DISTRHO_PingPongPan -Idistrho-pingpongpan -I$(CWD)/modules/dgl -c -o $@
@$(CXX) $< $(BUILD_CXX_FLAGS) -DDISTRHO_NAMESPACE=DISTRHO_PingPongPan -Idistrho-pingpongpan -I$(CWD)/modules/dgl -Wno-effc++ -c -o $@

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



Loading…
Cancel
Save