diff options
author | falkTX <falktx@gmail.com> | 2018-09-27 21:03:07 +0200 |
---|---|---|
committer | falkTX <falktx@gmail.com> | 2018-09-27 21:03:07 +0200 |
commit | dd1e050ad0ba751be373cbe27c89ee3b2052f9b2 (patch) | |
tree | d8241a487aa50c02b73bd2091271e64b657e148a | |
parent | 95895d9b5dc193fe45904bf6c7ff8a77ba89406f (diff) |
Simplify makefiles, use rules directly from dpf
29 files changed, 210 insertions, 490 deletions
@@ -10,9 +10,6 @@ .kdev_include_paths .DS_Store -bin/*-dssi/ -bin/*.lv2/ -bin/*.vst/ +bin/ +build/ libs/lv2_ttl_generator - -bin/* @@ -7,7 +7,7 @@ VERSION = $(shell cat .version) PLUGINS=ZamComp ZamCompX2 ZaMultiComp ZamTube ZamEQ2 ZamAutoSat ZamGEQ31 ZaMultiCompX2 ZamGate ZamGateX2 ZamHeadX2 ZaMaximX2 ZamDelay ZamDynamicEQ ZamPhono ZamVerb ZamGrains -include Makefile.mk +include dpf/Makefile.base.mk # -------------------------------------------------------------- diff --git a/Makefile.mk b/Makefile.mk deleted file mode 100644 index b53ca4e..0000000 --- a/Makefile.mk +++ /dev/null @@ -1,156 +0,0 @@ -#!/usr/bin/make -f -# Makefile for zam-plugins # -# ------------------------ # -# Created by falkTX -# - -AR ?= ar -CC ?= gcc -CXX ?= g++ - -# -------------------------------------------------------------- -# Fallback to Linux if no other OS defined - -ifneq ($(HAIKU),true) -ifneq ($(MACOS),true) -ifneq ($(WIN32),true) -LINUX=true -endif -endif -endif - -# -------------------------------------------------------------- -# Set build and link flags - -BASE_FLAGS = -Wall -Wextra -pipe -BASE_OPTS = -O2 -ffast-math -mtune=generic -msse -msse2 -fdata-sections -ffunction-sections - -ifneq ($(MACOS),true) -# MacOS doesn't support this -BASE_OPTS += -mfpmath=sse -endif - -ifeq ($(MACOS),true) -# MacOS linker flags -LINK_OPTS = -fdata-sections -ffunction-sections -Wl,-dead_strip -Wl,-dead_strip_dylibs -else -# Common linker flags -LINK_OPTS = -fdata-sections -ffunction-sections -Wl,--gc-sections -Wl,-O1 -Wl,--as-needed -Wl,--strip-all -endif - -ifeq ($(RASPPI),true) -# Raspberry-Pi optimization flags -BASE_OPTS = -O2 -ffast-math -march=armv6 -mfpu=vfp -mfloat-abi=hard -LINK_OPTS = -Wl,-O1 -Wl,--as-needed -Wl,--strip-all -endif - -ifeq ($(PANDORA),true) -# OpenPandora optimization flags -BASE_OPTS = -O2 -ffast-math -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -LINK_OPTS = -Wl,-O1 -Wl,--as-needed -Wl,--strip-all -endif - -ifeq ($(NOOPT),true) -# No optimization flags -BASE_OPTS = -O2 -ffast-math -fdata-sections -ffunction-sections -endif - -ifneq ($(WIN32),true) -# not needed for Windows -BASE_FLAGS += -fPIC -DPIC -endif - -ifeq ($(DEBUG),true) -BASE_FLAGS += -DDEBUG -O0 -g -LINK_OPTS = -else -BASE_FLAGS += -DNDEBUG $(BASE_OPTS) -fvisibility=hidden -CXXFLAGS += -fvisibility-inlines-hidden -endif - -BUILD_C_FLAGS = $(BASE_FLAGS) -std=c99 -std=gnu99 $(CFLAGS) -BUILD_CXX_FLAGS = $(BASE_FLAGS) -std=c++0x -std=gnu++0x $(CXXFLAGS) $(CPPFLAGS) -LINK_FLAGS = $(LINK_OPTS) -Wl,--no-undefined $(LDFLAGS) - -ifeq ($(MACOS),true) -# No C++11 support -BUILD_CXX_FLAGS = $(BASE_FLAGS) $(CXXFLAGS) $(CPPFLAGS) -LINK_FLAGS = $(LINK_OPTS) $(LDFLAGS) -endif - -# -------------------------------------------------------------- -# Check for optional libs - -ifeq ($(LINUX),true) -HAVE_DGL = $(shell pkg-config --exists gl x11 && echo true) -HAVE_JACK = $(shell pkg-config --exists jack && echo true) -HAVE_LIBLO = $(shell pkg-config --exists liblo && echo true) - -# Allow to use system provided libs -ifeq ($(USE_SYSTEM_LIBS),1) -HAVE_ZITA_CONVOLVER = true -ZITA_CONVOLVER_LIBS = -lzita-convolver -BASE_FLAGS += -I/usr/include -export HAVE_ZITA_CONVOLVER -endif - -endif - -ifeq ($(MACOS),true) -HAVE_DGL = true -endif - -ifeq ($(WIN32),true) -HAVE_DGL = true -endif - -# -------------------------------------------------------------- -# Set libs stuff - -ifeq ($(HAVE_DGL),true) - -ifeq ($(LINUX),true) -DGL_FLAGS = $(shell pkg-config --cflags gl x11) -DGL_LIBS = $(shell pkg-config --libs gl x11) -endif - -ifeq ($(MACOS),true) -DGL_LIBS = -framework OpenGL -framework Cocoa -endif - -ifeq ($(WIN32),true) -DGL_LIBS = -lopengl32 -lgdi32 -endif - -endif # HAVE_DGL - -# -------------------------------------------------------------- -# Set app extension - -ifeq ($(WIN32),true) -APP_EXT = .exe -endif - -# -------------------------------------------------------------- -# Set shared lib extension - -LIB_EXT = .so - -ifeq ($(MACOS),true) -LIB_EXT = .dylib -endif - -ifeq ($(WIN32),true) -LIB_EXT = .dll -endif - -# -------------------------------------------------------------- -# Set shared library CLI arg - -SHARED = -shared - -ifeq ($(MACOS),true) -SHARED = -dynamiclib -endif - -# -------------------------------------------------------------- diff --git a/bin/README b/bin/README deleted file mode 100644 index 17947b7..0000000 --- a/bin/README +++ /dev/null @@ -1,3 +0,0 @@ -All final plugin builds will be placed in this folder. - - diff --git a/dpf b/dpf -Subproject 03a3afd4e8880fd420e8a6a55bd9ec0f8ece0e6 +Subproject ea7545a13ab9793b5608b13a82f1ad9cf9ec5e9 diff --git a/plugins/Makefile.mk b/plugins/Makefile.mk deleted file mode 100644 index a734092..0000000 --- a/plugins/Makefile.mk +++ /dev/null @@ -1,165 +0,0 @@ -#!/usr/bin/make -f -# Makefile for zam-plugins # -# ------------------------ # -# Created by falkTX -# - -# NAME, OBJS_DSP and OBJS_UI have been defined before - -include ../../Makefile.mk - -ifeq ($(OBJS_UI),) -HAVE_DGL = false -endif - -# -------------------------------------------------------------- -# Basic setup - -TARGET_DIR = ../../bin - - -ifeq ($(LINUX),true) -LINK_FLAGS += $(shell pkg-config --libs fftw3f samplerate) -LINK_FLAGS += -lpthread -endif - -ifneq ($(LINUX),true) -LINK_FLAGS += $(shell pkg-config --libs --static fftw3f samplerate) -LINK_FLAGS += -lpthread -endif - -BUILD_C_FLAGS += -I. -BUILD_CXX_FLAGS += -I. -I.. -I../../dpf/distrho -I../../dpf/dgl -BUILD_CXX_FLAGS += $(shell pkg-config --cflags samplerate fftw3f) - -ifeq ($(HAVE_DGL),true) -BASE_FLAGS += -DHAVE_DGL -endif - -ifeq ($(HAVE_JACK),true) -BASE_FLAGS += -DHAVE_JACK -endif - -ifeq ($(HAVE_LIBLO),true) -BASE_FLAGS += -DHAVE_LIBLO -endif - -# -------------------------------------------------------------- -# Set plugin binary file targets - -jack = $(TARGET_DIR)/$(NAME)$(APP_EXT) -ladspa_dsp = $(TARGET_DIR)/$(NAME)-ladspa$(LIB_EXT) -dssi_dsp = $(TARGET_DIR)/$(NAME)-dssi$(LIB_EXT) -dssi_ui = $(TARGET_DIR)/$(NAME)-dssi/$(NAME)_ui$(APP_EXT) -lv2 = $(TARGET_DIR)/$(NAME).lv2/$(NAME)$(LIB_EXT) -lv2_dsp = $(TARGET_DIR)/$(NAME).lv2/$(NAME)_dsp$(LIB_EXT) -lv2_ui = $(TARGET_DIR)/$(NAME).lv2/$(NAME)_ui$(LIB_EXT) -vst = $(TARGET_DIR)/$(NAME)-vst$(LIB_EXT) - -# -------------------------------------------------------------- -# Set distrho code files - -DISTRHO_PLUGIN_FILES = ../../dpf/distrho/DistrhoPluginMain.cpp - -ifeq ($(HAVE_DGL),true) -DISTRHO_UI_FILES = ../../dpf/distrho/DistrhoUIMain.cpp ../../dpf/build/libdgl.a -endif - -# -------------------------------------------------------------- -# Handle plugins without UI - -ifneq ($(HAVE_DGL),true) -dssi_ui = -lv2_ui = -DISTRHO_UI_FILES = -DGL_LIBS = -OBJS_UI = -endif - -# -------------------------------------------------------------- -# all needs to be first - -all: - -# -------------------------------------------------------------- -# Common - -%.c.o: %.c - $(CC) $< $(BUILD_C_FLAGS) -MD -MP -c -o $@ - -%.cpp.o: %.cpp - $(CXX) $< $(BUILD_CXX_FLAGS) -MD -MP -c -o $@ - -clean: - rm -f *.d *.o - rm -rf $(TARGET_DIR)/$(NAME) $(TARGET_DIR)/$(NAME)-* $(TARGET_DIR)/$(NAME).lv2/ - -# -------------------------------------------------------------- -# JACK - -jack: $(jack) - -$(jack): $(OBJS_DSP) $(OBJS_UI) $(DISTRHO_PLUGIN_FILES) $(DISTRHO_UI_FILES) - mkdir -p $(shell dirname $@) - $(CXX) $^ $(BUILD_CXX_FLAGS) $(LINK_FLAGS) $(DGL_LIBS) $(shell pkg-config --cflags --libs jack) -DDISTRHO_PLUGIN_TARGET_JACK -o $@ - -# -------------------------------------------------------------- -# LADSPA - -ladspa: $(ladspa_dsp) - -$(ladspa_dsp): $(OBJS_DSP) $(DISTRHO_PLUGIN_FILES) - mkdir -p $(shell dirname $@) - $(CXX) $^ $(BUILD_CXX_FLAGS) $(LINK_FLAGS) $(SHARED) -DDISTRHO_PLUGIN_TARGET_LADSPA -o $@ - -# -------------------------------------------------------------- -# DSSI - -dssi: $(dssi_dsp) $(dssi_ui) -dssi_dsp: $(dssi_dsp) -dssi_ui: $(dssi_ui) - -$(dssi_dsp): $(OBJS_DSP) $(DISTRHO_PLUGIN_FILES) - mkdir -p $(shell dirname $@) - $(CXX) $^ $(BUILD_CXX_FLAGS) $(LINK_FLAGS) $(SHARED) -DDISTRHO_PLUGIN_TARGET_DSSI -o $@ - -$(dssi_ui): $(OBJS_UI) $(DISTRHO_UI_FILES) - mkdir -p $(shell dirname $@) - $(CXX) $^ $(BUILD_CXX_FLAGS) $(LINK_FLAGS) $(DGL_LIBS) $(shell pkg-config --cflags --libs liblo) -DDISTRHO_PLUGIN_TARGET_DSSI -o $@ - -# -------------------------------------------------------------- -# LV2 - -lv2_one: $(lv2) -lv2_dsp: $(lv2_dsp) -lv2_sep: $(lv2_dsp) $(lv2_ui) - -$(lv2): $(OBJS_DSP) $(OBJS_UI) $(DISTRHO_PLUGIN_FILES) $(DISTRHO_UI_FILES) - mkdir -p $(shell dirname $@) - $(CXX) $^ $(BUILD_CXX_FLAGS) $(LINK_FLAGS) $(DGL_LIBS) $(SHARED) -DDISTRHO_PLUGIN_TARGET_LV2 -o $@ - -$(lv2_dsp): $(OBJS_DSP) $(DISTRHO_PLUGIN_FILES) - mkdir -p $(shell dirname $@) - $(CXX) $^ $(BUILD_CXX_FLAGS) $(LINK_FLAGS) $(SHARED) -DDISTRHO_PLUGIN_TARGET_LV2 -o $@ - -$(lv2_ui): $(OBJS_UI) $(DISTRHO_UI_FILES) - mkdir -p $(shell dirname $@) - $(CXX) $^ $(BUILD_CXX_FLAGS) $(LINK_FLAGS) $(DGL_LIBS) $(SHARED) -DDISTRHO_PLUGIN_TARGET_LV2 -o $@ - -# -------------------------------------------------------------- -# VST - -vst: $(vst) - -$(vst): $(OBJS_DSP) $(OBJS_UI) $(DISTRHO_PLUGIN_FILES) $(DISTRHO_UI_FILES) - mkdir -p $(shell dirname $@) - $(CXX) $^ $(BUILD_CXX_FLAGS) $(LINK_FLAGS) $(DGL_LIBS) $(SHARED) -DDISTRHO_PLUGIN_TARGET_VST -o $@ - -# -------------------------------------------------------------- - --include $(OBJS_DSP:%.o=%.d) -ifeq ($(HAVE_DGL),true) --include $(OBJS_UI:%.o=%.d) -endif - -# -------------------------------------------------------------- diff --git a/plugins/ZaMaximX2/Makefile b/plugins/ZaMaximX2/Makefile index 91f249c..9cfe81b 100644 --- a/plugins/ZaMaximX2/Makefile +++ b/plugins/ZaMaximX2/Makefile @@ -12,17 +12,17 @@ NAME = ZaMaximX2 # -------------------------------------------------------------- # Files to build -OBJS_DSP = \ - ZaMaximX2Plugin.cpp.o +FILES_DSP = \ + ZaMaximX2Plugin.cpp -OBJS_UI = \ - ZaMaximX2Artwork.cpp.o \ - ZaMaximX2UI.cpp.o +FILES_UI = \ + ZaMaximX2Artwork.cpp \ + ZaMaximX2UI.cpp # -------------------------------------------------------------- # Do some magic -include ../Makefile.mk +include ../../dpf/Makefile.plugins.mk # -------------------------------------------------------------- # Enable all possible plugin types diff --git a/plugins/ZaMultiComp/Makefile b/plugins/ZaMultiComp/Makefile index cee399e..cbdb913 100644 --- a/plugins/ZaMultiComp/Makefile +++ b/plugins/ZaMultiComp/Makefile @@ -12,17 +12,17 @@ NAME = ZaMultiComp # -------------------------------------------------------------- # Files to build -OBJS_DSP = \ - ZaMultiCompPlugin.cpp.o +FILES_DSP = \ + ZaMultiCompPlugin.cpp -OBJS_UI = \ - ZaMultiCompArtwork.cpp.o \ - ZaMultiCompUI.cpp.o +FILES_UI = \ + ZaMultiCompArtwork.cpp \ + ZaMultiCompUI.cpp # -------------------------------------------------------------- # Do some magic -include ../Makefile.mk +include ../../dpf/Makefile.plugins.mk # -------------------------------------------------------------- # Enable all possible plugin types diff --git a/plugins/ZaMultiCompX2/Makefile b/plugins/ZaMultiCompX2/Makefile index c2ca66c..e67faee 100644 --- a/plugins/ZaMultiCompX2/Makefile +++ b/plugins/ZaMultiCompX2/Makefile @@ -12,17 +12,17 @@ NAME = ZaMultiCompX2 # -------------------------------------------------------------- # Files to build -OBJS_DSP = \ - ZaMultiCompX2Plugin.cpp.o +FILES_DSP = \ + ZaMultiCompX2Plugin.cpp -OBJS_UI = \ - ZaMultiCompX2Artwork.cpp.o \ - ZaMultiCompX2UI.cpp.o +FILES_UI = \ + ZaMultiCompX2Artwork.cpp \ + ZaMultiCompX2UI.cpp # -------------------------------------------------------------- # Do some magic -include ../Makefile.mk +include ../../dpf/Makefile.plugins.mk # -------------------------------------------------------------- # Enable all possible plugin types diff --git a/plugins/ZamAutoSat/Makefile b/plugins/ZamAutoSat/Makefile index 63027aa..e82baf9 100644 --- a/plugins/ZamAutoSat/Makefile +++ b/plugins/ZamAutoSat/Makefile @@ -12,17 +12,17 @@ NAME = ZamAutoSat # -------------------------------------------------------------- # Files to build -OBJS_DSP = \ - ZamAutoSatPlugin.cpp.o +FILES_DSP = \ + ZamAutoSatPlugin.cpp -OBJS_UI = \ - ZamAutoSatArtwork.cpp.o \ - ZamAutoSatUI.cpp.o +FILES_UI = \ + ZamAutoSatArtwork.cpp \ + ZamAutoSatUI.cpp # -------------------------------------------------------------- # Do some magic -include ../Makefile.mk +include ../../dpf/Makefile.plugins.mk # -------------------------------------------------------------- # Enable all possible plugin types diff --git a/plugins/ZamChild670/Makefile b/plugins/ZamChild670/Makefile index 6cd1d3c..844a706 100644 --- a/plugins/ZamChild670/Makefile +++ b/plugins/ZamChild670/Makefile @@ -12,22 +12,22 @@ NAME = ZamChild670 # -------------------------------------------------------------- # Files to build -OBJS_DSP = \ - ZamChild670Plugin.cpp.o \ - sidechainamplifier.cpp.o \ - tubemodel.cpp.o \ - variablemuamplifier.cpp.o \ - wdfcircuits.cpp.o \ - wavechild670.cpp.o - -OBJS_UI = \ - ZamChild670Artwork.cpp.o \ - ZamChild670UI.cpp.o +FILES_DSP = \ + ZamChild670Plugin.cpp \ + sidechainamplifier.cpp \ + tubemodel.cpp \ + variablemuamplifier.cpp \ + wdfcircuits.cpp \ + wavechild670.cpp + +FILES_UI = \ + ZamChild670Artwork.cpp \ + ZamChild670UI.cpp # -------------------------------------------------------------- # Do some magic -include ../Makefile.mk +include ../../dpf/Makefile.plugins.mk # -------------------------------------------------------------- # Enable all possible plugin types diff --git a/plugins/ZamComp/Makefile b/plugins/ZamComp/Makefile index 06806b4..50781bb 100644 --- a/plugins/ZamComp/Makefile +++ b/plugins/ZamComp/Makefile @@ -12,17 +12,17 @@ NAME = ZamComp # -------------------------------------------------------------- # Files to build -OBJS_DSP = \ - ZamCompPlugin.cpp.o +FILES_DSP = \ + ZamCompPlugin.cpp -OBJS_UI = \ - ZamCompArtwork.cpp.o \ - ZamCompUI.cpp.o +FILES_UI = \ + ZamCompArtwork.cpp \ + ZamCompUI.cpp # -------------------------------------------------------------- # Do some magic -include ../Makefile.mk +include ../../dpf/Makefile.plugins.mk # -------------------------------------------------------------- # Enable all possible plugin types diff --git a/plugins/ZamCompX2/Makefile b/plugins/ZamCompX2/Makefile index 8378bd0..67e6cf4 100644 --- a/plugins/ZamCompX2/Makefile +++ b/plugins/ZamCompX2/Makefile @@ -12,17 +12,17 @@ NAME = ZamCompX2 # -------------------------------------------------------------- # Files to build -OBJS_DSP = \ - ZamCompX2Plugin.cpp.o +FILES_DSP = \ + ZamCompX2Plugin.cpp -OBJS_UI = \ - ZamCompX2Artwork.cpp.o \ - ZamCompX2UI.cpp.o +FILES_UI = \ + ZamCompX2Artwork.cpp \ + ZamCompX2UI.cpp # -------------------------------------------------------------- # Do some magic -include ../Makefile.mk +include ../../dpf/Makefile.plugins.mk # -------------------------------------------------------------- # Enable all possible plugin types diff --git a/plugins/ZamDelay/Makefile b/plugins/ZamDelay/Makefile index 6dbf2fe..4007e05 100644 --- a/plugins/ZamDelay/Makefile +++ b/plugins/ZamDelay/Makefile @@ -12,17 +12,17 @@ NAME = ZamDelay # -------------------------------------------------------------- # Files to build -OBJS_DSP = \ - ZamDelayPlugin.cpp.o +FILES_DSP = \ + ZamDelayPlugin.cpp -OBJS_UI = \ - ZamDelayArtwork.cpp.o \ - ZamDelayUI.cpp.o +FILES_UI = \ + ZamDelayArtwork.cpp \ + ZamDelayUI.cpp # -------------------------------------------------------------- # Do some magic -include ../Makefile.mk +include ../../dpf/Makefile.plugins.mk # -------------------------------------------------------------- # Enable all possible plugin types diff --git a/plugins/ZamDynamicEQ/Makefile b/plugins/ZamDynamicEQ/Makefile index c65a8f4..8257443 100644 --- a/plugins/ZamDynamicEQ/Makefile +++ b/plugins/ZamDynamicEQ/Makefile @@ -12,17 +12,17 @@ NAME = ZamDynamicEQ # -------------------------------------------------------------- # Files to build -OBJS_DSP = \ - ZamDynamicEQPlugin.cpp.o +FILES_DSP = \ + ZamDynamicEQPlugin.cpp -OBJS_UI = \ - ZamDynamicEQArtwork.cpp.o \ - ZamDynamicEQUI.cpp.o +FILES_UI = \ + ZamDynamicEQArtwork.cpp \ + ZamDynamicEQUI.cpp # -------------------------------------------------------------- # Do some magic -include ../Makefile.mk +include ../../dpf/Makefile.plugins.mk # -------------------------------------------------------------- # Enable all possible plugin types diff --git a/plugins/ZamEQ2/Makefile b/plugins/ZamEQ2/Makefile index 4f7551c..1f70140 100644 --- a/plugins/ZamEQ2/Makefile +++ b/plugins/ZamEQ2/Makefile @@ -12,17 +12,17 @@ NAME = ZamEQ2 # -------------------------------------------------------------- # Files to build -OBJS_DSP = \ - ZamEQ2Plugin.cpp.o +FILES_DSP = \ + ZamEQ2Plugin.cpp -OBJS_UI = \ - ZamEQ2Artwork.cpp.o \ - ZamEQ2UI.cpp.o +FILES_UI = \ + ZamEQ2Artwork.cpp \ + ZamEQ2UI.cpp # -------------------------------------------------------------- # Do some magic -include ../Makefile.mk +include ../../dpf/Makefile.plugins.mk # -------------------------------------------------------------- # Enable all possible plugin types diff --git a/plugins/ZamGEQ31/Makefile b/plugins/ZamGEQ31/Makefile index 7279ee4..b11f6bd 100644 --- a/plugins/ZamGEQ31/Makefile +++ b/plugins/ZamGEQ31/Makefile @@ -12,17 +12,17 @@ NAME = ZamGEQ31 # -------------------------------------------------------------- # Files to build -OBJS_DSP = \ - ZamGEQ31Plugin.cpp.o +FILES_DSP = \ + ZamGEQ31Plugin.cpp -OBJS_UI = \ - ZamGEQ31Artwork.cpp.o \ - ZamGEQ31UI.cpp.o +FILES_UI = \ + ZamGEQ31Artwork.cpp \ + ZamGEQ31UI.cpp # -------------------------------------------------------------- # Do some magic -include ../Makefile.mk +include ../../dpf/Makefile.plugins.mk # -------------------------------------------------------------- # Enable all possible plugin types diff --git a/plugins/ZamGate/Makefile b/plugins/ZamGate/Makefile index 98189f1..dc94441 100644 --- a/plugins/ZamGate/Makefile +++ b/plugins/ZamGate/Makefile @@ -12,17 +12,17 @@ NAME = ZamGate # -------------------------------------------------------------- # Files to build -OBJS_DSP = \ - ZamGatePlugin.cpp.o +FILES_DSP = \ + ZamGatePlugin.cpp -OBJS_UI = \ - ZamGateArtwork.cpp.o \ - ZamGateUI.cpp.o +FILES_UI = \ + ZamGateArtwork.cpp \ + ZamGateUI.cpp # -------------------------------------------------------------- # Do some magic -include ../Makefile.mk +include ../../dpf/Makefile.plugins.mk # -------------------------------------------------------------- # Enable all possible plugin types diff --git a/plugins/ZamGateX2/Makefile b/plugins/ZamGateX2/Makefile index 03029b0..6a3df92 100644 --- a/plugins/ZamGateX2/Makefile +++ b/plugins/ZamGateX2/Makefile @@ -12,17 +12,17 @@ NAME = ZamGateX2 # -------------------------------------------------------------- # Files to build -OBJS_DSP = \ - ZamGateX2Plugin.cpp.o +FILES_DSP = \ + ZamGateX2Plugin.cpp -OBJS_UI = \ - ZamGateX2Artwork.cpp.o \ - ZamGateX2UI.cpp.o +FILES_UI = \ + ZamGateX2Artwork.cpp \ + ZamGateX2UI.cpp # -------------------------------------------------------------- # Do some magic -include ../Makefile.mk +include ../../dpf/Makefile.plugins.mk # -------------------------------------------------------------- # Enable all possible plugin types diff --git a/plugins/ZamGrains/Makefile b/plugins/ZamGrains/Makefile index 1652a7d..b8f9cb5 100644 --- a/plugins/ZamGrains/Makefile +++ b/plugins/ZamGrains/Makefile @@ -12,17 +12,17 @@ NAME = ZamGrains # -------------------------------------------------------------- # Files to build -OBJS_DSP = \ - ZamGrainsPlugin.cpp.o +FILES_DSP = \ + ZamGrainsPlugin.cpp -OBJS_UI = \ - ZamGrainsArtwork.cpp.o \ - ZamGrainsUI.cpp.o +FILES_UI = \ + ZamGrainsArtwork.cpp \ + ZamGrainsUI.cpp # -------------------------------------------------------------- # Do some magic -include ../Makefile.mk +include ../../dpf/Makefile.plugins.mk # -------------------------------------------------------------- # Enable all possible plugin types diff --git a/plugins/ZamHeadX2/Makefile b/plugins/ZamHeadX2/Makefile index 28e6931..07ceedf 100644 --- a/plugins/ZamHeadX2/Makefile +++ b/plugins/ZamHeadX2/Makefile @@ -12,22 +12,44 @@ NAME = ZamHeadX2 # -------------------------------------------------------------- # Files to build +FILES_DSP += \ + convolution.cpp \ + ZamHeadX2Plugin.cpp \ + zita-convolver.cpp + ifneq ($(HAVE_ZITA_CONVOLVER),true) -OBJS_DSP = ../../lib/zita-convolver-4.0.0/zita-convolver.cpp.o +FILES_DSP += \ + zita-convolver.cpp endif -OBJS_DSP += \ - convolution.cpp.o \ - ZamHeadX2Plugin.cpp.o - -OBJS_UI = \ - ZamHeadX2Artwork.cpp.o \ - ZamHeadX2UI.cpp.o +FILES_UI = \ + ZamHeadX2Artwork.cpp \ + ZamHeadX2UI.cpp # -------------------------------------------------------------- # Do some magic -include ../Makefile.mk +include ../../dpf/Makefile.plugins.mk + +ifeq ($(HAVE_ZITA_CONVOLVER),true) +BASE_FLAGS += -DHAVE_ZITA_CONVOLVER +LINK_FLAGS += $(ZITA_CONVOLVER_LIBS) +else +include ../zita-convolver.mk +endif + +# -------------------------------------------------------------- +# Extra flags + +ifeq ($(LINUX),true) +BASE_FLAGS += $(shell pkg-config --cflags samplerate fftw3f) +LINK_FLAGS += $(shell pkg-config --libs fftw3f samplerate) +else +BASE_FLAGS += $(shell pkg-config --static --cflags samplerate fftw3f) +LINK_FLAGS += $(shell pkg-config --static --libs fftw3f samplerate) +endif + +LINK_FLAGS += -lpthread # -------------------------------------------------------------- @@ -41,11 +63,6 @@ else TARGETS += lv2_dsp endif -ifeq ($(HAVE_ZITA_CONVOLVER),true) -BASE_FLAGS += -DHAVE_ZITA_CONVOLVER -LINK_FLAGS += $(ZITA_CONVOLVER_LIBS) -endif - TARGETS += vst all: $(TARGETS) diff --git a/plugins/ZamNoise/Makefile b/plugins/ZamNoise/Makefile index cc26e0f..3ac6ff7 100644 --- a/plugins/ZamNoise/Makefile +++ b/plugins/ZamNoise/Makefile @@ -12,18 +12,18 @@ NAME = ZamNoise # -------------------------------------------------------------- # Files to build -OBJS_DSP = \ - ZamNoisePlugin.cpp.o \ - Denoise.cpp.o +FILES_DSP = \ + ZamNoisePlugin.cpp \ + Denoise.cpp -OBJS_UI = \ - ZamNoiseArtwork.cpp.o \ - ZamNoiseUI.cpp.o +FILES_UI = \ + ZamNoiseArtwork.cpp \ + ZamNoiseUI.cpp # -------------------------------------------------------------- # Do some magic -include ../Makefile.mk +include ../../dpf/Makefile.plugins.mk # -------------------------------------------------------------- # Enable all possible plugin types diff --git a/plugins/ZamPhono/Makefile b/plugins/ZamPhono/Makefile index fb4de0f..b351ce2 100644 --- a/plugins/ZamPhono/Makefile +++ b/plugins/ZamPhono/Makefile @@ -12,17 +12,17 @@ NAME = ZamPhono # -------------------------------------------------------------- # Files to build -OBJS_DSP = \ - ZamPhonoPlugin.cpp.o +FILES_DSP = \ + ZamPhonoPlugin.cpp -OBJS_UI = \ - ZamPhonoArtwork.cpp.o \ - ZamPhonoUI.cpp.o +FILES_UI = \ + ZamPhonoArtwork.cpp \ + ZamPhonoUI.cpp # -------------------------------------------------------------- # Do some magic -include ../Makefile.mk +include ../../dpf/Makefile.plugins.mk # -------------------------------------------------------------- # Enable all possible plugin types diff --git a/plugins/ZamPiano/Makefile b/plugins/ZamPiano/Makefile index f4b5ca3..42badd8 100644 --- a/plugins/ZamPiano/Makefile +++ b/plugins/ZamPiano/Makefile @@ -12,19 +12,19 @@ NAME = ZamPiano # -------------------------------------------------------------- # Files to build -OBJS_DSP = \ - instrument.cpp.o \ - PianoNote.cpp.o \ - ZamPianoPlugin.cpp.o +FILES_DSP = \ + instrument.cpp \ + PianoNote.cpp \ + ZamPianoPlugin.cpp -OBJS_UI = \ - ZamPianoArtwork.cpp.o \ - ZamPianoUI.cpp.o +FILES_UI = \ + ZamPianoArtwork.cpp \ + ZamPianoUI.cpp # -------------------------------------------------------------- # Do some magic -include ../Makefile.mk +include ../../dpf/Makefile.plugins.mk # -------------------------------------------------------------- # Enable all possible plugin types diff --git a/plugins/ZamSFZ/Makefile b/plugins/ZamSFZ/Makefile index a03419d..2279b36 100644 --- a/plugins/ZamSFZ/Makefile +++ b/plugins/ZamSFZ/Makefile @@ -12,19 +12,19 @@ NAME = ZamSFZ # -------------------------------------------------------------- # Files to build -OBJS_DSP = \ - libsfz/sfz.cpp.o \ - Sfz.cpp.o \ - ZamSFZPlugin.cpp.o +FILES_DSP = \ + libsfz/sfz.cpp \ + Sfz.cpp \ + ZamSFZPlugin.cpp -OBJS_UI = \ - ZamSFZArtwork.cpp.o \ - ZamSFZUI.cpp.o +FILES_UI = \ + ZamSFZArtwork.cpp \ + ZamSFZUI.cpp # -------------------------------------------------------------- # Do some magic -include ../Makefile.mk +include ../../dpf/Makefile.plugins.mk # -------------------------------------------------------------- # Extra flags diff --git a/plugins/ZamSynth/Makefile b/plugins/ZamSynth/Makefile index c1c7103..20bb571 100644 --- a/plugins/ZamSynth/Makefile +++ b/plugins/ZamSynth/Makefile @@ -12,17 +12,17 @@ NAME = ZamSynth # -------------------------------------------------------------- # Files to build -OBJS_DSP = \ - ZamSynthPlugin.cpp.o +FILES_DSP = \ + ZamSynthPlugin.cpp -OBJS_UI = \ - ZamSynthArtwork.cpp.o \ - ZamSynthUI.cpp.o +FILES_UI = \ + ZamSynthArtwork.cpp \ + ZamSynthUI.cpp # -------------------------------------------------------------- # Do some magic -include ../Makefile.mk +include ../../dpf/Makefile.plugins.mk # -------------------------------------------------------------- # Enable all possible plugin types diff --git a/plugins/ZamTube/Makefile b/plugins/ZamTube/Makefile index d641ac5..4420e46 100644 --- a/plugins/ZamTube/Makefile +++ b/plugins/ZamTube/Makefile @@ -12,18 +12,18 @@ NAME = ZamTube # -------------------------------------------------------------- # Files to build -OBJS_DSP = \ - ZamTubePlugin.cpp.o \ - triode.cpp.o +FILES_DSP = \ + ZamTubePlugin.cpp \ + triode.cpp -OBJS_UI = \ - ZamTubeArtwork.cpp.o \ - ZamTubeUI.cpp.o +FILES_UI = \ + ZamTubeArtwork.cpp \ + ZamTubeUI.cpp # -------------------------------------------------------------- # Do some magic -include ../Makefile.mk +include ../../dpf/Makefile.plugins.mk # -------------------------------------------------------------- # Enable all possible plugin types diff --git a/plugins/ZamVerb/Makefile b/plugins/ZamVerb/Makefile index a08e334..d60b1df 100644 --- a/plugins/ZamVerb/Makefile +++ b/plugins/ZamVerb/Makefile @@ -12,23 +12,44 @@ NAME = ZamVerb # -------------------------------------------------------------- # Files to build -OBJS_DSP = \ - ZamVerbPlugin.cpp.o \ - ZamVerbImpulses.cpp.o \ - convolution.cpp.o +FILES_DSP = \ + ZamVerbPlugin.cpp \ + ZamVerbImpulses.cpp \ + convolution.cpp ifneq ($(HAVE_ZITA_CONVOLVER),true) -OBJS_DSP += ../../lib/zita-convolver-4.0.0/zita-convolver.cpp.o +FILES_DSP += \ + zita-convolver.cpp endif -OBJS_UI = \ - ZamVerbArtwork.cpp.o \ - ZamVerbUI.cpp.o +FILES_UI = \ + ZamVerbArtwork.cpp \ + ZamVerbUI.cpp # -------------------------------------------------------------- # Do some magic -include ../Makefile.mk +include ../../dpf/Makefile.plugins.mk + +ifeq ($(HAVE_ZITA_CONVOLVER),true) +BASE_FLAGS += -DHAVE_ZITA_CONVOLVER +LINK_FLAGS += $(ZITA_CONVOLVER_LIBS) +else +include ../zita-convolver.mk +endif + +# -------------------------------------------------------------- +# Extra flags + +ifeq ($(LINUX),true) +BASE_FLAGS += $(shell pkg-config --cflags samplerate fftw3f) +LINK_FLAGS += $(shell pkg-config --libs fftw3f samplerate) +else +BASE_FLAGS += $(shell pkg-config --static --cflags samplerate fftw3f) +LINK_FLAGS += $(shell pkg-config --static --libs fftw3f samplerate) +endif + +LINK_FLAGS += -lpthread # -------------------------------------------------------------- @@ -42,11 +63,6 @@ else TARGETS += lv2_dsp endif -ifeq ($(HAVE_ZITA_CONVOLVER),true) -BASE_FLAGS += -DHAVE_ZITA_CONVOLVER -LINK_FLAGS += $(ZITA_CONVOLVER_LIBS) -endif - TARGETS += vst all: $(TARGETS) diff --git a/plugins/zita-convolver.mk b/plugins/zita-convolver.mk new file mode 100644 index 0000000..042de6b --- /dev/null +++ b/plugins/zita-convolver.mk @@ -0,0 +1,14 @@ +#!/usr/bin/make -f +# Makefile for zita-convolver # +# -------------------------------- # +# Created by falkTX +# + +# NOTE: Makefile.plugins.mk must have been included before this file! + +$(BUILD_DIR)/zita-convolver.cpp.o: ../../lib/zita-convolver-4.0.0/zita-convolver.cpp + -@mkdir -p $(BUILD_DIR) + @echo "Compiling zita-convolver.cpp" + @$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@ + +-include $(BUILD_DIR)/zita-convolver.cpp.d |