From 4cf327e1a7aa45341d6de99d6446e7871b2c6300 Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Mon, 1 Feb 2010 03:50:38 -0600 Subject: [PATCH] Tweak build system. --- FL/FL | 1 + FL/Makefile | 115 ++++++++++++++++++++++++++++++++++++++++++++++ FL/configure | 21 +++++++++ FL/scripts | 1 + Makefile | 5 +- mixer/Makefile | 13 ++++-- nonlib/Makefile | 115 ++++++++++++++++++++++++++++++++++++++++++++++ nonlib/configure | 20 ++++++++ nonlib/nonlib | 1 + nonlib/scripts | 1 + timeline/Makefile | 13 ++++-- 11 files changed, 294 insertions(+), 12 deletions(-) create mode 120000 FL/FL create mode 100644 FL/Makefile create mode 100755 FL/configure create mode 120000 FL/scripts create mode 100644 nonlib/Makefile create mode 100755 nonlib/configure create mode 120000 nonlib/nonlib create mode 120000 nonlib/scripts diff --git a/FL/FL b/FL/FL new file mode 120000 index 0000000..945c9b4 --- /dev/null +++ b/FL/FL @@ -0,0 +1 @@ +. \ No newline at end of file diff --git a/FL/Makefile b/FL/Makefile new file mode 100644 index 0000000..be865eb --- /dev/null +++ b/FL/Makefile @@ -0,0 +1,115 @@ + +############################################################################### +# Copyright (C) 2008 Jonathan Moore Liles # +# # +# This program is free software; you can redistribute it and/or modify it # +# under the terms of the GNU General Public License as published by the # +# Free Software Foundation; either version 2 of the License, or (at your # +# option) any later version. # +# # +# This program is distributed in the hope that it will be useful, but WITHOUT # +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # +# more details. # +# # +# You should have received a copy of the GNU General Public License along # +# with This program; see the file COPYING. If not,write to the Free Software # +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # +############################################################################### + +## Makefile for the Non-DAW. + +## +## Do not edit this file; run `make config` instead. +## + +VERSION := 1.0.0 +PACKAGE := FL + +all: .config + +.config: configure + @ echo '<<< Configuring '$(PACKAGE) + @ ./configure + +config: + @ echo '<<< Configuring '$(PACKAGE) + @ ./configure + +-include .config + +export SYSTEM_PATH:=$(prefix)/share/ +export DOCUMENT_PATH:=$(prefix)/share/doc/ +export PIXMAP_PATH:=$(prefix)/share/pixmaps/ + +# a bit of a hack to make sure this runs before any rules +ifneq ($(CALCULATING),yes) +TOTAL := $(shell $(MAKE) CALCULATING=yes -n 2>/dev/null | sed -n 's/^.*Compiling: \([^"]\+\)"/\1/p' > .files ) +endif + +ifeq ($(USE_DEBUG),yes) + CFLAGS := -pipe -ggdb -fno-inline -Wall -Wextra -O0 + CXXFLAGS := -Wnon-virtual-dtor -Wno-missing-field-initializers -fno-rtti -fno-exceptions +else + CFLAGS := -pipe -O2 -DNDEBUG + CXXFLAGS := -fno-rtti -fno-exceptions +endif + + +CFLAGS+=-DVERSION=\"$(VERSION)\" \ + -DINSTALL_PREFIX=\"$(prefix)\" \ + -DSYSTEM_PATH=\"$(SYSTEM_PATH)\" \ + -DDOCUMENT_PATH=\"$(DOCUMENT_PATH)\" \ + -DPIXMAP_PATH=\"$(PIXMAP_PATH)\" + +CXXFLAGS += $(SNDFILE_CFLAGS) $(FLTK_CFLAGS) $(JACK_CFLAGS) +CXXFLAGS := $(CFLAGS) $(CXXFLAGS) + +INCLUDES := -I. -Iutil -IFL -Inonlib + +include scripts/colors + +ifneq ($(CALCULATING),yes) + COMPILING="$(BOLD)$(BLACK)$(PACKAGE) [$(SGR0)$(CYAN)`scripts/percent-complete .files "$<"`$(SGR0)$(BOLD)$(BLACK)]$(SGR0) $(BOLD)$(YELLOW)$<$(SGR0)" +else + COMPILING="Compiling: $<" +endif + +.C.o: + @ echo $(COMPILING) + @ $(CXX) $(CXXFLAGS) $(INCLUDES) -c $< -o $@ + +%.C : %.fl + @ cd `dirname $<` && fluid -c ../$< + +DONE := $(BOLD)$(GREEN)done$(SGR0) + +include makefile.inc + +SRCS:=$(FL_SRCS) +OBJS:=$(FL_OBJS) + +# FIXME: isn't there a better way? +$(OBJS): .config Makefile + +TAGS: $(SRCS) + etags $(SRCS) + +.deps: .config $(SRCS) +ifneq ($(CALCULATING),yes) + @ echo -n Calculating dependencies... + @ makedepend -f- -- $(CXXFLAGS) $(INCLUDES) -- $(SRCS) 2>/dev/null > .deps && echo $(DONE) + @ # gcc -M $(CXXFLAGS) $(INCLUDES) $(SRCS) > .deps && echo $(DONE) +endif + +clean_deps: + @ rm -f .deps + +install: + @ echo ... + +.PHONEY: clean config depend clean_deps + +clean: FL_clean + +-include .deps diff --git a/FL/configure b/FL/configure new file mode 100755 index 0000000..978c9d6 --- /dev/null +++ b/FL/configure @@ -0,0 +1,21 @@ +#!/bin/sh +# +# Copyright (C) 2008 Jonathan Moore Liles +# This file is licensed under version 2 of the GPL. + +. scripts/config-funcs + +begin + +begin_options + +ask "Build for debugging" USE_DEBUG no + +begin_tests + +require_FLTK 1.1.7 images +require_command FLUID fluid +require_command ar ar +require_command makedepend makedepend + +end diff --git a/FL/scripts b/FL/scripts new file mode 120000 index 0000000..a339954 --- /dev/null +++ b/FL/scripts @@ -0,0 +1 @@ +../scripts \ No newline at end of file diff --git a/Makefile b/Makefile index 8e93ca3..c1b22c1 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # ############################################################################### -SUBDIRS=timeline mixer +SUBDIRS=nonlib FL timeline mixer all: @ for dir in $(SUBDIRS); do $(MAKE) -s -C $$dir; done @@ -28,4 +28,5 @@ clean: install: @ for dir in $(SUBDIRS); do $(MAKE) -s -C $$dir install; done - +config: + @ for dir in $(SUBDIRS); do $(MAKE) -s -C $$dir config; done diff --git a/mixer/Makefile b/mixer/Makefile index 1b69044..49fa36f 100644 --- a/mixer/Makefile +++ b/mixer/Makefile @@ -24,13 +24,16 @@ ## VERSION := 1.0.0 +PACKAGE := MIXER all: .config .config: configure + @ echo '<<< Configuring '$(PACKAGE) @ ./configure config: + @ echo '<<< Configuring '$(PACKAGE) @ ./configure -include .config @@ -67,7 +70,7 @@ INCLUDES := -I. -Iutil -IFL -Inonlib include scripts/colors ifneq ($(CALCULATING),yes) - COMPILING="$(BOLD)$(BLACK)[$(SGR0)$(CYAN)`scripts/percent-complete .files "$<"`$(SGR0)$(BOLD)$(BLACK)]$(SGR0) Compiling: $(BOLD)$(YELLOW)$<$(SGR0)" + COMPILING="$(BOLD)$(BLACK)MIXER [$(SGR0)$(CYAN)`scripts/percent-complete .files "$<"`$(SGR0)$(BOLD)$(BLACK)]$(SGR0) $(BOLD)$(YELLOW)$<$(SGR0)" else COMPILING="Compiling: $<" endif @@ -82,11 +85,11 @@ endif DONE := $(BOLD)$(GREEN)done$(SGR0) include FL/makefile.inc -include nonlib/makefile.inc +#include nonlib/makefile.inc include makefile.inc -SRCS:=$(FL_SRCS) $(nonlib_SRCS) $(Mixer_SRCS) -OBJS:=$(FL_OBJS) $(nonlib_OBJS) $(Mixer_OBJS) +SRCS:=$(Mixer_SRCS) +OBJS:=$(Mixer_OBJS) # FIXME: isn't there a better way? $(OBJS): .config Makefile @@ -121,7 +124,7 @@ clean_deps: .PHONEY: clean config depend clean_deps -clean: FL_clean nonlib_clean Mixer_clean +clean: FL_clean Mixer_clean dist: git archive --prefix=non-mixer-$(VERSION)/ v$(VERSION) | bzip2 > non-mixer-$(VERSION).tar.bz2 diff --git a/nonlib/Makefile b/nonlib/Makefile new file mode 100644 index 0000000..e81c2af --- /dev/null +++ b/nonlib/Makefile @@ -0,0 +1,115 @@ + +############################################################################### +# Copyright (C) 2008 Jonathan Moore Liles # +# # +# This program is free software; you can redistribute it and/or modify it # +# under the terms of the GNU General Public License as published by the # +# Free Software Foundation; either version 2 of the License, or (at your # +# option) any later version. # +# # +# This program is distributed in the hope that it will be useful, but WITHOUT # +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or # +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for # +# more details. # +# # +# You should have received a copy of the GNU General Public License along # +# with This program; see the file COPYING. If not,write to the Free Software # +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # +############################################################################### + +## Makefile for the Non-DAW. + +## +## Do not edit this file; run `make config` instead. +## + +VERSION := 1.0.0 +PACKAGE := NONLIB + +all: .config + +.config: configure + @ echo '<<< Configuring '$(PACKAGE) + @ ./configure + +config: + @ echo '<<< Configuring '$(PACKAGE) + @ ./configure + +-include .config + +export SYSTEM_PATH:=$(prefix)/share/ +export DOCUMENT_PATH:=$(prefix)/share/doc/ +export PIXMAP_PATH:=$(prefix)/share/pixmaps/ + +# a bit of a hack to make sure this runs before any rules +ifneq ($(CALCULATING),yes) +TOTAL := $(shell $(MAKE) CALCULATING=yes -n 2>/dev/null | sed -n 's/^.*Compiling: \([^"]\+\)"/\1/p' > .files ) +endif + +ifeq ($(USE_DEBUG),yes) + CFLAGS := -pipe -ggdb -fno-inline -Wall -Wextra -O0 + CXXFLAGS := -Wnon-virtual-dtor -Wno-missing-field-initializers -fno-rtti -fno-exceptions +else + CFLAGS := -pipe -O2 -DNDEBUG + CXXFLAGS := -fno-rtti -fno-exceptions +endif + + +CFLAGS+=-DVERSION=\"$(VERSION)\" \ + -DINSTALL_PREFIX=\"$(prefix)\" \ + -DSYSTEM_PATH=\"$(SYSTEM_PATH)\" \ + -DDOCUMENT_PATH=\"$(DOCUMENT_PATH)\" \ + -DPIXMAP_PATH=\"$(PIXMAP_PATH)\" + +CXXFLAGS += $(SNDFILE_CFLAGS) $(FLTK_CFLAGS) $(JACK_CFLAGS) +CXXFLAGS := $(CFLAGS) $(CXXFLAGS) + +INCLUDES := -I. -Iutil -IFL -Inonlib + +include scripts/colors + +ifneq ($(CALCULATING),yes) + COMPILING="$(BOLD)$(BLACK)NONLIB [$(SGR0)$(CYAN)`scripts/percent-complete .files "$<"`$(SGR0)$(BOLD)$(BLACK)]$(SGR0) $(BOLD)$(YELLOW)$<$(SGR0)" +else + COMPILING="Compiling: $<" +endif + +.C.o: + @ echo $(COMPILING) + @ $(CXX) $(CXXFLAGS) $(INCLUDES) -c $< -o $@ + +%.C : %.fl + @ cd `dirname $<` && fluid -c ../$< + +DONE := $(BOLD)$(GREEN)done$(SGR0) + +include makefile.inc + +SRCS:=$(nonlib_SRCS) +OBJS:=$(nonlib_OBJS) + +# FIXME: isn't there a better way? +$(OBJS): .config Makefile + +TAGS: $(SRCS) + etags $(SRCS) + +.deps: .config $(SRCS) +ifneq ($(CALCULATING),yes) + @ echo -n Calculating dependencies... + @ makedepend -f- -- $(CXXFLAGS) $(INCLUDES) -- $(SRCS) 2>/dev/null > .deps && echo $(DONE) + @ # gcc -M $(CXXFLAGS) $(INCLUDES) $(SRCS) > .deps && echo $(DONE) +endif + +clean_deps: + @ rm -f .deps + +.PHONEY: clean config depend clean_deps + +install: + @ echo ... + +clean: nonlib_clean + +-include .deps diff --git a/nonlib/configure b/nonlib/configure new file mode 100755 index 0000000..1c0d359 --- /dev/null +++ b/nonlib/configure @@ -0,0 +1,20 @@ +#!/bin/sh +# +# Copyright (C) 2008 Jonathan Moore Liles +# This file is licensed under version 2 of the GPL. + +. scripts/config-funcs + +begin + +begin_options + +ask "Build for debugging" USE_DEBUG no + +begin_tests + +require_command ar ar +require_command makedepend makedepend +require_package JACK 0.103.0 jack + +end diff --git a/nonlib/nonlib b/nonlib/nonlib new file mode 120000 index 0000000..945c9b4 --- /dev/null +++ b/nonlib/nonlib @@ -0,0 +1 @@ +. \ No newline at end of file diff --git a/nonlib/scripts b/nonlib/scripts new file mode 120000 index 0000000..a339954 --- /dev/null +++ b/nonlib/scripts @@ -0,0 +1 @@ +../scripts \ No newline at end of file diff --git a/timeline/Makefile b/timeline/Makefile index cb27234..d008f6b 100644 --- a/timeline/Makefile +++ b/timeline/Makefile @@ -24,13 +24,16 @@ ## VERSION := 1.0.0 +PACKAGE := TIMELINE all: .config .config: configure + @ echo '<<< Configuring '$(PACKAGE) @ ./configure config: + @ echo '<<< Configuring '$(PACKAGE) @ ./configure -include .config @@ -79,7 +82,7 @@ INCLUDES := -I. -Iutil -IFL -Inonlib include scripts/colors ifneq ($(CALCULATING),yes) - COMPILING="$(BOLD)$(BLACK)[$(SGR0)$(CYAN)`scripts/percent-complete .files "$<"`$(SGR0)$(BOLD)$(BLACK)]$(SGR0) Compiling: $(BOLD)$(YELLOW)$<$(SGR0)" + COMPILING="$(BOLD)$(BLACK)$(PACKAGE) [$(SGR0)$(CYAN)`scripts/percent-complete .files "$<"`$(SGR0)$(BOLD)$(BLACK)]$(SGR0) $(BOLD)$(YELLOW)$<$(SGR0)" else COMPILING="Compiling: $<" endif @@ -94,11 +97,11 @@ endif DONE := $(BOLD)$(GREEN)done$(SGR0) include FL/makefile.inc -include nonlib/makefile.inc +# include nonlib/makefile.inc include makefile.inc -SRCS:=$(FL_SRCS) $(nonlib_SRCS) $(Timeline_SRCS) $(Mixer_SRCS) -OBJS:=$(FL_OBJS) $(nonlib_OBJS) $(Timeline_OBJS) $(Mixer_OBJS) +SRCS:=$(Timeline_SRCS) +OBJS:=$(Timeline_OBJS) # FIXME: isn't there a better way? $(OBJS): .config Makefile @@ -133,7 +136,7 @@ clean_deps: .PHONEY: clean config depend clean_deps -clean: FL_clean nonlib_clean Timeline_clean +clean: FL_clean Timeline_clean dist: git archive --prefix=non-daw-$(VERSION)/ v$(VERSION) | bzip2 > non-daw-$(VERSION).tar.bz2