From ed2354406580f3a559ea96770086dd44fcaf2335 Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Fri, 16 May 2008 15:52:10 -0500 Subject: [PATCH] Continue improving build system. --- FL/makefile.inc | 3 ++- Makefile | 15 +++++++++++---- Mixer/makefile.inc | 4 +++- Timeline/makefile.inc | 6 ++++-- configure | 10 +++++++++- 5 files changed, 29 insertions(+), 9 deletions(-) diff --git a/FL/makefile.inc b/FL/makefile.inc index 3df5a45..9f13d7f 100644 --- a/FL/makefile.inc +++ b/FL/makefile.inc @@ -1,3 +1,4 @@ +# -*- mode: makefile; -*- FL_SRCS= \ FL/Fl_Scalepack.C \ @@ -12,7 +13,7 @@ all: FL/libfl_widgets.a # $(OBJS): Makefile FL/libfl_widgets.a: $(FL_OBJS) - ar rcs $@ $(FL_OBJS) + @ ar rcs $@ $(FL_OBJS) .PHONEY: FL FL: FL/libfl_widgets.a diff --git a/Makefile b/Makefile index 9f925b2..14cd289 100644 --- a/Makefile +++ b/Makefile @@ -11,12 +11,12 @@ include scripts/colors VERSION := 0.5.0 -all: make.conf makedepend FL Timeline Mixer +all: makedepend FL Timeline Mixer make.conf: configure @ ./configure -include make.conf +-include make.conf ifeq (($MAINTAINER_MODE),yes) CXXFLAGS := -ggdb -Wextra -Wno-missing-field-initializers -O0 -fno-rtti -fno-exceptions @@ -33,16 +33,23 @@ CXXFLAGS += $(LASH_CFLAGS) -DINSTALL_PREFIX=\"$(prefix)\" -DVERSION=\"$(VERSION) %.C : %.fl @ cd `dirname $<` && fluid -c ../$< +DONE := $(BOLD)$(GREEN)done$(SGR0) + include FL/makefile.inc include Timeline/makefile.inc include Mixer/makefile.inc SRCS:=$(FL_SRCS) $(Timeline_SRCS) $(Mixer_SRCS) +OBJS:=$(FL_OBJS) $(Timeline_OBJS) $(Mixer_OBJS) + +# FIXME: isn't there a better way? +$(OBJS): make.conf TAGS: $(SRCS) etags $(SRCS) -makedepend: $(SRCS) Makefile +#makedepend: $(SRCS) Makefile +makedepend: $(SRCS) @ echo -n Checking dependencies... @ makedepend -f- -- $(CXXFLAGS) -- $(SRCS) > makedepend 2>/dev/null && echo done. @@ -54,4 +61,4 @@ config: @ rm -f make.conf @ $(MAKE) -s -include makedepend +-include makedepend diff --git a/Mixer/makefile.inc b/Mixer/makefile.inc index 14ada21..bcce5ba 100644 --- a/Mixer/makefile.inc +++ b/Mixer/makefile.inc @@ -1,3 +1,4 @@ +# -*- mode: makefile; -*- Mixer_SRCS= \ Mixer/DPM.C \ @@ -12,7 +13,8 @@ Mixer_LIBS := $(FLTK_LIBS) INCLUDES := -I. Mixer/mixer: $(Mixer_OBJS) FL - $(CXX) $(CXXFLAGS) $(Mixer_LIBS) $(Mixer_OBJS) -o $@ -LFL -lfl_widgets + @ echo -n Linking mixer... + @ $(CXX) $(CXXFLAGS) $(Mixer_LIBS) $(Mixer_OBJS) -o $@ -LFL -lfl_widgets && echo $(DONE) .PHONEY: Mixer Mixer: Mixer/mixer diff --git a/Timeline/makefile.inc b/Timeline/makefile.inc index 7ad44a8..7283015 100644 --- a/Timeline/makefile.inc +++ b/Timeline/makefile.inc @@ -40,12 +40,14 @@ debug.C Timeline_OBJS:=$(Timeline_SRCS:.C=.o) -$(Timeline_OBJS): Makefile +# $(Timeline_OBJS): Makefile +# $(Timeline_OBJS): make.conf Timeline_LIBS := $(FLTK_LIBS) $(JACK_LIBS) $(SNDFILE_LIBS) $(LASH_LIBS) Timeline/timeline: $(Timeline_OBJS) FL - $(CXX) $(CXXFLAGS) $(INCLUDES) $(Timeline_LIBS) $(Timeline_OBJS) -o $@ -LFL -lfl_widgets + @ echo -n Linking timeline... + @ $(CXX) $(CXXFLAGS) $(INCLUDES) $(Timeline_LIBS) $(Timeline_OBJS) -o $@ -LFL -lfl_widgets && echo $(DONE) Timeline: Timeline/timeline diff --git a/configure b/configure index 0068e5e..84573ff 100755 --- a/configure +++ b/configure @@ -5,6 +5,12 @@ . scripts/colors +if [ $# -gt 0 ] +then + echo This is not an autoconf script. Run it without any options and you will be prompted. + exit 255 +fi + fatal () { echo "$BOLD$RED$*$SGR0" @@ -13,7 +19,7 @@ fatal () ask () { - echo -n "$1 [$BOLD$GREEN$3$SGR0] " + echo -n "$1 [$BOLD$3$SGR0] " read R echo "$2 := ${R:-$3}" >> make.conf } @@ -28,6 +34,8 @@ failed () echo "$BOLD${RED}failed!$SGR0" } +echo "-- Configuration:" + echo "# This is a generated file. Any changes may be lost!" > make.conf ask "Install prefix?" prefix /usr/local