lilypond-0.0.35
[lilypond.git] / Variables.make
blobcc697d7c3ccd2dce4c3f414573a0c78da7546bdb
1 # -*-Makefile-*-
3 # version info
4 MAJVER=0
5 MINVER=0
6 PATCHLEVEL=34
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))
75 obs=$(addprefix $(OBJECTDIR)/,$(cc:.cc=.o))
76 m2mobs=$(addprefix $(OBJECTDIR)/,$(m2mcc:.cc=.o))
77 allcc=$(mycc) $(mym2mcc)
78 allobs=$(obs) $(m2mobs)
79 allexe=$(exe) $(m2m)
80 M2MCCSOURCE=$(addprefix $(CCDIR)/, $(m2mcc))
81 ALLDEPS=$(addprefix $(DEPDIR)/,$(cc:.cc=.dep))
82 STABLEOBS=$(addprefix $(OBJECTDIR)/,$(stablecc:.cc=.o))
83 allhdr=$(hdr) $(mym2mhh)
84 HEADERS=$(addprefix $(HEADERDIR)/,$(allhdr))
85 progdocs=$(HEADERS) $(MY_CCSOURCE)
87 #dist
88 .EXPORT_ALL_VARIABLES:
90 DOCDIR=docxx
92 PACKAGENAME=lilypond
93 DNAME=$(PACKAGENAME)-$(VERSION)
94 M2MNAME=m2m
96 # distribution files.
97 othersrc=lexer.l parser.y midi-lexer.l midi-parser.y
98 SCRIPTS=make_version make_patch genheader clearlily
99 MAKFILES=Makefile Variables.make Sources.make Initial.make Generate.make \
100 configure
101 OFILES=COPYING README NEWS TODO ANNOUNCE
102 IFILES= titledefs.tex lilyponddefs.tex \
103 ltest.tex test.tex .dstreamrc dimen.tex
104 DFILES=$(MAKFILES) $(OFILES) $(IFILES) $(SCRIPTS)
106 #compiling
107 LOADLIBES=-L$(FLOWERDIR) -lflower $(EXTRALIB) -lg++
108 FLOWERDIR=../flower
110 CXXFLAGS=$(DEFINES) -I$(HEADERDIR) -I$(FLOWERDIR) $(EXTRACXXFLAGS)
111 FLEX=flex
112 BISON=bison
113 exe=$(PACKAGENAME)
114 m2m=$(M2MNAME)
115 OUTPUT_OPTION=$< -o $@
116 DDIR=$(TOPDIR)/$(DNAME)
117 SUBDIRS=Documentation $(OBJECTDIR) $(CCDIR) $(HEADERDIR) $(INITDIR) $(DEPDIR) \
118 $(INPUTDIR)
120 depfile=deps/$(subst .o,.dep,$(notdir $@))
121 DODEP=rm -f $(depfile); DEPENDENCIES_OUTPUT="$(depfile) $(OBJECTDIR)/$(notdir $@)"
123 STRIPDEBUG=true #replace to do stripping of certain objects
124 LINKER=$(CXX)
125 include Site.make
127 include Site.make