2 # project LilyPond -- the musical typesetter
3 # title generic variables
4 # file make/Variables.make
7 # do not change this file for site-wide extensions; please use
8 # make/$(OUTDIR_NAME)/Site.make;
10 # Any change in files in this directory (make/) would be distributed, if
13 # Copyright (c) 1997 by
14 # Jan Nieuwenhuizen <jan@digicash.com>
15 # Han-Wen Nienhuys <hanwen@stack.nl>
17 # toplevel version info, might be handy?
19 include $(depth
)/VERSION
24 # Don't try to outsmart us, you puny computer!
25 MAKE
:=$(MAKE
) --no-builtin-rules
37 lily_bindir
= $(depth
)/bin
38 distdir
= $(depth
)/$(DIST_NAME
)
39 module-distdir
= $(depth
)/$(MODULE_DIST_NAME
)
42 flowerout
= $(buildprefix
)/flower
/$(OUTDIR_NAME
)
43 libout
= $(buildprefix
)/lib
/$(OUTDIR_NAME
)
44 lilyout
= $(buildprefix
)/lily
/$(OUTDIR_NAME
)
45 mi2muout
= $(buildprefix
)/mi2mu
/$(OUTDIR_NAME
)
46 makeout
= $(buildprefix
)/make
/$(OUTDIR_NAME
)
47 docout
= $(buildprefix
)/Documentation
/$(OUTDIR_NAME
)
48 binout
= $(buildprefix
)/bin
/$(OUTDIR_NAME
)
50 doc-dir
= $(depth
)/Documentation
51 flower-dir
= $(depth
)/flower
52 lib-dir
= $(depth
)/lib
53 lily-dir
= $(depth
)/lily
54 mi2mu-dir
= $(depth
)/mi2mu
55 make-dir
= $(depth
)/make
56 include-lib
= $(depth
)/lib
/include
57 include-flower
= $(depth
)/flower
/include
60 rpm-sources
= ${HOME}/rpms
/SOURCES
63 include $(makeout
)/Configure_variables.make
67 include $(depth
)/make
/User.make
70 # need to be defined in local Makefiles:
71 # build = ./$(depth)/lily/$(outdir)/.build ######## UGR!
72 BUILD
= $(shell cat
$(build
))
73 INCREASE_BUILD
= echo
`expr \`cat
$(build
)\
` + 1` > .b
; mv .b
$(build
)
78 VERSION
=$(MAJOR_VERSION
).
$(MINOR_VERSION
).
$(PATCH_LEVEL
)$(MY_PATCH_LEVEL
)
79 TOPLEVEL_VERSION
=$(TOPLEVEL_MAJOR_VERSION
).
$(TOPLEVEL_MINOR_VERSION
).
$(TOPLEVEL_PATCH_LEVEL
)$(TOPLEVEL_MY_PATCH_LEVEL
)
83 # module and top level dist:
85 # fix naming, use TOPLEVEL_ prefix _or_ MODULE?
86 MODULE_DIST_NAME
= $(MODULE_NAME
)-$(VERSION
)
87 DIST_NAME
= lilypond-
$(TOPLEVEL_VERSION
)
88 NO_DOOS_DIST
= bin flower lib lily make mi2mu out
91 # list of object files:
93 SOURCE_FILES
= $(CCFILES
) $(EXTRA_SOURCE_FILES
)
94 OFILEC
= $(SOURCE_FILES
:.c
=.o
)
95 OFILECC
= $(OFILEC
:.
cc=.o
)
96 OFILEL
= $(OFILECC
:.l
=.o
)
97 OFILEY
= $(OFILEL
:.y
=.o
)
98 OFILES
= $(addprefix $(outdir
)/,$(OFILEY
))
104 $(flowerout
)/dummy.dep\
106 $(lilyout
)/dummy.dep\
107 $(mi2muout
)/dummy.dep\
113 ERROR_LOG
= 2> /dev
/null
114 SILENT_LOG
= 2>&1 > /dev
/null
115 date
= $(shell date
+%x
)
119 lily-version
= $(lilyout
)/version.hh
120 flower-version
= $(flowerout
)/version.hh
121 mi2mu-version
= $(mi2muout
)/version.hh
126 LIBFLOWER
= $(flowerout
)/$(LIB_PREFIX
)flower
$(LIB_SUFFIX
)
127 LIBLILY
= $(libout
)/$(LIB_PREFIX
)lily
$(LIB_SUFFIX
)
130 # compile and link options:
133 CFLAGS
= $(ICFLAGS
) $(DEFINES
) $(INCLUDES
) $(USER_CFLAGS
) $(EXTRA_CFLAGS
)
135 # added two warnings that are treated by cygwin32's gcc 2.7.2 as errors.
136 # huh, but still, no warnings even provoced with linux's gcc 2.7.2.1?
138 # -pipe makes it go faster, but is not supported on all platforms.
139 EXTRA_CXXFLAGS
= -Wall
-W
-Wmissing-prototypes
-Wmissing-declarations
-Wconversion
142 CXXFLAGS
= $(CFLAGS
) $(USER_CXXFLAGS
) $(EXTRA_CXXFLAGS
) $(MODULE_CXXFLAGS
)
143 INCLUDES
= -Iinclude
-I
$(outdir
) -I
$(include-lib
) -I
$(libout
) -I
$(include-flower
) -I
$(flowerout
)
144 CXX_OUTPUT_OPTION
= $< -o
$@
145 LDFLAGS
= $(ILDFLAGS
) $(USER_LDFLAGS
) $(EXTRA_LDFLAGS
) $(MODULE_LDFLAGS
) -L
$(depth
)/lib
/$(OUTDIR_NAME
) -L
$(depth
)/flower
/$(OUTDIR_NAME
)
146 LOADLIBES
= $(EXTRA_LIBES
) $(MODULE_LIBES
) -lg
++ # need lg++ for win32, really!
152 AR_COMMAND
= $(AR
) $(ARFLAGS
) $@
154 RANLIB_COMMAND
=$(RANLIB
) $@
158 DO_CXX_COMPILE
=$(DODEP
)\
159 $(CXX
) -c
$(CXXFLAGS
) $(CXX_OUTPUT_OPTION
)
164 LD_COMMAND
= $(LD
) $(LDFLAGS
) -o
$@
169 depfile
= $(depdir
)/$(subst .o
,.dep
,$(notdir $@
))
170 DODEP
=rm -f
$(depfile
); DEPENDENCIES_OUTPUT
="$(depfile) $(outdir)/$(notdir $@)"
179 # generic target names:
182 EXECUTABLE
= $(outdir
)/$(NAME
)$(EXE
)
187 EXECUTABLES
= $(EXECUTABLE
)
194 LIBRARY
= $(LIB_PREFIX
)$(NAME
)$(LIB_SUFFIX
)
197 #replace to do stripping of certain objects
200 DISTFILES
=$(EXTRA_DISTFILES
) Makefile
$(ALL_SOURCES
)
201 DOCDIR
=$(depth
)/$(outdir
)
203 # .hh should be first. Don't know why
204 # take some trouble to auto ignore sources and obsolete stuff.
205 progdocs
=$(shell $(FIND
) .
/ -name
'*.hh' |egrep
-v
'$(OUTDIR_NAME)') \
206 $(shell $(FIND
) .
/ -name
'*.cc' |egrep
-v
'$(OUTDIR_NAME)') \
210 pod2groff
=pod2man
--center
="LilyPond documentation" --section
="0"\
211 --release
="LilyPond $(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)" $< > $@
214 STRIP
=strip --strip-debug
216 STABLEOBS
=$(addprefix $(outdir
)/,$(stablecc
:.
cc=.o
))
219 # substitute $(STRIP) in Site.make if you want stripping