]> git.donarmstrong.com Git - lilypond.git/blob - stepmake/stepmake/generic-vars.make
223c59d0935f460e35ed7991c367485b8f8a9d48
[lilypond.git] / stepmake / stepmake / generic-vars.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 # derived names
21 ifeq ($(distdir),)
22   distdir = $(depth)/$(outdir)/$(DIST_NAME)
23   DIST_NAME = $(package)-$(TOPLEVEL_VERSION)
24 endif
25 distname = $(package)-$(TOPLEVEL_VERSION)
26
27
28
29
30 # obsolete?
31 makeout = $(depth)/make/$(outdir)
32 docout = $(depth)/Documentation/$(outdir)
33 binout = $(depth)/bin/$(outdir)
34
35 doc-dir = $(depth)/Documentation
36 po-dir = $(depth)/po
37
38 # sort-out which of these are still needed
39 #
40 $(package)_bindir = $(depth)/bin
41 step-bindir = $(depth)/$(stepmake)/bin
42 abs-step-bindir = $(topdir)/$(stepmake)/bin
43 #
44 group-dir = $(shell cd $(DEPTH)/..; pwd)
45 release-dir = $(group-dir)/releases
46 patch-dir = $(group-dir)/patches
47 #
48 # i have in $HOME/.rpmrc
49 #     topdir: /home/fred/usr/src/Redhat
50 #
51 rpm-sources = $(release-dir)
52 rpm-build = $(group-dir)/RedHat/BUILD
53 #
54
55
56 # need to be defined in local Makefiles:
57 #
58 FOOBAR = 
59 # the version:
60 #
61 ifneq ($(MY_PATCH_LEVEL),$(FOOBAR))
62 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL).$(MY_PATCH_LEVEL)
63 else
64 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)
65 endif
66
67 ifneq ($(TOPLEVEL_MY_PATCH_LEVEL),$(FOOBAR))
68 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL).$(TOPLEVEL_MY_PATCH_LEVEL)
69 else
70 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)
71 endif
72
73
74
75 # clean file lists:
76 #
77 ERROR_LOG = 2> /dev/null
78 SILENT_LOG = 2>&1 >  /dev/null
79 date := $(shell date +%x)       #duplicated?
80
81 # compile and link options:
82 #
83 ARFLAGS = ru
84
85 INCLUDES =  include $(outdir) $($(PACKAGE)_INCLUDES)
86 LDFLAGS = $(ILDFLAGS) $(USER_LDFLAGS) $(EXTRA_LDFLAGS) $(MODULE_LDFLAGS) $($(PACKAGE)_LDFLAGS)
87
88 MODULE_LIBES=$(addsuffix /$(outdir)/library.a, $(MODULE_LIBS))
89 LOADLIBES = $(MODULE_LIBES) $($(PACKAGE)_LIBES) $(EXTRA_LIBES)
90 # urg: for windows ?
91 # LOADLIBES = $(MODULE_LIBES) $($(PACKAGE)_LIBES) $(EXTRA_LIBES) -lstdc++
92 #
93
94 # macro compiler:
95 #
96 M4 = m4
97
98
99 #
100 LD_COMMAND = $(LD) $(LDFLAGS) -o $@
101 #
102
103 # dependencies:
104 #
105 depfile = $(outdir)/$(subst .o,.dep,$(notdir $@))#
106 DODEP=rm -f $(depfile); DEPENDENCIES_OUTPUT="$(depfile) $(outdir)/$(notdir $@)"
107 #
108
109
110 # generic target names:
111 #
112 ifdef NAME
113 EXECUTABLE = $(outdir)/$(NAME)$(EXE)
114 else
115 EXECUTABLE =
116 endif
117
118 EXECUTABLES = $(notdir $(EXECUTABLE))
119
120
121 #
122
123 #replace to do stripping of certain objects
124 STRIPDEBUG=true 
125
126 DIST_FILES=$(EXTRA_DIST_FILES) GNUmakefile $(ALL_SOURCES)
127 DOCDIR=$(depth)/$(outdir)
128
129
130 STRIP=strip --strip-debug
131 ifdef stablecc
132  STABLEOBS=$(addprefix $(outdir)/,$(stablecc:.cc=.o))
133 endif
134
135 # substitute $(STRIP) in Site.make if you want stripping
136 DO_STRIP=true
137 LOOP=$(foreach i,  $(SUBDIRS),  $(MAKE) -C $(i) $@ &&) true
138
139
140 include $(stepdir)/files.make