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)/make/Toplevel_version.make
24 # Don't try to outsmart us, you puny computer!
25 MAKE:=$(MAKE) --no-builtin-rules
37 lily_bindir = $(depth)/bin
38 distdir = $(depth)/$(outdir)/$(DIST_NAME)
41 flowerout = $(buildprefix)/flower/$(OUTDIR_NAME)
42 libout = $(buildprefix)/lib/$(OUTDIR_NAME)
43 lilyout = $(buildprefix)/lily/$(OUTDIR_NAME)
44 mi2muout = $(buildprefix)/mi2mu/$(OUTDIR_NAME)
45 makeout = $(buildprefix)/make/$(OUTDIR_NAME)
46 docout = $(buildprefix)/Documentation/$(OUTDIR_NAME)
47 binout = $(buildprefix)/bin/$(OUTDIR_NAME)
49 doc-dir = $(depth)/Documentation
50 flower-dir = $(depth)/flower
51 lib-dir = $(depth)/lib
52 lily-dir = $(depth)/lily
53 mi2mu-dir = $(depth)/mi2mu
54 make-dir = $(depth)/make
55 include-lib = $(depth)/lib/include
56 include-flower = $(depth)/flower/include
59 rpm-sources = ${HOME}/rpms/SOURCES
66 include $(depth)/$(configuration).make
70 include $(depth)/make/User.make
73 # need to be defined in local Makefiles:
78 ifneq ($(MY_PATCH_LEVEL),$(FOOBAR))
79 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL).$(MY_PATCH_LEVEL)
81 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)
84 ifneq ($(TOPLEVEL_MY_PATCH_LEVEL),$(FOOBAR))
85 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL).$(TOPLEVEL_MY_PATCH_LEVEL)
87 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)
94 # fix naming, use TOPLEVEL_ prefix _or_ MODULE?
95 DIST_NAME = lilypond-$(TOPLEVEL_VERSION)
96 NO_DOOS_DIST = bin flower lib lily make mi2mu out
99 # list of object files:
101 SOURCE_FILES = $(CCFILES) $(EXTRA_SOURCE_FILES)
102 OFILEC = $(SOURCE_FILES:.c=.o)
103 OFILECC = $(OFILEC:.cc=.o)
104 OFILEL = $(OFILECC:.ll=.o)
105 OFILEY = $(OFILEL:.yy=.o)
106 OFILES = $(addprefix $(outdir)/,$(OFILEY))
112 $(flowerout)/dummy.dep\
114 $(lilyout)/dummy.dep\
115 $(mi2muout)/dummy.dep\
121 ERROR_LOG = 2> /dev/null
122 SILENT_LOG = 2>&1 > /dev/null
123 date = $(shell date +%x)
127 lily-version = $(lilyout)/version.hh
128 flower-version = $(flowerout)/version.hh
129 mi2mu-version = $(mi2muout)/version.hh
134 LIBFLOWER = $(flowerout)/$(LIB_PREFIX)flower$(LIB_SUFFIX)
135 LIBLILY = $(libout)/$(LIB_PREFIX)lily$(LIB_SUFFIX)
138 # compile and link options:
141 CFLAGS = $(ICFLAGS) $(DEFINES) $(INCLUDES) $(USER_CFLAGS) $(EXTRA_CFLAGS)
143 # added two warnings that are treated by cygwin32's gcc 2.7.2 as errors.
144 # huh, but still, no warnings even provoced with linux's gcc 2.7.2.1?
146 # -pipe makes it go faster, but is not supported on all platforms.
147 # EXTRA_CXXFLAGS= -fno-rtti -fno-exceptions -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wconversion
148 EXTRA_CXXFLAGS= -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wconversion
150 CXXFLAGS = $(CFLAGS) $(USER_CXXFLAGS) $(EXTRA_CXXFLAGS) $(MODULE_CXXFLAGS)
151 INCLUDES = -I$(depth) -Iinclude -I$(outdir) -I$(include-lib) -I$(libout) -I$(include-flower) -I$(flowerout)
152 CXX_OUTPUT_OPTION = $< -o $@
153 LDFLAGS = $(ILDFLAGS) $(USER_LDFLAGS) $(EXTRA_LDFLAGS) $(MODULE_LDFLAGS) -L$(depth)/lib/$(OUTDIR_NAME) -L$(depth)/flower/$(OUTDIR_NAME)
154 LOADLIBES = $(EXTRA_LIBES) $(MODULE_LIBES) -lstdc++ # need lg++ for win32, really!
165 AR_COMMAND = $(AR) $(ARFLAGS) $@
167 RANLIB_COMMAND=$(RANLIB) $@
171 DO_CXX_COMPILE=$(DODEP)\
172 $(CXX) -c $(CXXFLAGS) $(CXX_OUTPUT_OPTION)
177 LD_COMMAND = $(LD) $(LDFLAGS) -o $@
182 depfile = $(depdir)/$(subst .o,.dep,$(notdir $@))#
183 DODEP=rm -f $(depfile); DEPENDENCIES_OUTPUT="$(depfile) $(outdir)/$(notdir $@)"
192 # generic target names:
195 EXECUTABLE = $(outdir)/$(NAME)$(EXE)
200 EXECUTABLES = $(EXECUTABLE)
207 LIBRARY = $(outdir)/$(LIB_PREFIX)$(NAME).a
208 SHAREDLIBRARY=$(outdir)/$(LIB_PREFIX)$(NAME).so
211 #replace to do stripping of certain objects
214 DISTFILES=$(EXTRA_DISTFILES) Makefile $(ALL_SOURCES)
215 DOCDIR=$(depth)/$(outdir)
217 pod2groff=$(POD2MAN) --center="LilyPond documentation" --section="0"\
218 --release="LilyPond $(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)" $< > $@
221 STRIP=strip --strip-debug
223 STABLEOBS=$(addprefix $(outdir)/,$(stablecc:.cc=.o))
226 # substitute $(STRIP) in Site.make if you want stripping