From 2e80994cf5bfb7589228d05f675f216d9cd7d805 Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Tue, 6 Mar 2012 20:01:37 -0800 Subject: [PATCH] More tweaking of build for static FLTK. --- mixer/makefile.inc | 4 ++-- scripts/Makefile | 6 +----- scripts/config-funcs | 7 ++++--- session-manager/configure | 2 +- session-manager/makefile.inc | 4 ++-- timeline/makefile.inc | 4 ++-- 6 files changed, 12 insertions(+), 15 deletions(-) diff --git a/mixer/makefile.inc b/mixer/makefile.inc index b0e5616..560bee7 100644 --- a/mixer/makefile.inc +++ b/mixer/makefile.inc @@ -12,11 +12,11 @@ SRCS:=$(SRCS:.fl=.C) SRCS:=$(sort $(SRCS)) OBJS:=$(SRCS:.C=.o) -LIBS += $(FLTK_LIBS) $(JACK_LIBS) $(LASH_LIBS) $(LRDF_LIBS) $(LIBLO_LIBS) $(SIGCPP_LIBS) $(XPM_LIBS) +LIBS += $(FLTK_LDFLAGS) $(JACK_LIBS) $(LASH_LIBS) $(LRDF_LIBS) $(LIBLO_LIBS) $(SIGCPP_LIBS) $(XPM_LIBS) CFLAGS += $(FLTK_CFLAGS) $(JACK_CFLAGS) $(LIBLO_CFLAGS) $(SIGCPP_CFLAGS) $(XPM_CFLAGS) -src/mixer: $(OBJS) FL/libfl_widgets.a nonlib/libnonlib.a $(STATIC_LIBS) +src/mixer: $(OBJS) FL/libfl_widgets.a nonlib/libnonlib.a $(FLTK_LIBS) @ echo -n Linking mixer... @ $(CXX) $(CXXFLAGS) $(LIBS) $^ -o $@ -LFL -lfl_widgets -Lnonlib -lnonlib -ldl && echo $(DONE) diff --git a/scripts/Makefile b/scripts/Makefile index 7218d7b..c6e0657 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -55,11 +55,7 @@ else CXXFLAGS := -fno-rtti -fno-exceptions endif - -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 +# LIBS := "$(FLTK_LIBS) $(LIBS)" INCLUDES := -I. -Iutil -IFL -Inonlib INCLUDES += $(FLTK_CFLAGS) diff --git a/scripts/config-funcs b/scripts/config-funcs index c023257..a3804b7 100644 --- a/scripts/config-funcs +++ b/scripts/config-funcs @@ -259,7 +259,7 @@ require_command () if [ -x "$2" ] then - name="$2" + name="$PWD/$2" ok elif [ -x "`which "$2"`" ] then @@ -270,7 +270,7 @@ require_command () fatal "Command $1 not found." fi - append "$1=$2" + append "$1=$name" } require_package () @@ -383,6 +383,7 @@ require_FLTK () use="$use --use-$1" done - append "FLTK_LIBS=`lib/fltk/fltk-config $use --ldflags | sed 's/,\\?--as-needed//g'`" + append "FLTK_LIBS=`lib/fltk/fltk-config $use --libs | sed 's/,\\?--as-needed//g'`" + append "FLTK_LDFLAGS=`lib/fltk/fltk-config $use --ldflags | sed 's/,\\?--as-needed//g'`" append "FLTK_CFLAGS=`lib/fltk/fltk-config $use --cflags`" } diff --git a/session-manager/configure b/session-manager/configure index 539d73c..6e6a268 100755 --- a/session-manager/configure +++ b/session-manager/configure @@ -16,7 +16,7 @@ begin_tests require_command ar ar require_command makedepend makedepend -require_FLTK 1.3.0 images cairo +require_FLTK 1.3.0 images suggest_package JACK 0.103.0 jack require_package liblo 0.23 liblo require_package sigcpp 2.0.0 sigc++-2.0 diff --git a/session-manager/makefile.inc b/session-manager/makefile.inc index 5236dec..89282b7 100644 --- a/session-manager/makefile.inc +++ b/session-manager/makefile.inc @@ -20,9 +20,9 @@ src/nsmd: src/nsmd.o nonlib/libnonlib.a @ echo -n Linking session handler. @ $(CXX) $(CXXFLAGS) $(LIBS) $^ -o $@ -Lnonlib -lnonlib && echo $(DONE) -src/session-manager: src/session-manager.o nonlib/libnonlib.a $(STATIC_LIBS) +src/session-manager: src/session-manager.o nonlib/libnonlib.a $(FLTK_LIBS) @ echo -n Linking session handler. - @ $(CXX) $(CXXFLAGS) $(FLTK_LIBS) $(XPM_LIBS) $(LIBS) $^ -o $@ -LFL -lfl_widgets -Lnonlib -lnonlib && echo $(DONE) + @ $(CXX) $(CXXFLAGS) $(FLTK_LDFLAGS) $(XPM_LIBS) $(LIBS) $^ -o $@ -LFL -lfl_widgets -Lnonlib -lnonlib && echo $(DONE) src/send_osc: src/send_osc.o nonlib/libnonlib.a @ $(CXX) $(CXXFLAGS) $(LIBS) $^ -o $@ -Lnonlib -lnonlib && echo $(DONE) diff --git a/timeline/makefile.inc b/timeline/makefile.inc index b39fd48..885a7d0 100644 --- a/timeline/makefile.inc +++ b/timeline/makefile.inc @@ -12,7 +12,7 @@ SRCS:=$(SRCS:.fl=.C) SRCS:=$(sort $(SRCS)) OBJS:=$(SRCS:.C=.o) -LIBS += $(JACK_LIBS) $(SNDFILE_LIBS) $(LIBLO_LIBS) $(SIGCPP_LIBS) $(XPM_LIBS) +LIBS += $(FLTK_LDFLAGS) $(JACK_LIBS) $(SNDFILE_LIBS) $(LIBLO_LIBS) $(SIGCPP_LIBS) $(XPM_LIBS) CFLAGS += $(SNDFILE_CFLAGS) $(FLTK_CFLAGS) $(JACK_CFLAGS) $(SIGCPP_CFLAGS) $(XPM_CFLAGS) @@ -29,7 +29,7 @@ ifeq ($(USE_WIDGET_FOR_TIMELINE),yes) endif -src/timeline: $(OBJS) FL/libfl_widgets.a nonlib/libnonlib.a $(STATIC_LIBS) +src/timeline: $(OBJS) FL/libfl_widgets.a nonlib/libnonlib.a $(FLTK_LIBS) @ echo -n Linking timeline... @ $(CXX) $(CXXFLAGS) $(INCLUDES) $(LIBS) $^ -o $@ -LFL -lfl_widgets -Lnonlib -lnonlib && echo $(DONE)