]> git.donarmstrong.com Git - lilypond.git/blob - make/Variables.make
release: 0.0.39-1
[lilypond.git] / make / Variables.make
1 #
2 # project  LilyPond -- the musical typesetter
3 # title    generic variables
4 # file     make/Variables.make
5 # abstract do not change this file; edit settings in User.make
6 #
7 # Copyright (c) 1997 by    
8 #       Jan Nieuwenhuizen <jan@digicash.com>
9 #       Han-Wen Nienhuys <hanwen@stack.nl>
10
11 # toplevel version info, might be handy?
12 #
13 include ./$(depth)/.version
14 #
15
16 # directory names:
17 #
18 outdir = out# "objects" won-t do, used for libs and deps as well
19 bindir = ./$(depth)/bin
20 distdir = ./$(depth)/$(DIST_NAME)
21 module-distdir = ./$(depth)/$(MODULE_DIST_NAME)
22 depdir = $(outdir)
23 libdir = $(outdir)
24 flowerout = ./$(depth)/flower/lib/$(outdir)
25 libout = ./$(depth)/lib/$(outdir)
26 # flower-dir = ./$(depth)/flower
27 include-lib = ./$(depth)/lib/include
28 include-flower = ./$(depth)/flower/lib/include
29 #
30
31 # user settings:
32 #
33 include ./$(depth)/make/User.make
34 #
35
36 ifdef PROFILEFLAG
37         DEFINES+=$(OPTIFLAG) $(PROFILEFLAG)
38         EXTRA_LIBES+=-pg
39 endif
40
41 ifndef DEBUGFLAG
42         DEFINES+=$(OPTIFLAG)
43 else
44         DEFINES+=$(DEBUGFLAG)
45 endif
46
47 # build no:
48 #
49 # need to be defined in local Makefiles:
50 # build = ./$(depth)/lily/.build
51 BUILD = $(shell cat $(build))
52 INCREASE_BUILD = @echo `expr \`cat $(build)\` + 1` > .b; mv .b $(build)
53 #
54
55 # the version:
56 #
57 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)$(MY_PATCH_LEVEL)
58 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)$(TOPLEVEL_MY_PATCH_LEVEL)
59 #
60
61 # compiler version:
62 #
63 CXXVER=`$(CXX) --version`
64 #
65
66 # module and top level dist:
67 #
68 # fix naming, use TOPLEVEL_ prefix _or_ MODULE?
69 MODULE_DIST_NAME = $(MODULE_NAME)-$(VERSION)
70 DIST_NAME = lilypond-$(TOPLEVEL_VERSION)
71 #
72
73 # list of object files:
74 #
75 SOURCE_FILES = $(CCFILES) $(EXTRA_SOURCE_FILES)
76 OFILEC = $(SOURCE_FILES:.c=.o)
77 OFILECC = $(OFILEC:.cc=.o)
78 OFILEL = $(OFILECC:.l=.o)
79 OFILEY = $(OFILEL:.y=.o)
80 OFILES = $(patsubst %,$(outdir)/%,$(OFILEY))
81 #
82
83 # clean file lists:
84 #
85 allexe = $(bindir)/lilypond $(bindir)/m2m
86 allobs = $(shell find $(outdir) -name "*.o" )
87 allibs = $(shell find $(libdir) -name "*.lib" )
88 alldeps = $(shell find $(outdir) -name "*.dep" )
89 allout = $(shell find . -name "$(outdir)" )
90 #
91
92 # version stuff:
93 #
94 flower-version = $(flowerout)/fversion.hh
95 lily-version = $(libout)/version.hh
96 #
97
98 # custom libraries:
99 #
100 LIBFLOWER = $(depth)/flower/lib/$(outdir)/$(LIB_PREFIX)flower$(LIB_SUFFIX)
101 LIBLILY = $(depth)/lib/$(outdir)/$(LIB_PREFIX)lily$(LIB_SUFFIX)
102 #
103
104 # compile and link options:
105 #
106 ARFLAGS = ru
107 CFLAGS = $(DEFINES) $(INCLUDES) $(USER_CFLAGS) $(EXTRA_CFLAGS)
108 CXXFLAGS = $(CFLAGS) $(USER_CXXFLAGS) $(EXTRA_CXXFLAGS)
109 INCLUDES = -Iinclude -I$(outdir) -I$(include-lib) -I$(libout) -I$(include-flower) -I$(flowerout) 
110 CXX_OUTPUT_OPTION = $< -o $@
111 LDFLAGS = $(EXTRA_LDFLAGS)
112 LOADLIBES = $(EXTRA_LIBES) $(CUSTOMLIBES) -lg++
113 #
114
115 # librarian:
116 #
117 AR = ar
118 AR_COMMAND = $(AR) $(ARFLAGS) $@
119 #
120
121 # compiler:
122 #
123 # "CC = $(CC)"
124 # "CXX = $(CXX)"
125 #
126
127 # linker:
128 #
129 LD = $(CXX)
130 LD_COMMAND = $(LD) $(LDFLAGS) -o $@
131 #
132
133 # dependencies:
134 #
135 depfile = ./$(depdir)/$(subst .o,.dep,$(notdir $@)) 
136 DODEP=rm -f $(depfile); DEPENDENCIES_OUTPUT="$(depfile) $(outdir)/$(notdir $@)"
137 #
138
139 # utils:
140 #
141 FLEX = flex
142 BISON = bison
143 #
144
145 # generic target names:
146 #
147 EXECUTABLE = $(NAME)$(EXE)
148 LIB_PREFIX = lib
149 LIB_SUFFIX = .a
150 LIBRARY = $(LIB_PREFIX)$(NAME)$(LIB_SUFFIX)
151 #
152
153 STRIPDEBUG=true #replace to do stripping of certain objects
154