Continue improving build system.
This commit is contained in:
parent
8443acf570
commit
ed23544065
|
@ -1,3 +1,4 @@
|
||||||
|
# -*- mode: makefile; -*-
|
||||||
|
|
||||||
FL_SRCS= \
|
FL_SRCS= \
|
||||||
FL/Fl_Scalepack.C \
|
FL/Fl_Scalepack.C \
|
||||||
|
@ -12,7 +13,7 @@ all: FL/libfl_widgets.a
|
||||||
# $(OBJS): Makefile
|
# $(OBJS): Makefile
|
||||||
|
|
||||||
FL/libfl_widgets.a: $(FL_OBJS)
|
FL/libfl_widgets.a: $(FL_OBJS)
|
||||||
ar rcs $@ $(FL_OBJS)
|
@ ar rcs $@ $(FL_OBJS)
|
||||||
|
|
||||||
.PHONEY: FL
|
.PHONEY: FL
|
||||||
FL: FL/libfl_widgets.a
|
FL: FL/libfl_widgets.a
|
||||||
|
|
15
Makefile
15
Makefile
|
@ -11,12 +11,12 @@ include scripts/colors
|
||||||
|
|
||||||
VERSION := 0.5.0
|
VERSION := 0.5.0
|
||||||
|
|
||||||
all: make.conf makedepend FL Timeline Mixer
|
all: makedepend FL Timeline Mixer
|
||||||
|
|
||||||
make.conf: configure
|
make.conf: configure
|
||||||
@ ./configure
|
@ ./configure
|
||||||
|
|
||||||
include make.conf
|
-include make.conf
|
||||||
|
|
||||||
ifeq (($MAINTAINER_MODE),yes)
|
ifeq (($MAINTAINER_MODE),yes)
|
||||||
CXXFLAGS := -ggdb -Wextra -Wno-missing-field-initializers -O0 -fno-rtti -fno-exceptions
|
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
|
%.C : %.fl
|
||||||
@ cd `dirname $<` && fluid -c ../$<
|
@ cd `dirname $<` && fluid -c ../$<
|
||||||
|
|
||||||
|
DONE := $(BOLD)$(GREEN)done$(SGR0)
|
||||||
|
|
||||||
include FL/makefile.inc
|
include FL/makefile.inc
|
||||||
include Timeline/makefile.inc
|
include Timeline/makefile.inc
|
||||||
include Mixer/makefile.inc
|
include Mixer/makefile.inc
|
||||||
|
|
||||||
SRCS:=$(FL_SRCS) $(Timeline_SRCS) $(Mixer_SRCS)
|
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)
|
TAGS: $(SRCS)
|
||||||
etags $(SRCS)
|
etags $(SRCS)
|
||||||
|
|
||||||
makedepend: $(SRCS) Makefile
|
#makedepend: $(SRCS) Makefile
|
||||||
|
makedepend: $(SRCS)
|
||||||
@ echo -n Checking dependencies...
|
@ echo -n Checking dependencies...
|
||||||
@ makedepend -f- -- $(CXXFLAGS) -- $(SRCS) > makedepend 2>/dev/null && echo done.
|
@ makedepend -f- -- $(CXXFLAGS) -- $(SRCS) > makedepend 2>/dev/null && echo done.
|
||||||
|
|
||||||
|
@ -54,4 +61,4 @@ config:
|
||||||
@ rm -f make.conf
|
@ rm -f make.conf
|
||||||
@ $(MAKE) -s
|
@ $(MAKE) -s
|
||||||
|
|
||||||
include makedepend
|
-include makedepend
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# -*- mode: makefile; -*-
|
||||||
|
|
||||||
Mixer_SRCS= \
|
Mixer_SRCS= \
|
||||||
Mixer/DPM.C \
|
Mixer/DPM.C \
|
||||||
|
@ -12,7 +13,8 @@ Mixer_LIBS := $(FLTK_LIBS)
|
||||||
INCLUDES := -I.
|
INCLUDES := -I.
|
||||||
|
|
||||||
Mixer/mixer: $(Mixer_OBJS) FL
|
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
|
.PHONEY: Mixer
|
||||||
Mixer: Mixer/mixer
|
Mixer: Mixer/mixer
|
||||||
|
|
|
@ -40,12 +40,14 @@ debug.C
|
||||||
|
|
||||||
Timeline_OBJS:=$(Timeline_SRCS:.C=.o)
|
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_LIBS := $(FLTK_LIBS) $(JACK_LIBS) $(SNDFILE_LIBS) $(LASH_LIBS)
|
||||||
|
|
||||||
Timeline/timeline: $(Timeline_OBJS) FL
|
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
|
Timeline: Timeline/timeline
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,12 @@
|
||||||
|
|
||||||
. scripts/colors
|
. 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 ()
|
fatal ()
|
||||||
{
|
{
|
||||||
echo "$BOLD$RED$*$SGR0"
|
echo "$BOLD$RED$*$SGR0"
|
||||||
|
@ -13,7 +19,7 @@ fatal ()
|
||||||
|
|
||||||
ask ()
|
ask ()
|
||||||
{
|
{
|
||||||
echo -n "$1 [$BOLD$GREEN$3$SGR0] "
|
echo -n "$1 [$BOLD$3$SGR0] "
|
||||||
read R
|
read R
|
||||||
echo "$2 := ${R:-$3}" >> make.conf
|
echo "$2 := ${R:-$3}" >> make.conf
|
||||||
}
|
}
|
||||||
|
@ -28,6 +34,8 @@ failed ()
|
||||||
echo "$BOLD${RED}failed!$SGR0"
|
echo "$BOLD${RED}failed!$SGR0"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo "-- Configuration:"
|
||||||
|
|
||||||
echo "# This is a generated file. Any changes may be lost!" > make.conf
|
echo "# This is a generated file. Any changes may be lost!" > make.conf
|
||||||
|
|
||||||
ask "Install prefix?" prefix /usr/local
|
ask "Install prefix?" prefix /usr/local
|
||||||
|
|
Loading…
Reference in New Issue