]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/stepmake/Variables.make
release: 1.0.2
[lilypond.git] / stepmake / stepmake / Variables.make
1 # title    generic variables
2 # file     make/Variables.make
3 #
4 # do not change this file for site-wide extensions; please use 
5 # make/$(outdir)/Site.make; 
6 #
7 # Any change in files in this directory (make/) would be distributed, if 
8 # you do make dist 
9
10 # directory names:
11
12 # depth from group-dir
13 # not eh, normally used
14 DEPTH = $(depth)/$(package-depth)
15
16 topdir := $(shell cd $(depth); pwd)
17 pwd := $(shell pwd)
18
19
20 ifdef CONFIGSUFFIX
21 outdir=out-$(CONFIGSUFFIX)
22 else
23 outdir=out
24 endif
25
26 # derived names
27 ifeq ($(distdir),)
28   distdir = $(depth)/$(outdir)/$(DIST_NAME)
29   DIST_NAME = $(package)-$(TOPLEVEL_VERSION)
30 endif
31 distname = $(package)-$(TOPLEVEL_VERSION)
32
33 depdir = $(outdir)
34
35
36
37 # obsolete?
38 makeout = $(depth)/make/$(outdir)
39 docout = $(depth)/Documentation/$(outdir)
40 binout = $(depth)/bin/$(outdir)
41
42 doc-dir = $(depth)/Documentation
43 make-dir = $(depth)/make
44 po-dir = $(depth)/po
45
46 # -c is for copying (now set in config.make)
47 # INSTALL = $(stepdir)/../bin/install-sh -c
48
49 # user settings:
50 #
51 include $(make-dir)/Variables.make
52 include $(make-dir)/User.make
53 #
54
55 # urg
56 # sort-out which of these are still needed
57 #
58 $(package)_bindir = $(depth)/bin
59 step-bindir = $(depth)/$(stepmake)/bin
60 abs-step-bindir = $(topdir)/$(stepmake)/bin
61 #
62 group-dir = $(shell cd $(DEPTH)/..; pwd)
63 release-dir = $(group-dir)/releases
64 patch-dir = $(group-dir)/patches
65 #
66 # i have in $HOME/.rpmrc
67 #     topdir: /home/fred/usr/src/Redhat
68 #
69 rpm-sources = $(release-dir)
70 rpm-build = $(group-dir)/RedHat/BUILD
71 #
72
73 # hmm
74 configheader=$(outdir)/config.hh
75
76 # need to be defined in local Makefiles:
77 #
78 FOOBAR = 
79 # the version:
80 #
81 ifneq ($(MY_PATCH_LEVEL),$(FOOBAR))
82 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL).$(MY_PATCH_LEVEL)
83 else
84 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)
85 endif
86
87 ifneq ($(TOPLEVEL_MY_PATCH_LEVEL),$(FOOBAR))
88 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL).$(TOPLEVEL_MY_PATCH_LEVEL)
89 else
90 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)
91 endif
92 state-vector = $(make-dir)/STATE-VECTOR
93 #
94
95 # clean file lists:
96 #
97 ERROR_LOG = 2> /dev/null
98 SILENT_LOG = 2>&1 >  /dev/null
99 date := $(shell date +%x)       #duplicated?
100
101 # compile and link options:
102 #
103 ARFLAGS = ru
104
105 INCLUDES =  -Iinclude -I$(outdir) $($(PACKAGE)_INCLUDES)
106 LDFLAGS = $(ILDFLAGS) $(USER_LDFLAGS) $(EXTRA_LDFLAGS) $(MODULE_LDFLAGS) $($(PACKAGE)_LDFLAGS)
107
108 MODULE_LIBES=$(addsuffix /$(outdir)/library.a, $(MODULE_LIBS))
109 LOADLIBES = $(MODULE_LIBES) $($(PACKAGE)_LIBES) $(EXTRA_LIBES)
110 # urg: for windows ?
111 # LOADLIBES = $(MODULE_LIBES) $($(PACKAGE)_LIBES) $(EXTRA_LIBES) -lstdc++
112 #
113
114 # macro compiler:
115 #
116 M4 = m4
117
118
119 #
120 LD_COMMAND = $(LD) $(LDFLAGS) -o $@
121 #
122
123 # dependencies:
124 #
125 depfile = $(depdir)/$(subst .o,.dep,$(notdir $@))#
126 DODEP=rm -f $(depfile); DEPENDENCIES_OUTPUT="$(depfile) $(outdir)/$(notdir $@)"
127 #
128
129
130 # generic target names:
131 #
132 ifdef NAME
133 EXECUTABLE = $(outdir)/$(NAME)$(EXE)
134 else
135 EXECUTABLE =
136 endif
137
138 EXECUTABLES = $(notdir $(EXECUTABLE))
139
140
141 #
142
143 #replace to do stripping of certain objects
144 STRIPDEBUG=true 
145
146 DIST_FILES=$(EXTRA_DIST_FILES) Makefile $(ALL_SOURCES)
147 DOCDIR=$(depth)/$(outdir)
148
149
150 STRIP=strip --strip-debug
151 ifdef stablecc
152  STABLEOBS=$(addprefix $(outdir)/,$(stablecc:.cc=.o))
153 endif
154
155 # substitute $(STRIP) in Site.make if you want stripping
156 DO_STRIP=true
157
158
159 LOOP=$(foreach i,  $(SUBDIRS),  $(MAKE) -C $(i) $@ &&) true
160