summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfalkTX <falktx@gmail.com>2015-06-13 17:12:13 +0200
committerfalkTX <falktx@gmail.com>2015-06-13 17:12:13 +0200
commitf90ae6effcc933e55afebf601ea8f876598e69a2 (patch)
tree180a0d0362767307bb0872d29f8944ce0a220afd
parent7bf500ab4a849054464e2cf9a39400a3e7518191 (diff)
Update all Makefiles
-rw-r--r--Makefile38
-rw-r--r--Makefile.mk75
-rw-r--r--plugins/Makefile.mk63
-rw-r--r--plugins/ZaMultiComp/Makefile23
-rw-r--r--plugins/ZaMultiCompX2/Makefile23
-rw-r--r--plugins/ZamAutoSat/Makefile23
-rw-r--r--plugins/ZamChild670/Makefile23
-rw-r--r--plugins/ZamComp/Makefile23
-rw-r--r--plugins/ZamCompX2/Makefile23
-rw-r--r--plugins/ZamEQ2/Makefile23
-rw-r--r--plugins/ZamGEQ31/Makefile23
-rw-r--r--plugins/ZamGEQ31X2/Makefile23
-rw-r--r--plugins/ZamGate/Makefile23
-rw-r--r--plugins/ZamGateX2/Makefile23
-rw-r--r--plugins/ZamNoise/Makefile23
-rw-r--r--plugins/ZamPiano/Makefile24
-rw-r--r--plugins/ZamSFZ/Makefile24
-rw-r--r--plugins/ZamSynth/Makefile23
-rw-r--r--plugins/ZamTube/Makefile23
19 files changed, 446 insertions, 100 deletions
diff --git a/Makefile b/Makefile
index 81a6a91..0d2750c 100644
--- a/Makefile
+++ b/Makefile
@@ -8,23 +8,31 @@ VERSION = $(shell cat .version)
PLUGINS=ZamComp ZamCompX2 ZaMultiComp ZamTube ZamEQ2 ZamAutoSat ZamGEQ31 ZamGEQ31X2 ZaMultiCompX2 ZamGate ZamGateX2
#ZamPiano ZamSFZ ZamChild670
+include Makefile.mk
+
+# --------------------------------------------------------------
+
all: libs $(PLUGINS) gen
-libs: FORCE
- $(MAKE) -C libs/dgl
+libs:
+ifeq ($(HAVE_DGL),true)
+ $(MAKE) -C dpf/dgl
+endif
-gen: plugins libs/lv2_ttl_generator
- @./libs/generate-ttl.sh
+gen: $(PLUGINS) dpf/utils/lv2_ttl_generator
+ @$(CURDIR)/dpf/utils/generate-ttl.sh
ifeq ($(MACOS),true)
- @./libs/generate-vst-bundles.sh
+ @$(CURDIR)/dpf/utils/generate-vst-bundles.sh
endif
-libs/lv2_ttl_generator:
- $(MAKE) -C libs/lv2-ttl-generator
+dpf/utils/lv2_ttl_generator:
+ $(MAKE) -C dpf/utils/lv2-ttl-generator
$(PLUGINS): libs
$(MAKE) -C plugins/$@
+# --------------------------------------------------------------
+
install: all
install -d $(DESTDIR)$(PREFIX)/$(LIBDIR)/ladspa \
$(DESTDIR)$(PREFIX)/$(LIBDIR)/lv2 \
@@ -47,16 +55,18 @@ uninstall:
rm -f $(DESTDIR)$(PREFIX)/$(BINDIR)/"$$plugin" ; \
done
+# --------------------------------------------------------------
-plugins: FORCE
-
-
-clean: FORCE
+clean:
for plugin in $(PLUGINS); do \
- $(MAKE) PREFIX="$(PREFIX)" LIBDIR="$(LIBDIR)" -C plugins/"$$plugin" clean; \
+ $(MAKE) -C plugins/"$$plugin" clean; \
done
- $(MAKE) clean -C libs/dgl
- $(MAKE) clean -C libs/lv2-ttl-generator
+ifeq ($(HAVE_DGL),true)
+ $(MAKE) clean -C dpf/dgl
+endif
+ $(MAKE) clean -C dpf/utils/lv2-ttl-generator
+
+# --------------------------------------------------------------
.version: FORCE
if test -d .git; then \
diff --git a/Makefile.mk b/Makefile.mk
index 30e6703..7588326 100644
--- a/Makefile.mk
+++ b/Makefile.mk
@@ -4,6 +4,7 @@
# Created by falkTX
#
+AR ?= ar
CC ?= gcc
CXX ?= g++
@@ -19,38 +20,41 @@ endif
endif
# --------------------------------------------------------------
-# Common build and link flags
+# Set build and link flags
-BASE_FLAGS = -Wall -Wextra -pipe -Wno-switch -Wno-reorder
-BASE_OPTS = -O2 -ffast-math -fdata-sections -ffunction-sections
-ifneq ($(NOOPT),true)
-BASE_OPTS += -mtune=generic -msse -msse2 -mfpmath=sse
+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
-LINK_OPTS = -fdata-sections -ffunction-sections -Wl,-O1 -Wl,--as-needed -Wl,--gc-sections -Wl,--strip-all
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 flags
-BASE_OPTS = -O2 -ffast-math
-ifneq ($(NOOPT),true)
-BASE_OPTS += -march=armv6 -mfpu=vfp -mfloat-abi=hard
-endif
+# 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 flags
-BASE_OPTS = -O2 -ffast-math
-ifneq ($(NOOPT),true)
-BASE_OPTS += -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
-endif
+# 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
@@ -75,27 +79,27 @@ LINK_FLAGS = $(LINK_OPTS) $(LDFLAGS)
endif
# --------------------------------------------------------------
-# Check for required libs
+# Check for optional libs
ifeq ($(LINUX),true)
-ifneq ($(shell pkg-config --exists jack && echo true),true)
-$(error JACK missing, cannot continue)
-endif
-ifneq ($(shell pkg-config --exists gl && echo true),true)
-$(error OpenGL missing, cannot continue)
-endif
-ifneq ($(shell pkg-config --exists x11 && echo true),true)
-$(error X11 missing, cannot continue)
+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)
endif
+
+ifeq ($(MACOS),true)
+HAVE_DGL = true
endif
-ifneq ($(shell pkg-config --exists liblo && echo true),true)
-$(error liblo missing, cannot continue)
+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)
@@ -109,17 +113,26 @@ ifeq ($(WIN32),true)
DGL_LIBS = -lopengl32 -lgdi32
endif
+endif # HAVE_DGL
+
+# --------------------------------------------------------------
+# Set app extension
+
+ifeq ($(WIN32),true)
+APP_EXT = .exe
+endif
+
# --------------------------------------------------------------
-# Set extension
+# Set shared lib extension
-EXT = so
+LIB_EXT = .so
ifeq ($(MACOS),true)
-EXT = dylib
+LIB_EXT = .dylib
endif
ifeq ($(WIN32),true)
-EXT = dll
+LIB_EXT = .dll
endif
# --------------------------------------------------------------
diff --git a/plugins/Makefile.mk b/plugins/Makefile.mk
index 340de08..c2c2ff8 100644
--- a/plugins/Makefile.mk
+++ b/plugins/Makefile.mk
@@ -14,42 +14,53 @@ include ../../Makefile.mk
TARGET_DIR = ../../bin
BUILD_C_FLAGS += -I.
-BUILD_CXX_FLAGS += -I. -I.. -I../../libs/distrho -I../../libs/dgl
+BUILD_CXX_FLAGS += -I. -I../../dpf/distrho -I../../dpf/dgl
-# --------------------------------------------------------------
-# Set plugin binary file targets
+ifeq ($(HAVE_DGL),true)
+BASE_FLAGS += -DHAVE_DGL
+endif
+
+ifeq ($(HAVE_JACK),true)
+BASE_FLAGS += -DHAVE_JACK
+endif
-jack = $(TARGET_DIR)/$(NAME)
-ladspa_dsp = $(TARGET_DIR)/$(NAME)-ladspa.$(EXT)
-dssi_dsp = $(TARGET_DIR)/$(NAME)-dssi.$(EXT)
-dssi_ui = $(TARGET_DIR)/$(NAME)-dssi/$(NAME)_ui
-lv2 = $(TARGET_DIR)/$(NAME).lv2/$(NAME).$(EXT)
-lv2_dsp = $(TARGET_DIR)/$(NAME).lv2/$(NAME)_dsp.$(EXT)
-lv2_ui = $(TARGET_DIR)/$(NAME).lv2/$(NAME)_ui.$(EXT)
-vst = $(TARGET_DIR)/$(NAME)-vst.$(EXT)
-
-ifeq ($(WIN32),true)
-dssi_ui += .exe
+ifeq ($(HAVE_LIBLO),true)
+BASE_FLAGS += -DHAVE_LIBLO
endif
-# TODO: MacOS VST bundle
+# --------------------------------------------------------------
+# 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 = ../../libs/distrho/DistrhoPluginMain.cpp
-DISTRHO_UI_FILES = ../../libs/distrho/DistrhoUIMain.cpp ../../libs/libdgl.a
+DISTRHO_PLUGIN_FILES = ../../dpf/distrho/DistrhoPluginMain.cpp
+
+ifeq ($(HAVE_DGL),true)
+DISTRHO_UI_FILES = ../../dpf/distrho/DistrhoUIMain.cpp ../../dpf/libdgl.a
+endif
# --------------------------------------------------------------
# Handle plugins without UI
ifeq ($(TARGET_NOUI),true)
+ifneq ($(HAVE_DGL),true)
dssi_ui =
lv2_ui =
DISTRHO_UI_FILES =
DGL_LIBS =
OBJS_UI =
endif
+endif
# --------------------------------------------------------------
# all needs to be first
@@ -60,13 +71,13 @@ all:
# Common
%.c.o: %.c
- $(CC) $< $(BUILD_C_FLAGS) -c -o $@
+ $(CC) $< $(BUILD_C_FLAGS) -MD -MP -c -o $@
%.cpp.o: %.cpp
- $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
+ $(CXX) $< $(BUILD_CXX_FLAGS) -MD -MP -c -o $@
clean:
- rm -f *.o
+ rm -f *.d *.o
rm -rf $(TARGET_DIR)/$(NAME) $(TARGET_DIR)/$(NAME)-* $(TARGET_DIR)/$(NAME).lv2/
# --------------------------------------------------------------
@@ -90,7 +101,9 @@ $(ladspa_dsp): $(OBJS_DSP) $(DISTRHO_PLUGIN_FILES)
# --------------------------------------------------------------
# DSSI
-dssi: $(dssi_dsp) $(dssi_ui)
+dssi: $(dssi_dsp) $(dssi_ui)
+dssi_dsp: $(dssi_dsp)
+dssi_ui: $(dssi_ui)
$(dssi_dsp): $(OBJS_DSP) $(DISTRHO_PLUGIN_FILES)
mkdir -p $(shell dirname $@)
@@ -104,6 +117,7 @@ $(dssi_ui): $(OBJS_UI) $(DISTRHO_UI_FILES)
# 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)
@@ -128,3 +142,10 @@ $(vst): $(OBJS_DSP) $(OBJS_UI) $(DISTRHO_PLUGIN_FILES) $(DISTRHO_UI_FILES)
$(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/ZaMultiComp/Makefile b/plugins/ZaMultiComp/Makefile
index 8e807bb..67956bd 100644
--- a/plugins/ZaMultiComp/Makefile
+++ b/plugins/ZaMultiComp/Makefile
@@ -27,10 +27,29 @@ include ../Makefile.mk
# --------------------------------------------------------------
# Enable all possible plugin types
+ifeq ($(HAVE_DGL),true)
+ifeq ($(HAVE_JACK),true)
+TARGETS += jack
+endif
+endif
+
ifeq ($(LINUX),true)
-all: jack ladspa dssi lv2_sep vst
+TARGETS += ladspa
+ifeq ($(HAVE_DGL),true)
+ifeq ($(HAVE_LIBLO),true)
+TARGETS += dssi
+endif
+endif
+endif
+
+ifeq ($(HAVE_DGL),true)
+TARGETS += lv2_sep
else
-all: ladspa vst
+TARGETS += lv2_dsp
endif
+TARGETS += vst
+
+all: $(TARGETS)
+
# --------------------------------------------------------------
diff --git a/plugins/ZaMultiCompX2/Makefile b/plugins/ZaMultiCompX2/Makefile
index 61eaff1..ab019d4 100644
--- a/plugins/ZaMultiCompX2/Makefile
+++ b/plugins/ZaMultiCompX2/Makefile
@@ -27,10 +27,29 @@ include ../Makefile.mk
# --------------------------------------------------------------
# Enable all possible plugin types
+ifeq ($(HAVE_DGL),true)
+ifeq ($(HAVE_JACK),true)
+TARGETS += jack
+endif
+endif
+
ifeq ($(LINUX),true)
-all: jack ladspa dssi lv2_sep vst
+TARGETS += ladspa
+ifeq ($(HAVE_DGL),true)
+ifeq ($(HAVE_LIBLO),true)
+TARGETS += dssi
+endif
+endif
+endif
+
+ifeq ($(HAVE_DGL),true)
+TARGETS += lv2_sep
else
-all: ladspa vst
+TARGETS += lv2_dsp
endif
+TARGETS += vst
+
+all: $(TARGETS)
+
# --------------------------------------------------------------
diff --git a/plugins/ZamAutoSat/Makefile b/plugins/ZamAutoSat/Makefile
index 267c9dc..b73f088 100644
--- a/plugins/ZamAutoSat/Makefile
+++ b/plugins/ZamAutoSat/Makefile
@@ -27,10 +27,29 @@ include ../Makefile.mk
# --------------------------------------------------------------
# Enable all possible plugin types
+ifeq ($(HAVE_DGL),true)
+ifeq ($(HAVE_JACK),true)
+TARGETS += jack
+endif
+endif
+
ifeq ($(LINUX),true)
-all: jack ladspa dssi lv2_sep vst
+TARGETS += ladspa
+ifeq ($(HAVE_DGL),true)
+ifeq ($(HAVE_LIBLO),true)
+TARGETS += dssi
+endif
+endif
+endif
+
+ifeq ($(HAVE_DGL),true)
+TARGETS += lv2_sep
else
-all: ladspa vst
+TARGETS += lv2_dsp
endif
+TARGETS += vst
+
+all: $(TARGETS)
+
# --------------------------------------------------------------
diff --git a/plugins/ZamChild670/Makefile b/plugins/ZamChild670/Makefile
index e073ead..a5ade5d 100644
--- a/plugins/ZamChild670/Makefile
+++ b/plugins/ZamChild670/Makefile
@@ -32,10 +32,29 @@ include ../Makefile.mk
# --------------------------------------------------------------
# Enable all possible plugin types
+ifeq ($(HAVE_DGL),true)
+ifeq ($(HAVE_JACK),true)
+TARGETS += jack
+endif
+endif
+
ifeq ($(LINUX),true)
-all: jack ladspa dssi lv2_sep vst
+TARGETS += ladspa
+ifeq ($(HAVE_DGL),true)
+ifeq ($(HAVE_LIBLO),true)
+TARGETS += dssi
+endif
+endif
+endif
+
+ifeq ($(HAVE_DGL),true)
+TARGETS += lv2_sep
else
-all: ladspa vst
+TARGETS += lv2_dsp
endif
+TARGETS += vst
+
+all: $(TARGETS)
+
# --------------------------------------------------------------
diff --git a/plugins/ZamComp/Makefile b/plugins/ZamComp/Makefile
index aff19e5..9e756a4 100644
--- a/plugins/ZamComp/Makefile
+++ b/plugins/ZamComp/Makefile
@@ -27,10 +27,29 @@ include ../Makefile.mk
# --------------------------------------------------------------
# Enable all possible plugin types
+ifeq ($(HAVE_DGL),true)
+ifeq ($(HAVE_JACK),true)
+TARGETS += jack
+endif
+endif
+
ifeq ($(LINUX),true)
-all: jack ladspa dssi lv2_sep vst
+TARGETS += ladspa
+ifeq ($(HAVE_DGL),true)
+ifeq ($(HAVE_LIBLO),true)
+TARGETS += dssi
+endif
+endif
+endif
+
+ifeq ($(HAVE_DGL),true)
+TARGETS += lv2_sep
else
-all: ladspa vst
+TARGETS += lv2_dsp
endif
+TARGETS += vst
+
+all: $(TARGETS)
+
# --------------------------------------------------------------
diff --git a/plugins/ZamCompX2/Makefile b/plugins/ZamCompX2/Makefile
index ea18465..229b1e9 100644
--- a/plugins/ZamCompX2/Makefile
+++ b/plugins/ZamCompX2/Makefile
@@ -27,10 +27,29 @@ include ../Makefile.mk
# --------------------------------------------------------------
# Enable all possible plugin types
+ifeq ($(HAVE_DGL),true)
+ifeq ($(HAVE_JACK),true)
+TARGETS += jack
+endif
+endif
+
ifeq ($(LINUX),true)
-all: jack ladspa dssi lv2_sep vst
+TARGETS += ladspa
+ifeq ($(HAVE_DGL),true)
+ifeq ($(HAVE_LIBLO),true)
+TARGETS += dssi
+endif
+endif
+endif
+
+ifeq ($(HAVE_DGL),true)
+TARGETS += lv2_sep
else
-all: ladspa vst
+TARGETS += lv2_dsp
endif
+TARGETS += vst
+
+all: $(TARGETS)
+
# --------------------------------------------------------------
diff --git a/plugins/ZamEQ2/Makefile b/plugins/ZamEQ2/Makefile
index bbb2a8e..e951524 100644
--- a/plugins/ZamEQ2/Makefile
+++ b/plugins/ZamEQ2/Makefile
@@ -27,10 +27,29 @@ include ../Makefile.mk
# --------------------------------------------------------------
# Enable all possible plugin types
+ifeq ($(HAVE_DGL),true)
+ifeq ($(HAVE_JACK),true)
+TARGETS += jack
+endif
+endif
+
ifeq ($(LINUX),true)
-all: jack ladspa dssi lv2_sep vst
+TARGETS += ladspa
+ifeq ($(HAVE_DGL),true)
+ifeq ($(HAVE_LIBLO),true)
+TARGETS += dssi
+endif
+endif
+endif
+
+ifeq ($(HAVE_DGL),true)
+TARGETS += lv2_sep
else
-all: ladspa vst
+TARGETS += lv2_dsp
endif
+TARGETS += vst
+
+all: $(TARGETS)
+
# --------------------------------------------------------------
diff --git a/plugins/ZamGEQ31/Makefile b/plugins/ZamGEQ31/Makefile
index 3badc26..97864db 100644
--- a/plugins/ZamGEQ31/Makefile
+++ b/plugins/ZamGEQ31/Makefile
@@ -27,10 +27,29 @@ include ../Makefile.mk
# --------------------------------------------------------------
# Enable all possible plugin types
+ifeq ($(HAVE_DGL),true)
+ifeq ($(HAVE_JACK),true)
+TARGETS += jack
+endif
+endif
+
ifeq ($(LINUX),true)
-all: jack ladspa dssi lv2_sep vst
+TARGETS += ladspa
+ifeq ($(HAVE_DGL),true)
+ifeq ($(HAVE_LIBLO),true)
+TARGETS += dssi
+endif
+endif
+endif
+
+ifeq ($(HAVE_DGL),true)
+TARGETS += lv2_sep
else
-all: ladspa vst
+TARGETS += lv2_dsp
endif
+TARGETS += vst
+
+all: $(TARGETS)
+
# --------------------------------------------------------------
diff --git a/plugins/ZamGEQ31X2/Makefile b/plugins/ZamGEQ31X2/Makefile
index cacf442..72903fb 100644
--- a/plugins/ZamGEQ31X2/Makefile
+++ b/plugins/ZamGEQ31X2/Makefile
@@ -27,10 +27,29 @@ include ../Makefile.mk
# --------------------------------------------------------------
# Enable all possible plugin types
+ifeq ($(HAVE_DGL),true)
+ifeq ($(HAVE_JACK),true)
+TARGETS += jack
+endif
+endif
+
ifeq ($(LINUX),true)
-all: jack ladspa dssi lv2_sep vst
+TARGETS += ladspa
+ifeq ($(HAVE_DGL),true)
+ifeq ($(HAVE_LIBLO),true)
+TARGETS += dssi
+endif
+endif
+endif
+
+ifeq ($(HAVE_DGL),true)
+TARGETS += lv2_sep
else
-all: ladspa vst
+TARGETS += lv2_dsp
endif
+TARGETS += vst
+
+all: $(TARGETS)
+
# --------------------------------------------------------------
diff --git a/plugins/ZamGate/Makefile b/plugins/ZamGate/Makefile
index 5ae5766..96d1b31 100644
--- a/plugins/ZamGate/Makefile
+++ b/plugins/ZamGate/Makefile
@@ -27,10 +27,29 @@ include ../Makefile.mk
# --------------------------------------------------------------
# Enable all possible plugin types
+ifeq ($(HAVE_DGL),true)
+ifeq ($(HAVE_JACK),true)
+TARGETS += jack
+endif
+endif
+
ifeq ($(LINUX),true)
-all: jack ladspa dssi lv2_sep vst
+TARGETS += ladspa
+ifeq ($(HAVE_DGL),true)
+ifeq ($(HAVE_LIBLO),true)
+TARGETS += dssi
+endif
+endif
+endif
+
+ifeq ($(HAVE_DGL),true)
+TARGETS += lv2_sep
else
-all: ladspa vst
+TARGETS += lv2_dsp
endif
+TARGETS += vst
+
+all: $(TARGETS)
+
# --------------------------------------------------------------
diff --git a/plugins/ZamGateX2/Makefile b/plugins/ZamGateX2/Makefile
index 50803ad..479f1d4 100644
--- a/plugins/ZamGateX2/Makefile
+++ b/plugins/ZamGateX2/Makefile
@@ -27,10 +27,29 @@ include ../Makefile.mk
# --------------------------------------------------------------
# Enable all possible plugin types
+ifeq ($(HAVE_DGL),true)
+ifeq ($(HAVE_JACK),true)
+TARGETS += jack
+endif
+endif
+
ifeq ($(LINUX),true)
-all: jack ladspa dssi lv2_sep vst
+TARGETS += ladspa
+ifeq ($(HAVE_DGL),true)
+ifeq ($(HAVE_LIBLO),true)
+TARGETS += dssi
+endif
+endif
+endif
+
+ifeq ($(HAVE_DGL),true)
+TARGETS += lv2_sep
else
-all: ladspa vst
+TARGETS += lv2_dsp
endif
+TARGETS += vst
+
+all: $(TARGETS)
+
# --------------------------------------------------------------
diff --git a/plugins/ZamNoise/Makefile b/plugins/ZamNoise/Makefile
index 8e724c6..3ea904e 100644
--- a/plugins/ZamNoise/Makefile
+++ b/plugins/ZamNoise/Makefile
@@ -28,10 +28,29 @@ include ../Makefile.mk
# --------------------------------------------------------------
# Enable all possible plugin types
+ifeq ($(HAVE_DGL),true)
+ifeq ($(HAVE_JACK),true)
+TARGETS += jack
+endif
+endif
+
ifeq ($(LINUX),true)
-all: jack ladspa dssi lv2_sep vst
+TARGETS += ladspa
+ifeq ($(HAVE_DGL),true)
+ifeq ($(HAVE_LIBLO),true)
+TARGETS += dssi
+endif
+endif
+endif
+
+ifeq ($(HAVE_DGL),true)
+TARGETS += lv2_sep
else
-all: ladspa vst
+TARGETS += lv2_dsp
endif
+TARGETS += vst
+
+all: $(TARGETS)
+
# --------------------------------------------------------------
diff --git a/plugins/ZamPiano/Makefile b/plugins/ZamPiano/Makefile
index 72f117e..24543c9 100644
--- a/plugins/ZamPiano/Makefile
+++ b/plugins/ZamPiano/Makefile
@@ -29,11 +29,29 @@ include ../Makefile.mk
# --------------------------------------------------------------
# Enable all possible plugin types
+ifeq ($(HAVE_DGL),true)
+ifeq ($(HAVE_JACK),true)
+TARGETS += jack
+endif
+endif
+
ifeq ($(LINUX),true)
-all: jack lv2_sep
-#all: jack dssi lv2_sep vst
+TARGETS += dssi_dsp
+ifeq ($(HAVE_DGL),true)
+ifeq ($(HAVE_LIBLO),true)
+TARGETS += dssi_ui
+endif
+endif
+endif
+
+ifeq ($(HAVE_DGL),true)
+TARGETS += lv2_sep
else
-all: dssi lv2_sep vst
+TARGETS += lv2_dsp
endif
+TARGETS += vst
+
+all: $(TARGETS)
+
# --------------------------------------------------------------
diff --git a/plugins/ZamSFZ/Makefile b/plugins/ZamSFZ/Makefile
index aa1ba72..1398b0f 100644
--- a/plugins/ZamSFZ/Makefile
+++ b/plugins/ZamSFZ/Makefile
@@ -35,11 +35,29 @@ LINK_FLAGS += $(shell pkg-config --libs sndfile rubberband)
# --------------------------------------------------------------
# Enable all possible plugin types
+ifeq ($(HAVE_DGL),true)
+ifeq ($(HAVE_JACK),true)
+TARGETS += jack
+endif
+endif
+
ifeq ($(LINUX),true)
-all: jack lv2_sep
-#all: jack dssi lv2_sep vst
+TARGETS += dssi_dsp
+ifeq ($(HAVE_DGL),true)
+ifeq ($(HAVE_LIBLO),true)
+TARGETS += dssi_ui
+endif
+endif
+endif
+
+ifeq ($(HAVE_DGL),true)
+TARGETS += lv2_sep
else
-all: dssi lv2_sep vst
+TARGETS += lv2_dsp
endif
+TARGETS += vst
+
+all: $(TARGETS)
+
# --------------------------------------------------------------
diff --git a/plugins/ZamSynth/Makefile b/plugins/ZamSynth/Makefile
index 56a0426..cd68dd2 100644
--- a/plugins/ZamSynth/Makefile
+++ b/plugins/ZamSynth/Makefile
@@ -27,10 +27,29 @@ include ../Makefile.mk
# --------------------------------------------------------------
# Enable all possible plugin types
+ifeq ($(HAVE_DGL),true)
+ifeq ($(HAVE_JACK),true)
+TARGETS += jack
+endif
+endif
+
ifeq ($(LINUX),true)
-all: jack dssi lv2_sep vst
+TARGETS += dssi_dsp
+ifeq ($(HAVE_DGL),true)
+ifeq ($(HAVE_LIBLO),true)
+TARGETS += dssi_ui
+endif
+endif
+endif
+
+ifeq ($(HAVE_DGL),true)
+TARGETS += lv2_sep
else
-all: dssi lv2_sep vst
+TARGETS += lv2_dsp
endif
+TARGETS += vst
+
+all: $(TARGETS)
+
# --------------------------------------------------------------
diff --git a/plugins/ZamTube/Makefile b/plugins/ZamTube/Makefile
index 0764115..0925dac 100644
--- a/plugins/ZamTube/Makefile
+++ b/plugins/ZamTube/Makefile
@@ -28,10 +28,29 @@ include ../Makefile.mk
# --------------------------------------------------------------
# Enable all possible plugin types
+ifeq ($(HAVE_DGL),true)
+ifeq ($(HAVE_JACK),true)
+TARGETS += jack
+endif
+endif
+
ifeq ($(LINUX),true)
-all: jack ladspa dssi lv2_sep vst
+TARGETS += ladspa
+ifeq ($(HAVE_DGL),true)
+ifeq ($(HAVE_LIBLO),true)
+TARGETS += dssi
+endif
+endif
+endif
+
+ifeq ($(HAVE_DGL),true)
+TARGETS += lv2_sep
else
-all: ladspa vst
+TARGETS += lv2_dsp
endif
+TARGETS += vst
+
+all: $(TARGETS)
+
# --------------------------------------------------------------