lilypond-0.0.27
[lilypond.git] / Variables.make
blobe71edf9753f44b990b40ca56bb2e4532da2dae29
1 ####
2 #### USER CONFIGURABLE
3 ####
5 #PROFILEFLAG=-pg
6 OPTIFLAG=-DNDEBUG -DNPRINT -O2
7 DEBUGFLAG=-g
9 # turn off -pipe if linker doesn't support it
10 EXTRACXXFLAGS=-pipe -Wall -W -Wmissing-prototypes
13 # -lefence = ElectricFence.
15 # ElectricFence is a memory debugger which uses the
16 # VM hardware to trap malloc/free errors.
18 #EXTRALIB+=-lefence
20 ####
21 #### END USER CONFIGURABLE part.
22 ####
24 ifdef PROFILEFLAG
25 DEFINES+=$(OPTIFLAG) $(PROFILEFLAG)
26 EXTRALIB+=-pg
27 endif
29 ifndef DEBUGFLAG
30 DEFINES+=$(OPTIFLAG)
31 else
32 DEFINES+=$(DEBUGFLAG)
33 endif
37 # version info
38 MAJVER=0
39 MINVER=0
40 PATCHLEVEL=26
41 VERSION=$(MAJVER).$(MINVER).$(PATCHLEVEL)
42 CXXVER=`$(CXX) --version`
44 # directories
45 TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
46 OBJECTDIR=objects
47 HEADERDIR=hdr
48 CCDIR=src
49 INITDIR=init
50 DEPDIR=deps
51 INPUTDIR=input
52 #vpath %.cc $(CCDIR)
53 #vpath %.hh $(HEADERDIR)
54 #vpath %.y $(CCDIR)
55 #vpath %.l $(CCDIR)
56 #vpath %.o $(OBJECTDIR)
57 #vpath %.dep $(DEPDIR)
61 include Sources.make
62 progdocs=$(hdr) $(mycc)
63 gencc=parser.cc lexer.cc
64 cc=$(mycc) $(gencc)
66 CCSOURCE=$(addprefix $(CCDIR)/, $(cc))
67 obs=$(addprefix $(OBJECTDIR)/,$(cc:.cc=.o))
68 ALLDEPS=$(addprefix $(DEPDIR)/,$(cc:.cc=.dep))
70 #dist
71 .EXPORT_ALL_VARIABLES:
73 DOCDIR=docdir
75 PACKAGENAME=lilypond
76 DNAME=$(PACKAGENAME)-$(VERSION)
78 # distribution files.
79 othersrc=lexer.l parser.y
80 SCRIPTS=make_version make_patch genheader clearlily
81 MAKFILES=Makefile Variables.make Sources.make Initial.make Generate.make \
82 configure
83 OFILES=COPYING README NEWS TODO
84 IFILES= standchen.tex titledefs.tex pavane.tex lilyponddefs.tex \
85 ltest.tex test.tex .dstreamrc dimen.tex
86 DFILES=$(MAKFILES) $(OFILES) $(IFILES) $(SCRIPTS)
88 #compiling
89 LOADLIBES=-L$(FLOWERDIR) -lflower $(EXTRALIB)
90 FLOWERDIR=../flower
92 CXXFLAGS=$(DEFINES) -I$(HEADERDIR) -I$(FLOWERDIR) $(EXTRACXXFLAGS)
93 FLEX=flex
94 BISON=bison
95 exe=$(PACKAGENAME)
96 OUTPUT_OPTION=$< -o $@
97 DDIR=$(TOPDIR)/$(DNAME)
98 SUBDIRS=Documentation $(OBJECTDIR) $(CCDIR) $(HEADERDIR) $(INITDIR) $(DEPDIR) \
99 $(INPUTDIR)
101 depfile=deps/$(subst .o,.dep,$(notdir $@))
102 DODEP=rm -f $(depfile); DEPENDENCIES_OUTPUT="$(depfile) $(OBJECTDIR)/$(notdir $@)"