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)
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
33 include ./$(depth)/make/User.make
37 DEFINES+=$(OPTIFLAG) $(PROFILEFLAG)
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)
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)
63 CXXVER=`$(CXX) --version`
66 # module and top level dist:
68 # fix naming, use TOPLEVEL_ prefix _or_ MODULE?
69 MODULE_DIST_NAME = $(MODULE_NAME)-$(VERSION)
70 DIST_NAME = lilypond-$(TOPLEVEL_VERSION)
73 # list of object files:
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))
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)" )
94 flower-version = $(flowerout)/fversion.hh
95 lily-version = $(libout)/version.hh
100 LIBFLOWER = $(depth)/flower/lib/$(outdir)/$(LIB_PREFIX)flower$(LIB_SUFFIX)
101 LIBLILY = $(depth)/lib/$(outdir)/$(LIB_PREFIX)lily$(LIB_SUFFIX)
104 # compile and link options:
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++
118 AR_COMMAND = $(AR) $(ARFLAGS) $@
130 LD_COMMAND = $(LD) $(LDFLAGS) -o $@
135 depfile = ./$(depdir)/$(subst .o,.dep,$(notdir $@))
136 DODEP=rm -f $(depfile); DEPENDENCIES_OUTPUT="$(depfile) $(outdir)/$(notdir $@)"
145 # generic target names:
147 EXECUTABLE = $(NAME)$(EXE)
150 LIBRARY = $(LIB_PREFIX)$(NAME)$(LIB_SUFFIX)
153 STRIPDEBUG=true #replace to do stripping of certain objects