diff --git a/FL/configure b/FL/configure index 978c9d6..4ac29df 100755 --- a/FL/configure +++ b/FL/configure @@ -14,7 +14,7 @@ ask "Build for debugging" USE_DEBUG no begin_tests require_FLTK 1.1.7 images -require_command FLUID fluid +require_command FLUID lib/fltk/fluid/fluid require_command ar ar require_command makedepend makedepend diff --git a/Makefile b/Makefile index 6b411bd..4e9970a 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # ############################################################################### -SUBDIRS=nonlib FL timeline mixer session-manager sequencer +SUBDIRS=lib nonlib FL timeline mixer session-manager sequencer all: @ for dir in $(SUBDIRS); do $(MAKE) -s -C $$dir; done diff --git a/lib/Makefile b/lib/Makefile new file mode 100644 index 0000000..0a5727d --- /dev/null +++ b/lib/Makefile @@ -0,0 +1,15 @@ + + +OBJS:= fltk/lib/libfltk.a fltk/lib/libfltk_images.a + +$(OBJS): fltk/config.h + cd fltk && make + +fltk/config.h: + cd fltk && ./configure --prefix=/dev/null --disable-shared --disable-gl --enable-threads --enable-xft --enable-xdbe --enable-xinerama + +config: $(OBJS) + +clean: + +all: $(OBJS) diff --git a/mixer/configure b/mixer/configure index df6d406..cbe4b48 100755 --- a/mixer/configure +++ b/mixer/configure @@ -16,7 +16,8 @@ begin_tests require_command ar ar require_command makedepend makedepend -require_FLTK 1.3.0 images cairo +require_FLTK 1.3.0 images +require_command FLUID lib/fltk/fluid/fluid require_package JACK 0.103.0 jack require_package lrdf 0.4.0 lrdf require_package liblo 0.23 liblo diff --git a/scripts/Makefile b/scripts/Makefile index b12f34b..7218d7b 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -56,12 +56,14 @@ else endif -STATIC_LIBS := lib/fltk/lib/libfltk.a lib/fltk/lib/libfltk_cairo.a lib/fltk/lib/libfltk_images.a lib/fltk/lib/libfltk_forms.a +STATIC_LIBS := lib/fltk/lib/libfltk.a lib/fltk/lib/libfltk_images.a # FLTK_LIBS := -lfltk -fltk_images -lfltk_gl -lfltk_forms -lfltk_cairo LIBS += $(FLTK_LIBS) LIBS += -lpng -lcairo -ljpeg + INCLUDES := -I. -Iutil -IFL -Inonlib INCLUDES += $(FLTK_CFLAGS) + # INCLUDES += // CFLAGS += $(FLTK_CFLAGS) @@ -81,7 +83,7 @@ CXXFLAGS := $(CFLAGS) $(CXXFLAGS) include scripts/colors -SPACE+=" `tput cuf 20`" +SPACE:=" `tput cuf 20`" ifneq ($(CALCULATING),yes) COMPILING="$(BOLD)$(BLACK)[$(SGR0) $(PACKAGE)$(SPACE)$(SGR0)$(CYAN)`scripts/percent-complete .files "$<"` $(SGR0)$(BOLD)$(BLACK)]$(SGR0) $(BOLD)$(CYAN)$<$(SGR0)" @@ -91,10 +93,10 @@ endif .C.o: @ echo $(COMPILING) - $(CXX) $(CXXFLAGS) $(INCLUDES) -c $< -o $@ + @ $(CXX) $(INCLUDES) $(CXXFLAGS) -c $< -o $@ %.C : %.fl - @ cd `dirname $<` && fluid -c `basename $<` + @ cd `dirname $<` && $(FLUID) -c `basename $<` DONE := $(BOLD)$(GREEN)done$(SGR0) diff --git a/scripts/config-funcs b/scripts/config-funcs index ef636d0..c023257 100644 --- a/scripts/config-funcs +++ b/scripts/config-funcs @@ -127,18 +127,18 @@ ask () ok () { - echo '\r'`tput cuf 30`"$BOLD${GREEN}ok${SGR0} ${*:+${BOLD}${BLACK}($*)${SGR0}}" + echo ' '`tput cuf 30`"$BOLD${GREEN}ok${SGR0} ${*:+${BOLD}${BLACK}($*)${SGR0}}" } failed () { - echo '\r'`tput cuf 30`"$BOLD${RED}failed!${SGR0}" > /dev/stderr + echo ' '`tput cuf 30`"$BOLD${RED}failed!${SGR0}" > /dev/stderr rm -f .config } missing () { - echo '\r'`tput cuf 30`"$BOLD${YELLOW}missing!${SGR0}" > /dev/stderr + echo ' '`tput cuf 30`"$BOLD${YELLOW}missing!${SGR0}" > /dev/stderr } using () @@ -255,13 +255,22 @@ require_command () { echo -n "Checking for ${BOLD}$1${SGR0}..." - if ! [ -x "`which $2`" ] + local name; + + if [ -x "$2" ] then + name="$2" + ok + elif [ -x "`which "$2"`" ] + then + name="`which "$2"`" + ok + else failed fatal "Command $1 not found." - else - ok fi + + append "$1=$2" } require_package () diff --git a/sequencer/configure b/sequencer/configure index 4fe84ac..1491d38 100755 --- a/sequencer/configure +++ b/sequencer/configure @@ -16,7 +16,8 @@ begin_tests require_package JACK 0.103.0 jack suggest_package XPM 2.0.0 xpm -require_FLTK 1.3.0 images cairo +require_FLTK 1.3.0 images +require_command FLUID lib/fltk/fluid/fluid && append "FLUID=lib/fltk/fluid/fluid" test_version `version_of jack` 0.105.0 || append "JACK_MIDI_PROTO_API=yes" require_package liblo 0.23 liblo diff --git a/timeline/configure b/timeline/configure index 1c545fa..398b5be 100755 --- a/timeline/configure +++ b/timeline/configure @@ -23,7 +23,8 @@ begin_tests require_command ar ar require_command makedepend makedepend -require_FLTK 1.3.0 images cairo +require_FLTK 1.3.0 images +require_command FLUID lib/fltk/fluid/fluid require_package JACK 0.103.0 jack require_package sndfile 1.0.17 sndfile require_package liblo 0.23 liblo diff --git a/timeline/makefile.inc b/timeline/makefile.inc index 0c06d2d..b39fd48 100644 --- a/timeline/makefile.inc +++ b/timeline/makefile.inc @@ -31,7 +31,7 @@ endif src/timeline: $(OBJS) FL/libfl_widgets.a nonlib/libnonlib.a $(STATIC_LIBS) @ echo -n Linking timeline... - $(CXX) $(CXXFLAGS) $(INCLUDES) $(LIBS) $^ -o $@ -LFL -lfl_widgets -Lnonlib -lnonlib && echo $(DONE) + @ $(CXX) $(CXXFLAGS) $(INCLUDES) $(LIBS) $^ -o $@ -LFL -lfl_widgets -Lnonlib -lnonlib && echo $(DONE) Timeline: src/timeline