lilypond-0.0.38
[lilypond.git] / Variables.make
blob1d8348bb86cc1cde2440acd8c5026ff86e0a2521
1 # -*-Makefile-*-
3 # version info
4 MAJVER=0
5 MINVER=0
6 PATCHLEVEL=38
10 ####
11 #### USER CONFIGURABLE
12 ####
14 #PROFILEFLAG=-pg
15 OPTIFLAG=-DNDEBUG -DNPRINT -O2
16 DEBUGFLAG=-g
18 # uncomment for windhoos
19 # CXX=g++
21 # turn off -pipe if linker doesn't support it
22 EXTRACXXFLAGS=-pipe -Wall -W -Wmissing-prototypes -DSTRING_UTILS_INLINED
25 # -lefence = ElectricFence.
27 # ElectricFence is a memory debugger which uses the
28 # VM hardware to trap malloc/free errors.
31 EXTRALIB+= #-lefence
33 ####
34 #### END USER CONFIGURABLE part.
35 ####
37 ifdef PROFILEFLAG
38 DEFINES+=$(OPTIFLAG) $(PROFILEFLAG)
39 EXTRALIB+=-pg
40 endif
42 ifndef DEBUGFLAG
43 DEFINES+=$(OPTIFLAG)
44 else
45 DEFINES+=$(DEBUGFLAG)
46 endif
50 VERSION=$(MAJVER).$(MINVER).$(PATCHLEVEL)
51 CXXVER=`$(CXX) --version`
53 # directories
54 TOPDIR := $(shell if [ "$$PWD" != "" ]; then echo $$PWD; else pwd; fi)
56 OBJECTDIR=objects
57 HEADERDIR=hdr
58 CCDIR=src
59 INITDIR=init
60 DEPDIR=deps
61 INPUTDIR=input
65 include Sources.make
67 # UGH, this sux!
68 gencc=parser.cc lexer.cc
69 cc=$(mycc) $(gencc)
70 mym2mgencc=midi-parser.cc midi-lexer.cc
71 m2mcc=$(mym2mcc) $(mym2mgencc) $(mym2msharedcc)
73 MY_CCSOURCE=$(addprefix $(CCDIR)/, $(mycc))
74 CCSOURCE=$(addprefix $(CCDIR)/, $(cc))
76 obs=$(addprefix $(OBJECTDIR)/,$(cc:.cc=.o))
77 m2mobs=$(addprefix $(OBJECTDIR)/,$(m2mcc:.cc=.o))
79 allcc=$(mycc) $(mym2mcc)
80 allobs=$(obs) $(m2mobs)
81 allexe=$(exe) $(m2m)
82 M2MCCSOURCE=$(addprefix $(CCDIR)/, $(m2mcc))
83 ALLDEPS=$(addprefix $(DEPDIR)/,$(cc:.cc=.dep))
84 STABLEOBS=$(addprefix $(OBJECTDIR)/,$(stablecc:.cc=.o))
85 allhdr=$(hdr) $(mym2mhh)
86 HEADERS=$(addprefix $(HEADERDIR)/,$(allhdr))
87 progdocs=$(HEADERS) $(MY_CCSOURCE)
89 #dist
90 .EXPORT_ALL_VARIABLES:
92 DOCDIR=docxx
94 PACKAGENAME=lilypond
95 DNAME=$(PACKAGENAME)-$(VERSION)
96 M2MNAME=m2m
98 # distribution files.
99 othersrc=lexer.l parser.y midi-lexer.l midi-parser.y
100 SCRIPTS=make_version make_patch genheader clearlily
101 MAKFILES=Makefile Variables.make Sources.make Initial.make Generate.make \
102 configure
103 OFILES=COPYING README NEWS TODO ANNOUNCE
104 IFILES= titledefs.tex lilyponddefs.tex \
105 ltest.tex test.tex .dstreamrc dimen.tex
106 DFILES=$(MAKFILES) $(OFILES) $(IFILES) $(SCRIPTS)
108 #compiling
109 LOADLIBES=-L$(FLOWERDIR) -lflower $(EXTRALIB) -lg++
110 FLOWERDIR=../flower
112 CXXFLAGS=$(DEFINES) -I$(HEADERDIR) -I$(FLOWERDIR) $(EXTRACXXFLAGS)
113 FLEX=flex
114 BISON=bison
115 exe=$(PACKAGENAME)
116 m2m=$(M2MNAME)
117 OUTPUT_OPTION=$< -o $@
118 DDIR=$(TOPDIR)/$(DNAME)
119 SUBDIRS=Documentation $(OBJECTDIR) $(CCDIR) $(HEADERDIR) $(INITDIR) $(DEPDIR) \
120 $(INPUTDIR)
122 depfile=deps/$(subst .o,.dep,$(notdir $@))
123 DODEP=rm -f $(depfile); DEPENDENCIES_OUTPUT="$(depfile) $(OBJECTDIR)/$(notdir $@)"
125 STRIPDEBUG=true #replace to do stripping of certain objects
126 LINKER=$(CXX)
127 include Site.make
129 TAGSACTION=etags -l c++ --no-defines