Menu

[r1477]: / advanced / Makefile.config.in  Maximize  Restore  History

Download this file

313 lines (259 with data), 11.2 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
# Makefile.config is generated by 'configure' using Makefile.config.in
# as a template and information that 'configure' gathers from the build
# system and from user options.
# Makefile.config should someday replace most of the other files that
# 'configure' generates, thus simplifying development and customization.
# Makefile.config is intended to contain information specific to the
# particular build environment or user build choices.
# Furthermore, most of the logic in 'configure', and thus 'configure.in',
# should go into the make files to simplify the build. Makefile.config
# should just pass raw configure variables through to the make file.
# Tokens of the form @TOKEN@ in the template file get replaced by
# 'configure' with the values of variables of the same name within
# 'configure', because of a AC_SUBST(TOKEN) statement in the
# 'configure.in' from which 'configure' was built.
# Here are the options the user chose on 'configure':
ENABLE_ABYSS_SERVER = @ENABLE_ABYSS_SERVER@
ENABLE_ABYSS_THREADS = @ENABLE_ABYSS_THREADS@
ENABLE_CPLUSPLUS = @ENABLE_CPLUSPLUS@
ENABLE_CGI_SERVER = @ENABLE_CGI_SERVER@
ENABLE_LIBXML2_BACKEND = @ENABLE_LIBXML2_BACKEND@
MUST_BUILD_WININET_CLIENT = @MUST_BUILD_WININET_CLIENT@
MUST_BUILD_CURL_CLIENT = @MUST_BUILD_CURL_CLIENT@
MUST_BUILD_LIBWWW_CLIENT = @MUST_BUILD_LIBWWW_CLIENT@
LSOCKET = @LSOCKET@
WININET_LDADD = @WININET_LDADD@
WININET_RPATH = @WININET_RPATH@
WININET_WL_RPATH = @WININET_WL_RPATH@
CURL_LDADD = @CURL_LDADD@
CURL_RPATH = @CURL_RPATH@
CURL_WL_RPATH = @CURL_WL_RPATH@
LIBWWW_LDADD = @LIBWWW_LDADD@
LIBWWW_RPATH = @LIBWWW_RPATH@
LIBWWW_WL_RPATH = @LIBWWW_WL_RPATH@
FEATURE_LIST = @FEATURE_LIST@
ABS_SRCDIR = @abs_srcdir@
PREFIX = @prefix@
HAVE_WCHAR_H_DEFINE = @HAVE_WCHAR_H_DEFINE@
# Stuff 'configure' figured out about our build platform:
SHELL = @SHELL@
CC = @CC@
CXX = @CXX@
CCLD = $(CC)
CXXLD = $(CXX)
AR = ar
RANLIB = ranlib
LN_S = ln -s
INSTALL = $(SRCDIR)/install-sh
C_COMPILER_GNU = @C_COMPILER_GNU@
CXX_COMPILER_GNU = @CXX_COMPILER_GNU@
# Stuff 'configure' figured out via AC_CANONICAL_HOST macro in configure.in
# and config.guess program and 'configure' command options:
# HOST_OS names the operating system on which Xmlrpc-c is to run.
# E.g. "linux-gnu".
HOST_OS = @host_os@
###############################################################################
MUST_BUILD_CLIENT = no
ifeq ($(MUST_BUILD_WININET_CLIENT),yes)
MUST_BUILD_CLIENT = yes
endif
ifeq ($(MUST_BUILD_CURL_CLIENT),yes)
MUST_BUILD_CLIENT = yes
endif
ifeq ($(MUST_BUILD_LIBWWW_CLIENT),yes)
MUST_BUILD_CLIENT = yes
endif
##############################################################################
# SHARED LIBRARY STUFF
##############################################################################
# Shared libraries are very difficult, because how you build and use
# them varies greatly from one platform to the next.
# First, we break down shared library schemes into a few major types,
# and indicate the type by SHARED_LIB_TYPE.
# We also have a bunch of other make variables that reflect the different
# ways we have to build on and for different platforms:
# CFLAGS_SHLIB is a set of flags needed to compile a module which will
# become part of a shared library.
# On older systems, you have to make shared libraries out of position
# independent code, so you need -fpic or -fPIC here. (The rule is: if
# -fpic works, use it. If it bombs, go to -fPIC). On newer systems,
# it isn't necessary, but can save real memory at the expense of
# execution speed. Without position independent code, the library
# loader may have to patch addresses into the executable text. On an
# older system, this would cause a program crash because the loader
# would be writing into read-only shared memory. But on newer
# systems, the system silently creates a private mapping of the page
# or segment being modified (the "copy on write" phenomenon). So it
# needs its own private real page frame.
# We have seen -fPIC required on IA64 and AMD64 machines (GNU
# compiler/linker). Build-time linking fails without it. I don't
# know why -- history seems to be repeating itself. 2005.02.23.
# SHLIB_CLIB is the link option to include the C library in a shared library,
# normally "-lc". On typical systems, this serves no purpose. On some,
# though, it causes information about which C library to use to be recorded
# in the shared library and thus choose the correct library among several or
# avoid using an incompatible one. But on some systems, the link fails.
# On 2002.09.30, "John H. DuBois III" <spcecdt@armory.com> reports that on
# SCO OpenServer, he gets the following error message with -lc:
#
# -lc; relocations referenced ; from file(s) /usr/ccs/lib/libc.so(random.o);
# fatal error: relocations remain against allocatable but non-writable
# section: ; .text
#
# On Bryan's system, with gcc 2.95.3 and glibc 2.2.2, -lc causes
# throws (from anywhere in a program that links the shared library)
# not to work. I have no idea how.
# LDFLAGS_SHLIB is the linker (Ld) flags needed to generate a shared
# library from object files. It may use $(SONAME) as the soname for
# the shared library being created (assuming sonames exist).
#
# This make file defines these functions that the including make file
# can use:
#
# $(call shlibfn, LIBNAMELIST): file names of shared libraries
# whose base names are LIBNAMELIST. E.g. if LIBNAMELIST is
# "libfoo libbar", function returns "libfoo.so.3.1 libbar.so.3.1"
#
# $(call shliblefn, LIBNAMELIST): same as shlibfn, but for the file you
# use at link-edit time. E.g. libfoo.so .
# NEED_RPATH says on this platform, when you link-edit an executable you
# need to have -R linker options to tell where to look, at run time,
# for the shared libraries that the program uses. The linker puts that
# information into the executable.
# NEED_WL_RPATH is like NEED_RPATH, but it's a compiler option for when
# you have the compiler call the linker. So E.g. "-Wl,-rpath,/my/runtime",
# which tells the compiler to pass the option "-rpath /my/runtime" to
# the linker.
# Defaults:
NEED_WL_RPATH=no
NEED_RPATH=no
# We build shared libraries only for platforms for which we've figured
# out how. For the rest, we have this default:
SHARED_LIB_TYPE = NONE
shlibfn = $(1:%=%.shlibdummy)
shliblefn = $(1:%=%.shlibledummy)
ifeq ($(HOST_OS),linux-gnu)
# Assume linker is GNU Compiler (gcc)
SHARED_LIB_TYPE = unix
SHLIB_SUFFIX = so
shlibfn = $(1:%=%.$(SHLIB_SUFFIX).$(MAJ).$(MIN))
shliblefn = $(1:%=%.$(SHLIB_SUFFIX))
# SHLIB_CLIB = -lc
LDFLAGS_SHLIB = -shared -Wl,-soname,$(SONAME) $(SHLIB_CLIB)
CFLAGS_SHLIB=-fPIC
endif
ifeq ($(findstring solaris,$(HOST_OS)),solaris)
SHARED_LIB_TYPE = unix
SHLIB_SUFFIX = so
shlibfn = $(1:%=%.$(SHLIB_SUFFIX).$(MAJ).$(MIN))
shliblefn = $(1:%=%.$(SHLIB_SUFFIX))
# Solaris compiler (Sun C 5.5) can't take multiple ld options as
# -Wl,-a,-b . Ld sees -a,-b in that case.
LDFLAGS_SHLIB = -Wl,-Bdynamic -Wl,-G -Wl,-h -Wl,$(SONAME)
CFLAGS_SHLIB = -Kpic
endif
ifeq ($(HOST_OS),aix)
SHARED_LIB_TYPE = unix
SHLIB_SUFFIX = a
shlibfn = $(1:%=%.$(SHLIB_SUFFIX).$(MAJ).$(MIN))
shliblefn = $(1:%=%.$(SHLIB_SUFFIX))
LDFLAGS_SHLIB = -qmkshrobj
endif
ifeq ($(HOST_OS),hpux)
SHARED_LIB_TYPE = unix
SHLIB_SUFFIX = sl
shlibfn = $(1:%=%.$(SHLIB_SUFFIX).$(MAJ).$(MIN))
shliblefn = $(1:%=%.$(SHLIB_SUFFIX))
LDFLAGS_SHLIB: -shared -fPIC
endif
ifeq ($(HOST_OS),osf)
SHARED_LIB_TYPE = unix
SHLIB_SUFFIX = so
shlibfn = $(1:%=%.$(SHLIB_SUFFIX).$(MAJ).$(MIN))
shliblefn = $(1:%=%.$(SHLIB_SUFFIX))
LDFLAGS_SHLIB = -shared -expect_unresolved
endif
ifeq ($(findstring netbsd,$(HOST_OS)),netbsd)
SHARED_LIB_TYPE = unix
SHLIB_SUFFIX = so
shlibfn = $(1:%=%.$(SHLIB_SUFFIX).$(MAJ).$(MIN))
shliblefn = $(1:%=%.$(SHLIB_SUFFIX))
CFLAGS_SHLIB = -fpic
LDFLAGS_SHLIB = -shared -Wl,-soname,$(SONAME) $(SHLIB_CLIB)
NEED_WL_RPATH=yes
endif
ifeq ($(HOST_OS),dragonfly)
SHARED_LIB_TYPE = unix
SHLIB_SUFFIX = so
shlibfn = $(1:%=%.$(SHLIB_SUFFIX).$(MAJ).$(MIN))
shliblefn = $(1:%=%.$(SHLIB_SUFFIX))
CFLAGS_SHLIB = -fpic
LDFLAGS_SHLIB = -shared -Wl,-soname,$(SONAME) $(SHLIB_CLIB)
endif
ifeq ($(HOST_OS),beos)
SHARED_LIB_TYPE = unix
SHLIB_SUFFIX = so
shlibfn = $(1:%=%.$(SHLIB_SUFFIX).$(MAJ).$(MIN))
shliblefn = $(1:%=%.$(SHLIB_SUFFIX))
LDFLAGS_SHLIB = -nostart
endif
ifeq ($(patsubst darwin%, darwin, $(HOST_OS)), darwin)
# (I once saw a system that generated 'darwin8.10.1').
SHARED_LIB_TYPE = dylib
SHLIB_SUFFIX = dylib
shlibfn = $(1:%=%.$(MAJ).$(MIN).$(SHLIB_SUFFIX))
shliblefn = $(1:%=%.$(SHLIB_SUFFIX))
LDFLAGS_SHLIB = -shared -Wl,-soname,$(SONAME) $(SHLIB_CLIB)
endif
ifeq ($(HOST_OS),irix)
SHARED_LIB_TYPE = irix
SHLIB_SUFFIX = so
shlibfn = $(1:%=%.$(SHLIB_SUFFIX).$(MAJ))
shliblefn = $(1:%=%.$(SHLIB_SUFFIX))
VERSIONPERLPROG = \
print "sgi$(MAJ)." . join(":sgi$(MAJ) . ", (0..$(MIN))) . "\n"
LDFLAGS_SHLIB = -shared -n32 -soname $(SONAME) \
-set_version $(shell perl -e '$(VERSIONPERLPROG)') -lc
endif
ifeq ($(HOST_OS),cygwin)
SHARED_LIB_TYPE = dll
SHLIB_SUFFIX = dll
shlibfn = $(1:lib%=$(SHLIB_PREFIX)%.$(SHLIB_SUFFIX).$(MAJ).$(MIN))
shliblefn = $(1:%=%.shlibledummy)
LDFLAGS_SHLIB = -shared -Wl,-soname,$(SONAME) $(SHLIB_CLIB)
endif
##############################################################################
# MISCELLANEOUS
##############################################################################
# BUILDTOOL_CC is the compiler to use to generate build tools, which we
# will then run to build product. The typical reason this would be
# different from CC is that you're cross-compiling: the product will run
# in Environment A, but you're building in Environment B, so you must
# build the build toos for Environment B.
# The cross compiling user can update Makefile.config or override
# BUILDTOOL_CC on a make command.
BUILDTOOL_CC = $(CC)
BUILDTOOL_CCLD = $(CCLD)
# Here are the commands 'make install' uses to install various kinds of files:
INSTALL_PROGRAM = $(INSTALL) -c -m 755
INSTALL_SHLIB = $(INSTALL) -c -m 755
INSTALL_DATA = $(INSTALL) -c -m 644
INSTALL_SCRIPT = $(INSTALL) -c -m 755
# Here are the locations at which 'make install' puts files:
# PREFIX is designed to be overridden at make time if the user decides
# he doesn't like the default specified at 'configure' time.
LIBINST_DIR = $(PREFIX)/lib
HEADERINST_DIR = $(PREFIX)/include
PROGRAMINST_DIR = $(PREFIX)/bin
# DESTDIR is designed to be overridden at make time in order to relocate
# the entire install into a subdirectory.
DESTDIR =
# VPATH probably doesn't belong in this file, but it's a convenient
# place to set it once. VPATH is a special Make variable that tells
# Make where to look for dependencies. E.g. if a make file says bar.c
# is a dependency of bar.o and VPATH is ".:/usr/src/mypkg", Make will
# look for bar.c first in the current directory (.) (as it would with
# no VPATH), then in /usr/src/mypkg. The purpose of this is to allow
# you to build in a fresh build directory, while your source stays in
# the read-only directory /usr/src/mypkg .
VPATH := .:$(SRCDIR)/$(SUBDIR)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.