Browse Source

Rework makefiles to make build-deps optional

pull/5/head
falkTX 10 years ago
parent
commit
a38e818998
5 changed files with 62 additions and 21 deletions
  1. +6
    -0
      Makefile
  2. +13
    -11
      Makefile.mk
  3. +1
    -1
      dpf
  4. +21
    -7
      plugins/Makefile.mk
  5. +21
    -2
      plugins/Nekobi/Makefile

+ 6
- 0
Makefile View File

@@ -4,12 +4,16 @@
# Created by falkTX # Created by falkTX
# #


include Makefile.mk

all: libs plugins gen all: libs plugins gen


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


libs: libs:
ifeq ($(HAVE_DGL),true)
$(MAKE) -C dpf/dgl $(MAKE) -C dpf/dgl
endif


plugins: libs plugins: libs
$(MAKE) all -C plugins/Nekobi $(MAKE) all -C plugins/Nekobi
@@ -26,7 +30,9 @@ dpf/utils/lv2_ttl_generator:
# -------------------------------------------------------------- # --------------------------------------------------------------


clean: clean:
ifeq ($(HAVE_DGL),true)
$(MAKE) clean -C dpf/dgl $(MAKE) clean -C dpf/dgl
endif
$(MAKE) clean -C dpf/utils/lv2-ttl-generator $(MAKE) clean -C dpf/utils/lv2-ttl-generator
$(MAKE) clean -C plugins/Nekobi $(MAKE) clean -C plugins/Nekobi




+ 13
- 11
Makefile.mk View File

@@ -75,27 +75,27 @@ LINK_FLAGS = $(LINK_OPTS) $(LDFLAGS)
endif endif


# -------------------------------------------------------------- # --------------------------------------------------------------
# Check for required libs
# Check for optional libs


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

ifeq ($(MACOS),true)
HAVE_DGL = true
endif endif


ifneq ($(shell pkg-config --exists liblo && echo true),true)
$(error liblo missing, cannot continue)
ifeq ($(WIN32),true)
HAVE_DGL = true
endif endif


# -------------------------------------------------------------- # --------------------------------------------------------------
# Set libs stuff # Set libs stuff


ifeq ($(HAVE_DGL),true)

ifeq ($(LINUX),true) ifeq ($(LINUX),true)
DGL_FLAGS = $(shell pkg-config --cflags gl x11) DGL_FLAGS = $(shell pkg-config --cflags gl x11)
DGL_LIBS = $(shell pkg-config --libs gl x11) DGL_LIBS = $(shell pkg-config --libs gl x11)
@@ -109,6 +109,8 @@ ifeq ($(WIN32),true)
DGL_LIBS = -lopengl32 -lgdi32 DGL_LIBS = -lopengl32 -lgdi32
endif endif


endif # HAVE_DGL

# -------------------------------------------------------------- # --------------------------------------------------------------
# Set extension # Set extension




+ 1
- 1
dpf

@@ -1 +1 @@
Subproject commit 7169815782a5d14447e16a1ac3adf3ab32d7d92b
Subproject commit 17befcdaa6d5e281aea22c5d83e3326f6ee9373c

+ 21
- 7
plugins/Makefile.mk View File

@@ -16,6 +16,18 @@ TARGET_DIR = ../../bin
BUILD_C_FLAGS += -I. BUILD_C_FLAGS += -I.
BUILD_CXX_FLAGS += -I. -I../../dpf/distrho -I../../dpf/dgl BUILD_CXX_FLAGS += -I. -I../../dpf/distrho -I../../dpf/dgl


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 # Set plugin binary file targets


@@ -28,17 +40,16 @@ lv2_dsp = $(TARGET_DIR)/$(NAME).lv2/$(NAME)_dsp.$(EXT)
lv2_ui = $(TARGET_DIR)/$(NAME).lv2/$(NAME)_ui.$(EXT) lv2_ui = $(TARGET_DIR)/$(NAME).lv2/$(NAME)_ui.$(EXT)
vst = $(TARGET_DIR)/$(NAME)-vst.$(EXT) vst = $(TARGET_DIR)/$(NAME)-vst.$(EXT)


ifeq ($(WIN32),true)
dssi_ui += .exe
endif

# TODO: MacOS VST bundle

# -------------------------------------------------------------- # --------------------------------------------------------------
# Set distrho code files # Set distrho code files


DISTRHO_PLUGIN_FILES = ../../dpf/distrho/DistrhoPluginMain.cpp DISTRHO_PLUGIN_FILES = ../../dpf/distrho/DistrhoPluginMain.cpp

ifeq ($(HAVE_DGL),true)
DISTRHO_UI_FILES = ../../dpf/distrho/DistrhoUIMain.cpp ../../dpf/libdgl.a DISTRHO_UI_FILES = ../../dpf/distrho/DistrhoUIMain.cpp ../../dpf/libdgl.a
else
TARGET_NOUI = true
endif


# -------------------------------------------------------------- # --------------------------------------------------------------
# Handle plugins without UI # Handle plugins without UI
@@ -90,7 +101,9 @@ $(ladspa_dsp): $(OBJS_DSP) $(DISTRHO_PLUGIN_FILES)
# -------------------------------------------------------------- # --------------------------------------------------------------
# DSSI # 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) $(dssi_dsp): $(OBJS_DSP) $(DISTRHO_PLUGIN_FILES)
mkdir -p $(shell dirname $@) mkdir -p $(shell dirname $@)
@@ -104,6 +117,7 @@ $(dssi_ui): $(OBJS_UI) $(DISTRHO_UI_FILES)
# LV2 # LV2


lv2_one: $(lv2) lv2_one: $(lv2)
lv2_dsp: $(lv2_dsp)
lv2_sep: $(lv2_dsp) $(lv2_ui) lv2_sep: $(lv2_dsp) $(lv2_ui)


$(lv2): $(OBJS_DSP) $(OBJS_UI) $(DISTRHO_PLUGIN_FILES) $(DISTRHO_UI_FILES) $(lv2): $(OBJS_DSP) $(OBJS_UI) $(DISTRHO_PLUGIN_FILES) $(DISTRHO_UI_FILES)


+ 21
- 2
plugins/Nekobi/Makefile View File

@@ -27,10 +27,29 @@ include ../Makefile.mk
# -------------------------------------------------------------- # --------------------------------------------------------------
# Enable all possible plugin types # Enable all possible plugin types


ifeq ($(HAVE_DGL),true)
ifeq ($(HAVE_JACK),true)
TARGETS += jack
endif
endif

ifeq ($(LINUX),true) 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 else
all: dssi lv2_sep vst
TARGETS += lv2_dsp
endif endif


TARGETS += vst

all: $(TARGETS)

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

Loading…
Cancel
Save