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
7 # Copyright (c) 1997 by
8 # Jan Nieuwenhuizen <jan@digicash.com>
9 # Han-Wen Nienhuys <hanwen@stack.nl>
11 # toplevel version info, might be handy?
13 include ./$(depth)/.version
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)
23 flowerout = ./$(depth)/flower/lib/$(outdir)
24 libout = ./$(depth)/lib/$(outdir)
26 lilyout = ./$(depth)/lily/$(outdir)
27 mi2muout = ./$(depth)/mi2mu/$(outdir)
28 makeout = ./$(depth)/make/$(outdir)
29 flower-dir = ./$(depth)/flower/lib
30 lib-dir = ./$(depth)/lib
31 lily-dir = ./$(depth)/lily
32 mi2mu-dir = ./$(depth)/mi2mu
33 make-dir = ./$(depth)/make
34 include-lib = ./$(depth)/lib/include
35 include-flower = ./$(depth)/flower/lib/include
40 include ./$(depth)/make/User.make
44 DEFINES+=$(OPTIFLAG) $(PROFILEFLAG)
56 # need to be defined in local Makefiles:
57 # build = ./$(depth)/lily/.build
58 BUILD = $(shell cat $(build))
59 INCREASE_BUILD = @echo `expr \`cat $(build)\` + 1` > .b; mv .b $(build)
64 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)$(MY_PATCH_LEVEL)
65 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)$(TOPLEVEL_MY_PATCH_LEVEL)
70 CXXVER=`$(CXX) --version`
73 # module and top level dist:
75 # fix naming, use TOPLEVEL_ prefix _or_ MODULE?
76 MODULE_DIST_NAME = $(MODULE_NAME)-$(VERSION)
77 DIST_NAME = lilypond-$(TOPLEVEL_VERSION)
80 # list of object files:
82 SOURCE_FILES = $(CCFILES) $(EXTRA_SOURCE_FILES)
83 OFILEC = $(SOURCE_FILES:.c=.o)
84 OFILECC = $(OFILEC:.cc=.o)
85 OFILEL = $(OFILECC:.l=.o)
86 OFILEY = $(OFILEL:.y=.o)
87 OFILES = $(patsubst %,$(outdir)/%,$(OFILEY))
93 $(flowerout)/dummy.dep\
96 $(mi2muout)/dummy.dep\
102 ERROR_LOG = 2> /dev/null
103 allexe = $(bindir)/lilypond $(bindir)/mi2mu
104 allcc = $(shell find -name "*.cc" $(ERROR_LOG))
105 allobs = $(shell find $(outdir) -name "*.o" $(ERROR_LOG))
106 allibs = $(shell find $(libdir) -name "*.lib" $(ERROR_LOG))
107 alldeps = $(shell find $(outdir) -name "*.dep" $(ERROR_LOG))
108 allout = $(shell find . -name "$(outdir)" $(ERROR_LOG))
109 allgen = $(shell find . -name $(genout) -o -name .build $(ERROR_LOG))
114 # cannot let targets depend upon (out)directory -> will always be out of date!
116 flower-config = $(flowerout)/flower-config.hh
117 lily-config = $(libout)/config.hh
122 flower-version = $(flowerout)/fversion.hh
123 lily-version = $(lilyout)/version.hh
124 mi2mu-version = $(mi2muout)/version.hh
129 LIBFLOWER = $(depth)/flower/lib/$(outdir)/$(LIB_PREFIX)flower$(LIB_SUFFIX)
130 LIBLILY = $(depth)/lib/$(outdir)/$(LIB_PREFIX)lily$(LIB_SUFFIX)
133 # compile and link options:
136 CFLAGS = $(DEFINES) $(INCLUDES) $(USER_CFLAGS) $(EXTRA_CFLAGS)
137 CXXFLAGS = $(CFLAGS) $(USER_CXXFLAGS) $(EXTRA_CXXFLAGS)
138 INCLUDES = -Iinclude -I$(outdir) -I$(include-lib) -I$(libout) -I$(include-flower) -I$(flowerout)
139 CXX_OUTPUT_OPTION = $< -o $@
140 LDFLAGS = $(EXTRA_LDFLAGS)
141 LOADLIBES = $(EXTRA_LIBES) $(CUSTOMLIBES) -lg++
147 AR_COMMAND = $(AR) $(ARFLAGS) $@
159 LD_COMMAND = $(LD) $(LDFLAGS) -o $@
164 depfile = ./$(depdir)/$(subst .o,.dep,$(notdir $@))
165 DODEP=rm -f $(depfile); DEPENDENCIES_OUTPUT="$(depfile) $(outdir)/$(notdir $@)"
174 # generic target names:
176 EXECUTABLE = $(NAME)$(EXE)
179 LIBRARY = $(LIB_PREFIX)$(NAME)$(LIB_SUFFIX)
182 STRIPDEBUG=true #replace to do stripping of certain objects