diff --git a/Makefile b/Makefile index 16ab28a85a698d3210740ba354f13ebc9f3fd3f6..fabea6e9f5fee9f6022b2da4168bb0c7aa79811a 100644 --- a/Makefile +++ b/Makefile @@ -87,6 +87,18 @@ ifneq ($(prefix),) env = inst_dir="$(prefix)" endif +install_vars = DESTDIR=$(firstword $(wildcard $(CURDIR)/packages/*/build)) prefix=$(prefix) + +# You can set CFLAGS to whatever special compile options are needed. E.g., to +# build the double precision version: CFLAGS = -DPD_FLOATSIZE=64 +CFLAGS = +export CFLAGS + +# You can also set this variable to specify externals NOT to be built. E.g., +# to prevent building Gem (which takes an eternity to build): blacklist = gem +blacklist = +export blacklist + all: cd l2ork_addons && $(env) ./tar_em_up.sh -Tk @@ -96,11 +108,28 @@ incremental: light: cd l2ork_addons && $(env) ./tar_em_up.sh -tkl +# Convenience targets to build the double precision version. + +# Blacklist of externals which don't work with double precision yet. +double_blacklist = autotune smlib +# These are dubious, passing float* for t_float* pointers, and so are most +# likely broken, even though they compile with double precision. +double_blacklist += cyclone lyonpotpourri + +all-double: + cd l2ork_addons && $(env) CFLAGS=-DPD_FLOATSIZE=64 blacklist="$(double_blacklist)" ./tar_em_up.sh -Tk + +incremental-double: + cd l2ork_addons && $(env) CFLAGS=-DPD_FLOATSIZE=64 blacklist="$(double_blacklist)" ./tar_em_up.sh -tk + +light-double: + cd l2ork_addons && $(env) CFLAGS=-DPD_FLOATSIZE=64 blacklist="$(double_blacklist)" ./tar_em_up.sh -tkl + %_abs: - make -C abstractions $(@:%_abs=%_install) DESTDIR=$(firstword $(wildcard $(CURDIR)/packages/*/build)) prefix=$(prefix) + make -C abstractions $(@:%_abs=%) $(@:%_abs=%_install) $(install_vars) %_ext: - make -C externals $(@:%_ext=%_install) DESTDIR=$(firstword $(wildcard $(CURDIR)/packages/*/build)) prefix=$(prefix) + make -C externals $(@:%_ext=%) $(@:%_ext=%_install) $(install_vars) checkout: git submodule update --init diff --git a/externals/Makefile b/externals/Makefile index de38e96ac7ac31a058f5d09b8ed93394df0e8614..363736cf580cf0f63198b8c36d8412b8140a0543 100644 --- a/externals/Makefile +++ b/externals/Makefile @@ -44,7 +44,7 @@ DEST_PATHS = BUILDLAYOUT_DIR=$(BUILDLAYOUT_DIR) \ BUILDSRC_OS_NAME = $(OS_NAME) WARN_FLAGS = -Wall -W -Wno-unused-parameter -CFLAGS = -DPD -I$(pd_src)/src $(WARN_FLAGS) $(DEBUG_CFLAGS) -I$(gem_src)/src +CFLAGS = -DPD -I$(pd_src)/src $(WARN_FLAGS) $(DEBUG_CFLAGS) $(CFLAGS_ADD) -I$(gem_src)/src LDFLAGS = LIBS = -lm @@ -131,10 +131,10 @@ CXXFLAGS = $(CFLAGS) # building scripts rely on it being that way. ifeq ($(LIGHT),yes) # minimal set of extensions for the "light" build -LIB_TARGETS = loaders-libdir pddp +lib_targets = loaders-libdir pddp INCREMENTAL = yes else -LIB_TARGETS = adaptive arraysize autotune bassemu boids bsaylor comport creb cxc cyclone disis earplug ekext ext13 fftease fluid freeverb ggee hcs iem_ambi iem_bin_ambi iemlib iemgui iemguts iem_adaptfilt iemmatrix iemxmlrpc iem_delay iem_roomsim iem_spec2 iem_tab jasch_lib loaders-libdir lyonpotpourri mapping markex maxlib mjlib moocow moonlib motex mrpeach oscx pan pdcontainer pddp pdlua pdogg plugin pmpd rjlib sigpack smlib tof unauthorized vbap windowing zexy +lib_targets = adaptive arraysize autotune bassemu boids bsaylor comport creb cxc cyclone disis earplug ekext ext13 fftease fluid freeverb ggee hcs iem_ambi iem_bin_ambi iemlib iemgui iemguts iem_adaptfilt iemmatrix iemxmlrpc iem_delay iem_roomsim iem_spec2 iem_tab jasch_lib loaders-libdir lyonpotpourri mapping markex maxlib mjlib moocow moonlib motex mrpeach oscx pan pdcontainer pddp pdlua pdogg plugin pmpd rjlib sigpack smlib tof unauthorized vbap windowing zexy endif # DISABLED: flatgui @@ -145,27 +145,30 @@ endif ifneq ($(LIGHT),yes) ifeq ($(OS_NAME),windows) ifneq ($(INCREMENTAL),yes) - LIB_TARGETS += gem + lib_targets += gem endif else ifeq ($(OS_NAME),darwin) # on Mac OS X 10.6/Snow Leopard don't build hid since it needs Carbon - LIB_TARGETS += pdp iem16 apple + lib_targets += pdp iem16 apple ifneq ($(shell uname -r | sed 's|10\.[0-9][0-9]*\.[0-9][0-9]*|10|'),10) - LIB_TARGETS += + lib_targets += endif else ifneq ($(LIGHT),yes) # GNU/Linux, BSD, IRIX, etc. (we use exported variable INCREMENTAL to # avoid rebuilding entire Gem lib that takes a long time to compile) ifeq ($(INCREMENTAL),yes) - LIB_TARGETS += hid pdp iem16 + lib_targets += hid pdp iem16 else - LIB_TARGETS += gem pdp hid iem16 + lib_targets += gem pdp hid iem16 endif endif endif endif # ifneq ($(LIGHT),yes) +# filter out blacklist of all targets NOT to be built +LIB_TARGETS = $(filter-out $(blacklist),$(lib_targets)) + #------------------------------------------------------------------------------# all: $(LIB_TARGETS) @@ -441,9 +444,12 @@ cxc_clean: #------------------------------------------------------------------------------# # CYCLONE + +# AG: this external provides no sane way to pass custom CFLAGS, so we abuse +# WARN_CFLAGS for that purpose. cyclone: make -C $(externals_src)/miXed/cyclone -f Makefile.libdir \ - PD_PATH=$(pd_src) PD_INCLUDE=$(DESTDIR)$(includedir) + PD_PATH=$(pd_src) PD_INCLUDE=$(DESTDIR)$(includedir) WARN_CFLAGS="-Wall -W -Wstrict-prototypes -Wno-unused -Wno-parentheses -Wno-switch $(CFLAGS_ADD)" cyclone_install: make -C $(externals_src)/miXed/cyclone -f Makefile.libdir \ @@ -463,7 +469,7 @@ ifneq ($(OS_NAME),darwin) ./configure --with-python=python2 && make endif endif - make -C $(externals_src)/disis PD_PATH=$(pd_src) pdbinpath=$(pd_src)/src + make -C $(externals_src)/disis PD_PATH=$(pd_src) pdbinpath=$(pd_src)/src CFLAGS="$(CFLAGS_ADD)" disis_install: make -C $(externals_src)/disis \ @@ -506,7 +512,7 @@ ext13_clean: FFTEASE_NAME=fftease fftease: - make -C $(externals_src)/$(FFTEASE_NAME) PD_PATH=$(pd_src) + make -C $(externals_src)/$(FFTEASE_NAME) PD_PATH=$(pd_src) CFLAGS="$(CFLAGS_ADD)" fftease_install: #make -C $(externals_src)/$(FFTEASE_NAME) DESTDIR="$(DESTDIR)" \ @@ -621,7 +627,7 @@ flib_clean: fluid: make -C $(externals_src)/fluid~ PD_PATH=$(pd_src) \ - pdbinpath=$(pd_src)/src + pdbinpath=$(pd_src)/src CFLAGS="$(CFLAGS_ADD)" fluid_install: make -C $(externals_src)/fluid~ DESTDIR="$(DESTDIR)" \ @@ -650,7 +656,7 @@ $(gem_src)/configure: $(gem_src)/Gem.dll: $(gem_src)/configure cd $(gem_src) && ./configure \ - CXXFLAGS="-DHAVE_S_STUFF_H" \ + CXXFLAGS="-DHAVE_S_STUFF_H $(CFLAGS_ADD)" \ --host=i686-w64-mingw32 \ --without-ALL \ --with-jpeg \ @@ -668,7 +674,7 @@ $(gem_src)/Gem.dll: $(gem_src)/configure $(gem_src)/Gem.pd_linux: $(gem_src)/configure test -s $(gem_src)/Gem.pd_linux || \ cd $(gem_src) && ./configure \ - CXXFLAGS="-DHAVE_S_STUFF_H" \ + CXXFLAGS="-DHAVE_S_STUFF_H $(CFLAGS_ADD)" \ --prefix=$(prefix) \ --with-video=plugins \ --with-film=plugins \ @@ -677,7 +683,7 @@ $(gem_src)/Gem.pd_linux: $(gem_src)/configure $(gem_src)/Gem.pd_darwin: $(gem_src)/configure cd $(gem_src) && ./configure \ - CXXFLAGS="-DHAVE_S_STUFF_H" \ + CXXFLAGS="-DHAVE_S_STUFF_H $(CFLAGS_ADD)" \ PKG_FTGL_CFLAGS="-I/sw/include -I/sw/include/freetype2 -I/sw/include/FTGL" \ --prefix=$(prefix) \ --libdir=$(objectsdir) \ @@ -1141,7 +1147,7 @@ LYON_SRC=lyonpotpourri LYON_DEST=lyonpotpourri lyonpotpourri: - make -C $(externals_src)/$(LYON_SRC) PD_PATH=$(pd_src) + make -C $(externals_src)/$(LYON_SRC) PD_PATH=$(pd_src) CFLAGS="$(CFLAGS_ADD)" lyonpotpourri_install: #make -C $(externals_src)/$(LYON_SRC) DESTDIR="$(DESTDIR)" \ diff --git a/packages/Makefile b/packages/Makefile index d99f98331e9e7af826788c4032e7c160d8337285..00a996199155eada4ea0ea5e72496f8ceaa0cfd4 100644 --- a/packages/Makefile +++ b/packages/Makefile @@ -206,7 +206,7 @@ extensions_install: #------------------------------------------------------------------------------ # externals_install externals_install: - $(MAKE) -C $(externals_src) $(DEST_PATHS) install INCREMENTAL=$(INCREMENTAL) LIGHT=$(LIGHT) + $(MAKE) -C $(externals_src) $(DEST_PATHS) install INCREMENTAL=$(INCREMENTAL) LIGHT=$(LIGHT) CFLAGS_ADD="$(CFLAGS)" #------------------------------------------------------------------------------