Skip to content
Snippets Groups Projects
Commit c4db1eee authored by Aaron Cuevas Lopez's avatar Aaron Cuevas Lopez
Browse files

Improve plugin makefile

parent a445eae3
No related branches found
No related tags found
No related merge requests found
......@@ -20,12 +20,12 @@ ifeq ($(CONFIG),Debug)
TARGET_ARCH := -march=native
endif
CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -D "OEPLUGIN" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=0.3.5" -D "JUCE_APP_VERSION_HEX=0x305" -I /usr/include -I /usr/include/freetype2 -I $(CURDIR)/../../JuceLibraryCode -I $(CURDIR)/../../JuceLibraryCode/modules -I $(CURDIR)/../../Source/Plugins/Headers
CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=0.3.5" -D "JUCE_APP_VERSION_HEX=0x305" -I /usr/include -I /usr/include/freetype2 -I $(CURDIR)/../../JuceLibraryCode -I $(CURDIR)/../../JuceLibraryCode/modules -I $(CURDIR)/../../Source/Plugins/Headers
CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O3 -std=c++11 -fPIC -rdynamic
CXXFLAGS += $(CFLAGS)
LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -L/usr/X11R6/lib/ -L/usr/local/include -lGL -lX11 -lXext -lXinerama -lasound -ldl -lfreetype -lpthread -lrt -pg -ldl -lXext -lGLU -fPIC -rdynamic
LDDEPS :=
RESFLAGS := -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -D "OEPLUGIN" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=0.3.5" -D "JUCE_APP_VERSION_HEX=0x305" -I /usr/include -I /usr/include/freetype2 -I $(CURDIR)/../../Source/Plugins/Headers
RESFLAGS := -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=0.3.5" -D "JUCE_APP_VERSION_HEX=0x305" -I /usr/include -I /usr/include/freetype2 -I $(CURDIR)/../../Source/Plugins/Headers
CLEANCMD = rm -rf $(OUTDIR)/* $(OBJDIR)
endif
......@@ -40,12 +40,12 @@ ifeq ($(CONFIG),Release)
TARGET_ARCH := -march=native
endif
CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "NDEBUG=1" -D "OEPLUGIN" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=0.3.5" -D "JUCE_APP_VERSION_HEX=0x305" -I /usr/include -I /usr/include/freetype2 -I $(CURDIR)/../../JuceLibraryCode -I $(CURDIR)/../../JuceLibraryCode/modules -I $(CURDIR)/../../Source/Plugins/Headers
CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "NDEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=0.3.5" -D "JUCE_APP_VERSION_HEX=0x305" -I /usr/include -I /usr/include/freetype2 -I $(CURDIR)/../../JuceLibraryCode -I $(CURDIR)/../../JuceLibraryCode/modules -I $(CURDIR)/../../Source/Plugins/Headers
CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -O3 -std=c++11 -fPIC -rdynamic
CXXFLAGS += $(CFLAGS)
LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -fvisibility=hidden -L/usr/X11R6/lib/ -lGL -lX11 -lXext -lXinerama -lasound -ldl -lfreetype -lpthread -lrt -pg -ldl -lXext -lGLU -fPIC -rdynamic
LDDEPS1 :=
RESFLAGS := -D "LINUX=1" -D "NDEBUG=1" -D "OEPLUGIN" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=0.3.5" -D "JUCE_APP_VERSION_HEX=0x305" -I /usr/include -I /usr/include/freetype2 -I $(CURDIR)/../../Source/Plugins/Headers
RESFLAGS := -D "LINUX=1" -D "NDEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=0.3.5" -D "JUCE_APP_VERSION_HEX=0x305" -I /usr/include -I /usr/include/freetype2 -I $(CURDIR)/../../Source/Plugins/Headers
CLEANCMD = rm -rf $(OUTDIR)/* $(OBJDIR)
endif
......@@ -54,7 +54,7 @@ export
SUBDIRS := $(wildcard $(PLUGIN_DIR)/*)
.PHONY: clean all notify $(SUBDIRS)
.PHONY: clean all notify $(SUBDIRS) $(notdir $(SUBDIRS))
all: notify $(SUBDIRS)
......@@ -63,6 +63,8 @@ notify:
PLUGINNAME=$(shell echo $@ | rev | cut -d'/' -f-1 | rev)
# if there are a .jucer file in the plugin folder - try to find Makefile in the Source/ folder
$(SUBDIRS): CXXFLAGS += -D "OEPLUGIN" -I $(CURDIR)/../../Source/Plugins/CommonLibs
$(SUBDIRS):
@if [ -f $@/*.jucer ] && ([ -f $@/Source/Makefile ]); then \
echo "Found jucer project for" $(PLUGINNAME) "..."; \
......@@ -72,20 +74,17 @@ $(SUBDIRS):
$(MAKE) -C $@ ; fi \
fi
# if there are a .jucer file in the plugin folder - try to find Makefile in the Source/ folder
%::
@if [ -f $(PLUGIN_DIR)/$@/*.jucer ] && ([ -f $(PLUGIN_DIR)/$@/Source/Makefile ]); then \
echo "Found jucer project for" $(PLUGINNAME) "..."; \
$(MAKE) -C $(PLUGIN_DIR)/$@/Source clean ; \
$(MAKE) -C $(PLUGIN_DIR)/$@/Source TARGET:=$@.so; \
else if [ -f $(PLUGIN_DIR)/$@/Makefile ]; then \
$(MAKE) -C $(PLUGIN_DIR)/$@ clean ; \
$(MAKE) -C $(PLUGIN_DIR)/$@ ; fi \
fi
.SECONDEXPANSION:
$(notdir $(SUBDIRS)): $$(PLUGIN_DIR)/$$@
clean:
@echo Cleaning open-ephys plugins
@$(CLEANCMD)
clean/$(notdir $(SUBDIRS)):
@echo Cleaning $(notdir $@)
$(MAKE) -C $(PLUGIN_DIR)/$(notdir $@) clean
#plugin name from $SUBDIRS goal
#$@ | rev | cut -d'/' -f-1 | rev; \
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment