]> git.donarmstrong.com Git - lilypond.git/blobdiff - make/Variables.make
release: 0.0.54
[lilypond.git] / make / Variables.make
index d1ca0485813e9a05f39b5a4f426a252f7e906cc1..4cc56e118bd815cef6be4a6fc9a51d756ce57941 100644 (file)
@@ -2,8 +2,11 @@
 # project  LilyPond -- the musical typesetter
 # title           generic variables
 # file    make/Variables.make
-# abstract do not change this file for site-wide extensions;
-# please edit settings in User.make 
+# abstract 
+#
+# do not change this file for site-wide extensions; please use 
+# make/out/Site.make; 
+# Any change in files in this directory (make/) would be distributed.
 #
 # Copyright (c) 1997 by    
 #      Jan Nieuwenhuizen <jan@digicash.com>
@@ -19,20 +22,19 @@ ifeq (0,${MAKELEVEL})
 MAKE:=$(MAKE) --no-builtin-rules
 endif
 
-
 # directory names:
 #
-outdir = out# "objects" won-t do, used for libs and deps as well
+outdir = out
 lily_bindir = ./$(depth)/bin
 distdir = ./$(depth)/$(DIST_NAME)
 module-distdir = ./$(depth)/$(MODULE_DIST_NAME)
 depdir = $(outdir)
 flowerout = ./$(depth)/flower/$(outdir)
 libout = ./$(depth)/lib/$(outdir)
-libdir = $(outdir)
 lilyout = ./$(depth)/lily/$(outdir)
 mi2muout = ./$(depth)/mi2mu/$(outdir)
 makeout = ./$(depth)/make/$(outdir)
+doc-dir = ./$(depth)/Documentation
 flower-dir = ./$(depth)/flower
 lib-dir = ./$(depth)/lib
 lily-dir = ./$(depth)/lily
@@ -41,6 +43,8 @@ make-dir = ./$(depth)/make
 include-lib = ./$(depth)/lib/include
 include-flower = ./$(depth)/flower/include
 #
+rpm-sources = ${HOME}/rpms/SOURCES
+#
 
 # user settings:
 #
@@ -53,9 +57,6 @@ BUILD = $(shell cat $(build))
 INCREASE_BUILD = echo `expr \`cat $(build)\` + 1` > .b; mv .b $(build)
 #
 
-# ugh, for win32 make
-export CXX
-
 # the version:
 #
 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)$(MY_PATCH_LEVEL)
@@ -77,7 +78,7 @@ OFILEC = $(SOURCE_FILES:.c=.o)
 OFILECC = $(OFILEC:.cc=.o)
 OFILEL = $(OFILECC:.l=.o)
 OFILEY = $(OFILEL:.y=.o)
-OFILES = $(patsubst %,$(outdir)/%,$(OFILEY))
+OFILES = $(addprefix $(outdir)/,$(OFILEY))
 #
 
 # dummydeps
@@ -93,13 +94,14 @@ DUMMYDEPS=\
 # clean file lists:
 #
 ERROR_LOG = 2> /dev/null
-SILENT_LOG = >& /dev/null
+SILENT_LOG = 2>&1 >  /dev/null
 allexe = $(lily_bindir)/lilypond $(lily_bindir)/mi2mu
-allhh := $(shell $(FIND) -name "*.hh" $(ERROR_LOG))
-allcc := $(shell $(FIND) -name "*.cc" $(ERROR_LOG))
-allobs := $(shell $(FIND) $(outdir) -name "*.o" $(ERROR_LOG))
-allibs := $(shell $(FIND) $(libdir) -name "*.lib" $(ERROR_LOG))
-alldeps := $(shell $(FIND) $(outdir) -name "*.dep" $(ERROR_LOG))
+date = $(shell date +%x)
+allhh := $(shell $(FIND) ./ -name "*.hh" $(ERROR_LOG))
+allcc := $(shell $(FIND)  ./ -name "*.cc" $(ERROR_LOG))
+allobs := $(shell $(FIND) ./  $(outdir) -name "*.o" $(ERROR_LOG))
+
+alldeps := $(shell $(FIND)  ./ $(outdir) -name "*.dep" $(ERROR_LOG))
 
 # version stuff:
 #
@@ -118,11 +120,19 @@ LIBLILY = $(depth)/lib/$(outdir)/$(LIB_PREFIX)lily$(LIB_SUFFIX)
 #
 ARFLAGS = ru
 CFLAGS = $(DEFINES) $(INCLUDES) $(USER_CFLAGS) $(EXTRA_CFLAGS)
-CXXFLAGS = $(CFLAGS) $(USER_CXXFLAGS) $(EXTRA_CXXFLAGS)
+
+# added two warnings that are treated by cygwin32's gcc 2.7.2 as errors.
+# 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= -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) 
 CXX_OUTPUT_OPTION = $< -o $@
-LDFLAGS = $(EXTRA_LDFLAGS)
-LOADLIBES = $(EXTRA_LIBES) $(CUSTOMLIBES)
+LDFLAGS = $(EXTRA_LDFLAGS) $(MODULE_LDFLAGS) -L$(depth)/lib/out -L$(depth)/flower/out
+LOADLIBES = $(EXTRA_LIBES) $(MODULE_LIBES) -lg++ # need lg++ for win32, really!
 #
 
 # librarian:
@@ -162,16 +172,35 @@ DODEP=rm -f $(depfile); DEPENDENCIES_OUTPUT="$(depfile) $(outdir)/$(notdir $@)"
 #
 EXECUTABLE = $(NAME)$(EXE)
 LIB_PREFIX = lib
+
+ifndef LIB_SUFFIX
 LIB_SUFFIX = .a
+endif
+
 LIBRARY = $(LIB_PREFIX)$(NAME)$(LIB_SUFFIX)
 #
 
-STRIPDEBUG=true #replace to do stripping of certain objects
+#replace to do stripping of certain objects
+STRIPDEBUG=true 
 
 DISTFILES=$(EXTRA_DISTFILES) Makefile $(ALL_SOURCES)
 DOCDIR=$(depth)/$(outdir)
 
+# .hh should be first. Don't know why
+# take some trouble to vauto ignore sources and obsolete stuff.
+progdocs=$(shell find ./ -name '*.hh' |egrep -v 'obsolete/|out/') $(shell find -name '*.cc'|egrep -v 'out/|obsolete/')
 
-progdocs=$(allhh) $(allcc) 
+
+pod2html=pod2html
 pod2groff=pod2man --center="LilyPond documentation" --section="0"\
        --release="LilyPond $(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)" $< > $@
+
+
+STRIP=strip --strip-debug
+ifdef stablecc
+ STABLEOBS=$(addprefix $(outdir)/,$(stablecc:.cc=.o))
+endif
+
+# substitute $(STRIP) if you want stripping
+DO_STRIP=true
+