2 # project LilyPond -- the musical typesetter
3 # title generic variables
4 # file make/Variables.make
5 # abstract do not change this file for site-wide extensions;
6 # please edit settings in User.make
8 # Copyright (c) 1997 by
9 # Jan Nieuwenhuizen <jan@digicash.com>
10 # Han-Wen Nienhuys <hanwen@stack.nl>
12 # toplevel version info, might be handy?
14 include ./$(depth)/.version
16 include ./$(depth)/make/out/Configure_variables.make
19 MAKE:=$(MAKE) --no-builtin-rules
25 outdir = out# "objects" won-t do, used for libs and deps as well
26 lily_bindir = ./$(depth)/bin
27 distdir = ./$(depth)/$(DIST_NAME)
28 module-distdir = ./$(depth)/$(MODULE_DIST_NAME)
30 flowerout = ./$(depth)/flower/$(outdir)
31 libout = ./$(depth)/lib/$(outdir)
33 lilyout = ./$(depth)/lily/$(outdir)
34 mi2muout = ./$(depth)/mi2mu/$(outdir)
35 makeout = ./$(depth)/make/$(outdir)
36 flower-dir = ./$(depth)/flower
37 lib-dir = ./$(depth)/lib
38 lily-dir = ./$(depth)/lily
39 mi2mu-dir = ./$(depth)/mi2mu
40 make-dir = ./$(depth)/make
41 include-lib = ./$(depth)/lib/include
42 include-flower = ./$(depth)/flower/include
47 include ./$(depth)/make/User.make
50 # need to be defined in local Makefiles:
51 # build = ./$(depth)/lily/$(outdir)/.build ######## UGR!
52 BUILD = $(shell cat $(build))
53 INCREASE_BUILD = echo `expr \`cat $(build)\` + 1` > .b; mv .b $(build)
58 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)$(MY_PATCH_LEVEL)
59 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)$(TOPLEVEL_MY_PATCH_LEVEL)
63 # module and top level dist:
65 # fix naming, use TOPLEVEL_ prefix _or_ MODULE?
66 MODULE_DIST_NAME = $(MODULE_NAME)-$(VERSION)
67 DIST_NAME = lilypond-$(TOPLEVEL_VERSION)
70 # list of object files:
72 SOURCE_FILES = $(CCFILES) $(EXTRA_SOURCE_FILES)
73 OFILEC = $(SOURCE_FILES:.c=.o)
74 OFILECC = $(OFILEC:.cc=.o)
75 OFILEL = $(OFILECC:.l=.o)
76 OFILEY = $(OFILEL:.y=.o)
77 OFILES = $(patsubst %,$(outdir)/%,$(OFILEY))
83 $(flowerout)/dummy.dep\
86 $(mi2muout)/dummy.dep\
92 ERROR_LOG = 2> /dev/null
93 SILENT_LOG = >& /dev/null
94 allexe = $(lily_bindir)/lilypond $(lily_bindir)/mi2mu
95 allcc := $(shell $(FIND) -name "*.cc" $(ERROR_LOG))
96 allobs := $(shell $(FIND) $(outdir) -name "*.o" $(ERROR_LOG))
97 allibs := $(shell $(FIND) $(libdir) -name "*.lib" $(ERROR_LOG))
98 alldeps := $(shell $(FIND) $(outdir) -name "*.dep" $(ERROR_LOG))
102 lily-version = $(lilyout)/version.hh
103 flower-version = $(flowerout)/version.hh
104 mi2mu-version = $(mi2muout)/version.hh
109 LIBFLOWER = $(depth)/flower/$(outdir)/$(LIB_PREFIX)flower$(LIB_SUFFIX)
110 LIBLILY = $(depth)/lib/$(outdir)/$(LIB_PREFIX)lily$(LIB_SUFFIX)
113 # compile and link options:
116 CFLAGS = $(DEFINES) $(INCLUDES) $(USER_CFLAGS) $(EXTRA_CFLAGS)
117 CXXFLAGS = $(CFLAGS) $(USER_CXXFLAGS) $(EXTRA_CXXFLAGS)
118 INCLUDES = -Iinclude -I$(outdir) -I$(include-lib) -I$(libout) -I$(include-flower) -I$(flowerout)
119 CXX_OUTPUT_OPTION = $< -o $@
120 LDFLAGS = $(EXTRA_LDFLAGS)
121 LOADLIBES = $(EXTRA_LIBES) $(CUSTOMLIBES) -lg++
127 AR_COMMAND = $(AR) $(ARFLAGS) $@
129 RANLIB_COMMAND=$(RANLIB) $@
133 DO_CXX_COMPILE=$(DODEP)\
134 $(CXX) -c $(CXXFLAGS) $(CXX_OUTPUT_OPTION)
142 LD_COMMAND = $(LD) $(LDFLAGS) -o $@
147 depfile = ./$(depdir)/$(subst .o,.dep,$(notdir $@))
148 DODEP=rm -f $(depfile); DEPENDENCIES_OUTPUT="$(depfile) $(outdir)/$(notdir $@)"
157 # generic target names:
159 EXECUTABLE = $(NAME)$(EXE)
162 LIBRARY = $(LIB_PREFIX)$(NAME)$(LIB_SUFFIX)
165 STRIPDEBUG=true #replace to do stripping of certain objects
167 DISTFILES=$(EXTRA_DISTFILES) Makefile $(ALL_SOURCES)