]> git.donarmstrong.com Git - lilypond.git/blobdiff - make/Variables.make
release: 0.1.63
[lilypond.git] / make / Variables.make
index e7564f48a4bc691081827005b58e52ef8dbc95a4..5c4a7a860d4cbcf841cd48fd93e4b8f72a9e6131 100644 (file)
@@ -5,7 +5,7 @@
 # abstract 
 #
 # do not change this file for site-wide extensions; please use 
-# make/$(OUTDIR_NAME)/Site.make; 
+# make/$(outdir)/Site.make; 
 #
 # Any change in files in this directory (make/) would be distributed, if 
 # you do make dist 
 
 # toplevel version info, might be handy?
 #
-include $(depth)/VERSION
+include $(depth)/make/Toplevel_version.make
 
 
-ifeq (0,${MAKELEVEL})
-
 # Don't try to outsmart us, you puny computer!
-MAKE:=$(MAKE) --no-builtin-rules
+ifeq (0,${MAKELEVEL})
+  MAKE:=$(MAKE) --no-builtin-rules
 endif
 
-ifndef OUTDIR_NAME
-OUTDIR_NAME=out
+
+ifndef config
+configuration=config
+else
+configuration=config-$(config)
 endif
 
+include $(depth)/$(configuration).make
+
 # directory names:
 buildprefix=$(depth)
-outdir=$(OUTDIR_NAME)
+
+ifdef CONFIGSUFFIX
+outdir=out-$(CONFIGSUFFIX)
+else
+outdir=out
+endif
 
 # derived names
 lily_bindir = $(depth)/bin
 distdir = $(depth)/$(outdir)/$(DIST_NAME)
-module-distdir = $(depth)/$(MODULE_DIST_NAME)
 depdir = $(outdir)
 
-flowerout = $(buildprefix)/flower/$(OUTDIR_NAME)
-libout = $(buildprefix)/lib/$(OUTDIR_NAME)
-lilyout = $(buildprefix)/lily/$(OUTDIR_NAME)
-mi2muout = $(buildprefix)/mi2mu/$(OUTDIR_NAME)
-makeout = $(buildprefix)/make/$(OUTDIR_NAME)
-docout = $(buildprefix)/Documentation/$(OUTDIR_NAME)
-binout = $(buildprefix)/bin/$(OUTDIR_NAME)
+flowerout = $(buildprefix)/flower/$(outdir)
+libout = $(buildprefix)/lib/$(outdir)
+lilyout = $(buildprefix)/lily/$(outdir)
+mi2muout = $(buildprefix)/mi2mu/$(outdir)
+makeout = $(buildprefix)/make/$(outdir)
+docout = $(buildprefix)/Documentation/$(outdir)
+binout = $(buildprefix)/bin/$(outdir)
 
 doc-dir = $(depth)/Documentation
 flower-dir = $(depth)/flower
@@ -60,7 +68,10 @@ include-flower = $(depth)/flower/include
 rpm-sources = ${HOME}/rpms/SOURCES
 #
 
-include $(makeout)/Configure_variables.make
+configheader=$(outdir)/config.hh
+
+
+
 
 # user settings:
 #
@@ -68,9 +79,6 @@ include $(depth)/make/User.make
 #
 #
 # need to be defined in local Makefiles:
-# build = ./$(depth)/lily/$(outdir)/.build ######## UGR!
-BUILD = $(shell cat $(build))
-INCREASE_BUILD = echo `expr \`cat $(build)\` + 1` > .b; mv .b $(build)
 #
 FOOBAR = 
 # the version:
@@ -86,16 +94,19 @@ TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_
 else
 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)
 endif
-
 #
 
+# ugh, but it gets hairy without extension..
+DOTTEXT=.txt
+
+# for rpmrc only
+LILYPOND_ROOTDIR=$(shell cd $(depth)/..; pwd)
 
-# module and top level dist:
 #
 # fix naming, use TOPLEVEL_ prefix _or_ MODULE?
-MODULE_DIST_NAME = $(MODULE_NAME)-$(VERSION)
 DIST_NAME = lilypond-$(TOPLEVEL_VERSION)
-NO_DOOS_DIST = bin flower lib lily make mi2mu out
+# NO_DOOS_DIST = bin flower lib lily make mi2mu out
+NO_DOOS_DIST = flower lib lily make mi2mu out
 #
 
 # list of object files:
@@ -103,8 +114,8 @@ NO_DOOS_DIST = bin flower lib lily make mi2mu out
 SOURCE_FILES = $(CCFILES) $(EXTRA_SOURCE_FILES)
 OFILEC = $(SOURCE_FILES:.c=.o)
 OFILECC = $(OFILEC:.cc=.o)
-OFILEL = $(OFILECC:.l=.o)
-OFILEY = $(OFILEL:.y=.o)
+OFILEL = $(OFILECC:.ll=.o)
+OFILEY = $(OFILEL:.yy=.o)
 OFILES = $(addprefix $(outdir)/,$(OFILEY))
 #
 
@@ -146,14 +157,14 @@ CFLAGS = $(ICFLAGS) $(DEFINES) $(INCLUDES) $(USER_CFLAGS) $(EXTRA_CFLAGS)
 # huh, but still, no warnings even provoced with linux's gcc 2.7.2.1?
 
 # -pipe makes it go faster, but is not supported on all platforms. 
-# EXTRA_CXXFLAGS= -fno-rtti -fno-exceptions -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wconversion
+# EXTRA_CXXFLAGS= -Wall -Winline -W -Wmissing-prototypes -Wmissing-declarations -Wconversion
 EXTRA_CXXFLAGS= -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wconversion
 
 CXXFLAGS = $(CFLAGS) $(USER_CXXFLAGS) $(EXTRA_CXXFLAGS) $(MODULE_CXXFLAGS)
-INCLUDES = -Iinclude -I$(outdir) -I$(include-lib) -I$(libout) -I$(include-flower) -I$(flowerout) 
+INCLUDES =  -Iinclude -I$(outdir) -I$(include-lib) -I$(libout) -I$(include-flower) -I$(flowerout) 
 CXX_OUTPUT_OPTION = $< -o $@
-LDFLAGS = $(ILDFLAGS) $(USER_LDFLAGS) $(EXTRA_LDFLAGS) $(MODULE_LDFLAGS) -L$(depth)/lib/$(OUTDIR_NAME) -L$(depth)/flower/$(OUTDIR_NAME)
-LOADLIBES = $(EXTRA_LIBES) $(MODULE_LIBES) -lg++ -lstdc++ # need lg++ for win32, really!
+LDFLAGS = $(ILDFLAGS) $(USER_LDFLAGS) $(EXTRA_LDFLAGS) $(MODULE_LDFLAGS) -L$(depth)/lib/$(outdir) -L$(depth)/flower/$(outdir)
+LOADLIBES = $(EXTRA_LIBES) $(MODULE_LIBES)  -lstdc++ # need lg++ for win32, really!
 #
 
 # macro compiler:
@@ -206,7 +217,8 @@ ifndef LIB_SUFFIX
 LIB_SUFFIX = .a
 endif
 
-LIBRARY = $(LIB_PREFIX)$(NAME)$(LIB_SUFFIX)
+LIBRARY = $(outdir)/$(LIB_PREFIX)$(NAME).a
+SHAREDLIBRARY=$(outdir)/$(LIB_PREFIX)$(NAME).so
 #
 
 #replace to do stripping of certain objects
@@ -215,8 +227,7 @@ STRIPDEBUG=true
 DISTFILES=$(EXTRA_DISTFILES) Makefile $(ALL_SOURCES)
 DOCDIR=$(depth)/$(outdir)
 
-pod2html=pod2html
-pod2groff=pod2man --center="LilyPond documentation" --section="0"\
+pod2groff=$(POD2MAN) --center="LilyPond documentation" --section="0"\
        --release="LilyPond $(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)" $< > $@
 
 
@@ -228,4 +239,8 @@ endif
 # substitute $(STRIP) in Site.make if you want stripping
 DO_STRIP=true
 
-
+ifdef SUBDIRS
+LOOP=set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i $@; done
+else
+LOOP=
+endif