Browse Source

Update makefiles

master
falkTX 10 years ago
parent
commit
fb0f875750
10 changed files with 55 additions and 90 deletions
  1. +2
    -0
      .gitignore
  2. +33
    -25
      Makefile.mk
  3. +1
    -1
      dpf
  4. +13
    -58
      plugins/Makefile.mk
  5. +1
    -1
      plugins/ProM/DistrhoPluginInfo.h
  6. +1
    -1
      plugins/ProM/DistrhoPluginProM.cpp
  7. +1
    -1
      plugins/ProM/DistrhoPluginProM.hpp
  8. +1
    -1
      plugins/ProM/DistrhoUIProM.cpp
  9. +1
    -1
      plugins/ProM/DistrhoUIProM.hpp
  10. +1
    -1
      plugins/ProM/Makefile

+ 2
- 0
.gitignore View File

@@ -1,10 +1,12 @@
*.a
*.d
*.o

*.exe
*.dll
*.dylib
*.so
*.zip

.kdev_include_paths
.kdev4/


+ 33
- 25
Makefile.mk View File

@@ -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
BASE_OPTS = -O2 -ffast-math -fdata-sections -ffunction-sections
ifneq ($(NOOPT),true)
BASE_OPTS += -mtune=generic -msse -msse2 -mfpmath=sse
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

ifneq ($(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,11 +79,11 @@ LINK_FLAGS = $(LINK_OPTS) $(LDFLAGS)
endif

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

ifeq ($(LINUX),true)
HAVE_DGL = $(shell pkg-config --exists gl x11 && echo true)
HAVE_JACK = $(shell pkg-config --exists jack && echo true)
HAVE_DGL = $(shell pkg-config --exists gl x11 && echo true)
HAVE_JACK = $(shell pkg-config --exists jack && echo true)
endif

ifeq ($(MACOS),true)
@@ -90,9 +94,6 @@ ifeq ($(WIN32),true)
HAVE_DGL = true
endif

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

ifneq ($(HAVE_DGL),true)
$(error OpenGL missing, cannot continue)
endif
@@ -118,16 +119,23 @@ DGL_LIBS = -lopengl32 -lgdi32
endif

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

ifeq ($(WIN32),true)
APP_EXT = .exe
endif

# --------------------------------------------------------------
# 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

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


+ 1
- 1
dpf

@@ -1 +1 @@
Subproject commit 28822a20701a75444b755463daeb82e640e1ceea
Subproject commit 053854daf007c4aeeda43c26de124181e6187cf2

+ 13
- 58
plugins/Makefile.mk View File

@@ -25,14 +25,9 @@ endif
# --------------------------------------------------------------
# Set plugin binary file targets

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)
jack = $(TARGET_DIR)/$(NAME)$(APP_EXT)
lv2 = $(TARGET_DIR)/$(NAME).lv2/$(NAME)$(LIB_EXT)
vst = $(TARGET_DIR)/$(NAME)-vst$(LIB_EXT)

# --------------------------------------------------------------
# Set distrho code files
@@ -40,17 +35,6 @@ vst = $(TARGET_DIR)/$(NAME)-vst.$(EXT)
DISTRHO_PLUGIN_FILES = ../../dpf/distrho/DistrhoPluginMain.cpp
DISTRHO_UI_FILES = ../../dpf/distrho/DistrhoUIMain.cpp ../../dpf/libdgl.a

# --------------------------------------------------------------
# Handle plugins without UI

ifeq ($(TARGET_NOUI),true)
dssi_ui =
lv2_ui =
DISTRHO_UI_FILES =
DGL_LIBS =
OBJS_UI =
endif

# --------------------------------------------------------------
# all needs to be first

@@ -60,13 +44,13 @@ all:
# Common

%.c.o: %.c
$(CC) $< $(BUILD_C_FLAGS) -c -o $@
$(CC) $< $(BUILD_C_FLAGS) -MD -MP -c -o $@

%.cpp.o: %.cpp ../../dpf/distrho/*
$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
%.cpp.o: %.cpp
$(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/

# --------------------------------------------------------------
@@ -78,49 +62,15 @@ $(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 libprojectM) -lpthread -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) $(shell pkg-config --cflags --libs libprojectM) -lpthread $(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) $(shell pkg-confi --cflags --libs libprojectM) -lpthread $(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 libprojectM) -lpthread -DDISTRHO_PLUGIN_TARGET_DSSI -o $@

# --------------------------------------------------------------
# LV2

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

$(lv2): $(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 libprojectM) -lpthread $(SHARED) -DDISTRHO_PLUGIN_TARGET_LV2 -o $@

$(lv2_dsp): $(OBJS_DSP) $(DISTRHO_PLUGIN_FILES)
mkdir -p $(shell dirname $@)
$(CXX) $^ $(BUILD_CXX_FLAGS) $(LINK_FLAGS) $(shell pkg-config --cflags --libs libprojectM) -lpthread $(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) $(shell pkg-config --cflags --libs libprojectM) -lpthread $(SHARED) -DDISTRHO_PLUGIN_TARGET_LV2 -o $@

# --------------------------------------------------------------
# VST

@@ -131,3 +81,8 @@ $(vst): $(OBJS_DSP) $(OBJS_UI) $(DISTRHO_PLUGIN_FILES) $(DISTRHO_UI_FILES)
$(CXX) $^ $(BUILD_CXX_FLAGS) $(LINK_FLAGS) $(DGL_LIBS) $(shell pkg-config --cflags --libs libprojectM) -lpthread $(SHARED) -DDISTRHO_PLUGIN_TARGET_VST -o $@

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

-include $(OBJS_DSP:%.o=%.d)
-include $(OBJS_UI:%.o=%.d)

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

+ 1
- 1
plugins/ProM/DistrhoPluginInfo.h View File

@@ -1,6 +1,6 @@
/*
* DISTRHO ProM Plugin
* Copyright (C) 2014 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public


+ 1
- 1
plugins/ProM/DistrhoPluginProM.cpp View File

@@ -1,6 +1,6 @@
/*
* DISTRHO ProM Plugin
* Copyright (C) 2014 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public


+ 1
- 1
plugins/ProM/DistrhoPluginProM.hpp View File

@@ -1,6 +1,6 @@
/*
* DISTRHO ProM Plugin
* Copyright (C) 2014 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public


+ 1
- 1
plugins/ProM/DistrhoUIProM.cpp View File

@@ -1,6 +1,6 @@
/*
* DISTRHO ProM Plugin
* Copyright (C) 2014 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public


+ 1
- 1
plugins/ProM/DistrhoUIProM.hpp View File

@@ -1,6 +1,6 @@
/*
* DISTRHO ProM Plugin
* Copyright (C) 2014 Filipe Coelho <falktx@falktx.com>
* Copyright (C) 2015 Filipe Coelho <falktx@falktx.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public


+ 1
- 1
plugins/ProM/Makefile View File

@@ -29,7 +29,7 @@ include ../Makefile.mk
ifeq ($(HAVE_JACK),true)
TARGETS += jack
endif
TARGETS += lv2_one
TARGETS += lv2
TARGETS += vst

all: $(TARGETS)


Loading…
Cancel
Save