1 # title generic variables
2 # file make/Variables.make
4 # do not change this file for site-wide extensions; please use
5 # make/$(outdir)/Site.make;
7 # Any change in files in this directory (make/) would be distributed, if
12 # depth from group-dir
13 # not eh, normally used
14 DEPTH = $(depth)/$(package-depth)
16 topdir := $(shell cd $(depth); pwd)
22 distdir = $(depth)/$(outdir)/$(DIST_NAME)
23 DIST_NAME = $(package)-$(TOPLEVEL_VERSION)
25 distname = $(package)-$(TOPLEVEL_VERSION)
31 makeout = $(depth)/make/$(outdir)
32 docout = $(depth)/Documentation/$(outdir)
33 binout = $(depth)/bin/$(outdir)
35 doc-dir = $(depth)/Documentation
36 make-dir = $(depth)/make
39 # -c is for copying (now set in config.make)
40 # INSTALL = $(stepdir)/../bin/install-sh -c
44 include $(make-dir)/Variables.make
45 include $(make-dir)/User.make
49 # sort-out which of these are still needed
51 $(package)_bindir = $(depth)/bin
52 step-bindir = $(depth)/$(stepmake)/bin
53 abs-step-bindir = $(topdir)/$(stepmake)/bin
55 group-dir = $(shell cd $(DEPTH)/..; pwd)
56 release-dir = $(group-dir)/releases
57 patch-dir = $(group-dir)/patches
59 # i have in $HOME/.rpmrc
60 # topdir: /home/fred/usr/src/Redhat
62 rpm-sources = $(release-dir)
63 rpm-build = $(group-dir)/RedHat/BUILD
67 configheader=$(outdir)/config.hh
69 # need to be defined in local Makefiles:
74 ifneq ($(MY_PATCH_LEVEL),$(FOOBAR))
75 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL).$(MY_PATCH_LEVEL)
77 VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)
80 ifneq ($(TOPLEVEL_MY_PATCH_LEVEL),$(FOOBAR))
81 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL).$(TOPLEVEL_MY_PATCH_LEVEL)
83 TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)
85 state-vector = $(make-dir)/STATE-VECTOR
90 ERROR_LOG = 2> /dev/null
91 SILENT_LOG = 2>&1 > /dev/null
92 date := $(shell date +%x) #duplicated?
94 # compile and link options:
98 INCLUDES = include $(outdir) $($(PACKAGE)_INCLUDES)
99 LDFLAGS = $(ILDFLAGS) $(USER_LDFLAGS) $(EXTRA_LDFLAGS) $(MODULE_LDFLAGS) $($(PACKAGE)_LDFLAGS)
101 MODULE_LIBES=$(addsuffix /$(outdir)/library.a, $(MODULE_LIBS))
102 LOADLIBES = $(MODULE_LIBES) $($(PACKAGE)_LIBES) $(EXTRA_LIBES)
104 # LOADLIBES = $(MODULE_LIBES) $($(PACKAGE)_LIBES) $(EXTRA_LIBES) -lstdc++
113 LD_COMMAND = $(LD) $(LDFLAGS) -o $@
118 depfile = $(outdir)/$(subst .o,.dep,$(notdir $@))#
119 DODEP=rm -f $(depfile); DEPENDENCIES_OUTPUT="$(depfile) $(outdir)/$(notdir $@)"
123 # generic target names:
126 EXECUTABLE = $(outdir)/$(NAME)$(EXE)
131 EXECUTABLES = $(notdir $(EXECUTABLE))
136 #replace to do stripping of certain objects
139 DIST_FILES=$(EXTRA_DIST_FILES) Makefile $(ALL_SOURCES)
140 DOCDIR=$(depth)/$(outdir)
143 STRIP=strip --strip-debug
145 STABLEOBS=$(addprefix $(outdir)/,$(stablecc:.cc=.o))
148 # substitute $(STRIP) in Site.make if you want stripping
152 LOOP=$(foreach i, $(SUBDIRS), $(MAKE) -C $(i) $@ &&) true