4 # internal, not normally used
5 DEPTH = $(depth)/$(package-depth)
8 topdir := $(shell cd $(depth); pwd)
12 # $(depth) is deprecated, for most cases you'll want $(src-depth)
14 # Well, on second thought.
15 # It can do no harm, but using src-depth iso depth is only necessary
16 # for broken rules that do
17 # cd $(outdir) && foo $(depth) ...
18 src-depth = $(depth)/$(srcdir)
22 distdir = $(topdir)/$(outdir)/$(DIST_NAME)
23 DIST_NAME = $(package)-$(TOPLEVEL_VERSION)
25 distname = $(package)-$(TOPLEVEL_VERSION)
28 #makeout = $(depth)/make/$(outdir)
29 #docout = $(depth)/Documentation/$(outdir)
30 #binout = $(depth)/bin/$(outdir)
32 doc-dir = $(src-depth)/Documentation
33 po-dir = $(src-depth)/po
35 # sort-out which of these are still needed
37 $(package)_bindir = $(depth)/bin
38 step-bindir = $(stepmake)/bin
40 group-dir = $(shell cd $(DEPTH)/..; pwd)
41 release-dir = $(group-dir)/releases
42 patch-dir = $(group-dir)/patches
44 # i have in $HOME/.rpmrc
45 # topdir: /home/fred/usr/src/Redhat
47 rpm-sources = $(release-dir)
48 rpm-build = $(group-dir)/RedHat/BUILD
51 # package-icon=$(outdir)/$(package)-icon.gif
52 package-icon=$(outdir)/$(package)-icon.xpm
55 # need to be defined in local Makefiles:
60 ifneq ($(MY_PATCH_LEVEL),$(FOOBAR))
61 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL).$(MY_PATCH_LEVEL)
63 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)
66 ifneq ($(TOPLEVEL_MY_PATCH_LEVEL),$(FOOBAR))
67 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL).$(TOPLEVEL_MY_PATCH_LEVEL)
69 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)
76 ERROR_LOG = 2> /dev/null
77 SILENT_LOG = 2>&1 > /dev/null
78 date := $(shell date +%x) #duplicated?
80 # compile and link options:
84 #INCLUDES = $(depth)/$(builddir) include $(outdir) $($(PACKAGE)_INCLUDES) $(MODULE_INCLUDES)
85 INCLUDES = include $(outdir) $($(PACKAGE)_INCLUDES) $(MODULE_INCLUDES)
88 # LOADLIBES = $(MODULE_LIBES) $($(PACKAGE)_LIBES) $(EXTRA_LIBES) -lstdc++
97 LD_COMMAND = $(LD) $(LDFLAGS) -o $@
102 depfile = $(outdir)/$(subst .o,.dep,$(notdir $@))#
103 DODEP=rm -f $(depfile); DEPENDENCIES_OUTPUT="$(depfile) $(outdir)/$(notdir $@)"
108 #replace to do stripping of certain objects
111 DIST_FILES=$(EXTRA_DIST_FILES) GNUmakefile $(ALL_SOURCES)
112 DOCDIR=$(depth)/$(outdir)
115 STRIP=strip --strip-debug
117 STABLEOBS=$(addprefix $(outdir)/,$(stablecc:.cc=.o))
120 # substitute $(STRIP) in Site.make if you want stripping
122 LOOP=$(foreach i, $(SUBDIRS), $(MAKE) PACKAGE=$(PACKAGE) package=$(package) -C $(i) $@ &&) true
124 # different redhat releases need different flags for etags. Just use defaults.
128 makeflags=$(patsubst %==, %, $(patsubst ---%,,$(patsubst ----%,,$(MAKEFLAGS:%=--%))))
130 DEP_FILES := $(wildcard $(outdir)/*.dep)
132 IN_FILES := $(wildcard *.in)
133 SOURCE_FILES += $(IN_FILES)
135 # Preprocessed .in documentation _FILES:
136 OUTIN_FILES = $(addprefix $(outdir)/, $(IN_FILES:%.in=%))
138 ALL_SOURCES = $(SOURCE_FILES)