| 1 |
# -*- Makefile -*- |
| 2 |
|
| 3 |
#---------------------------------------------------------------------------- |
| 4 |
# |
| 5 |
#---------------------------------------------------------------------------- |
| 6 |
# |
| 7 |
# ACE supports the following flags. They can be enabled either on |
| 8 |
# the command line, e.g., "make purify=1", or added to your |
| 9 |
# platform_macros.GNU. To disable the option, set the flag to null, |
| 10 |
# e.g., "make debug=". Some flags support setting to 0 disable, |
| 11 |
# e.g., "make debug=0". debug=1 is enabled in the platform files |
| 12 |
# that are released with ACE. |
| 13 |
# |
| 14 |
# Please note that the effects of a flag may be platform specific. |
| 15 |
# Also, combinations of certain flags may or may not be allowed on |
| 16 |
# specific platforms, e.g., debug=1 opt=1 is supported by g++ but |
| 17 |
# not all other C++ compilers. |
| 18 |
# |
| 19 |
# Flag Description |
| 20 |
# ---- ----------- |
| 21 |
# ace_for_tao Build "ace_for_tao" subset. Primarily useful for |
| 22 |
# reducing the size of the ACE shared library when |
| 23 |
# using TAO. |
| 24 |
# debug Enable debugging; see DCFLAGS and DCCFLAGS. |
| 25 |
# dmalloc Indicate build with dmalloc; adds PLATFORM_DMALLOC_CPPFLAGS |
| 26 |
# to CPPFLAGS, PLATFORM_DMALLOC_LDFLAGS to LDFLAGS, and |
| 27 |
# PLATFORM_DMALLOC_LIBS to LIBS. For more information on |
| 28 |
# dmalloc, see http://dmalloc.com. |
| 29 |
# inline Enable ACE inlining. Some platforms enable inlining by |
| 30 |
# default, others do not. If platform_macros.GNU does not |
| 31 |
# set this, inline is enabled. |
| 32 |
# minimum_corba Enable minimumCORBA support. (Documented here, but |
| 33 |
# implemented in TAO/rules.TAO.GNU.) |
| 34 |
# mtrace Indicate build with mtrace; adds PLATFORM_MTRACE_CPPFLAGS |
| 35 |
# to CPPFLAGS. Mtrace is an extension in GNU libc. |
| 36 |
# optimize Enable optimization; see OCFLAGS and OCCFLAGS. |
| 37 |
# probe Enable ACE_Timeprobes. |
| 38 |
# profile Enable profiling; see PCFLAGS and PCCFLAGS. |
| 39 |
# purify Purify all executables. purify must be in user's PATH! |
| 40 |
# quantify Quantify all executables. quantify must be in user's PATH! |
| 41 |
# repo Use GNU template repository (g++ with repo patches and |
| 42 |
# egcs only). |
| 43 |
# shared_libs Build shared libraries. Ignored if static_libs_only is set. |
| 44 |
# static_libs Build static libraries. Ignored if shared_libs_only is set. |
| 45 |
# shared_libs_only Only build shared libraries. Ignored if no SHLIBs are |
| 46 |
# specified by the Makefile, as in performance-tests/Misc. |
| 47 |
# static_libs_only Only build static libraries. |
| 48 |
# static_link Link only static libs to executables, e.g., uses "-static" |
| 49 |
# flag with the GNU ld linker. |
| 50 |
# symlinks Make symbolic links (on appropriate platforms) in the lib |
| 51 |
# directory be either "absolute" or "relative". |
| 52 |
# templates Type of template instantiation to perform. Can be one of |
| 53 |
# automatic, used. Defaults to automatic. |
| 54 |
# threads Build with thread support. |
| 55 |
# trio Indicate build with trio; adds PLATFORM_TRIO_CPPFLAGS |
| 56 |
# to CPPFLAGS, PLATFORM_TRIO_LDFLAGS to LDFLAGS, and |
| 57 |
# PLATFORM_TRIO_LIBS to LIBS. For more information on |
| 58 |
# trio, see http://sourceforge.net/projects/ctrio/ |
| 59 |
# xt Build with Xt (X11 Toolkit) support. |
| 60 |
# fl Build with FlTk (Fast Light Toolkit) support. |
| 61 |
# fox Build with Fox Toolkit support. |
| 62 |
# tk Build with Tk (Tcl/Tk) support. |
| 63 |
# qt Build with Qt (Trolltech Qt) support. |
| 64 |
# ssl Build with OpenSSL support. |
| 65 |
# rapi Build with RAPI |
| 66 |
# stlport Build with STLPort support |
| 67 |
# rwho Build with rwho, this results in building apps/drwho |
| 68 |
# pipes Build with pipe support, resulting in adding -pipe to the |
| 69 |
# compiler options. |
| 70 |
# sctp Build support for TAO SCIOP and for ACE SCTP |
| 71 |
# wrapper-facades. The sctp macro should be set to a string |
| 72 |
# value representing a particular SCTP implementation. |
| 73 |
# Recognized values include: openss7 lksctp |
| 74 |
# |
| 75 |
# versioned_so Add versioning to libraries. Defaults to 1 (true). If 0, |
| 76 |
# no version number is appended to shared library names. |
| 77 |
# If versioned_so is 1 (enabled), the SOVERSION make |
| 78 |
# variable can also be set to specify the version info |
| 79 |
# to append to the name - it should have a leading '.' - |
| 80 |
# else it defaults to .ACE_MAJOR.ACE_MINOR.ACE_MICRO. If 2, |
| 81 |
# the version will be appended to the name but *before* the |
| 82 |
# $(SOEXT) - it should have a lead '-' - else it defaults to |
| 83 |
# -ACE_MAJOR.ACE_MINOR.ACE_MICRO. |
| 84 |
# If versioned_so is 3, then set the SONAME, but without a |
| 85 |
# version. |
| 86 |
# wfmo Build with wfmo support (Win32 only) |
| 87 |
# winregistry Build with windows registry support (Win32 only) |
| 88 |
# winnt Build WinNT-specific projects (Win32 only) |
| 89 |
# link_groups This indicates that statically linked executable library |
| 90 |
# names will be surrounded by -Wl,--start-group and |
| 91 |
# -Wl,--end-group for the GNU compiler only. |
| 92 |
# |
| 93 |
# Usually, users do not need to be concerned with make targets. |
| 94 |
# Just enter "make" on the command line to build. A few notable |
| 95 |
# targets are listed below. |
| 96 |
# |
| 97 |
# Target Description |
| 98 |
# ------ ----------- |
| 99 |
# show_statics Lists all static objects in object files built for |
| 100 |
# current directory. Only supported for g++. |
| 101 |
# show_uninit Lists all uninitialized in object files built for |
| 102 |
# current directory. Only supported for g++. |
| 103 |
# |
| 104 |
# The following describes the ACE wrapper macros: |
| 105 |
# |
| 106 |
# Variable Description |
| 107 |
# -------- ----------- |
| 108 |
# ARFLAGS Flags for the archive utility (ar) |
| 109 |
# CC C compiler command |
| 110 |
# CXX C++ compiler command |
| 111 |
# RC Resource compiler command |
| 112 |
# COMPILE.c Flags for compiling with C |
| 113 |
# COMPILE.cc Flags for compiling with C++ |
| 114 |
# COMPILE.rc Flags for compiling with the resource compiler |
| 115 |
# CPPFLAGS C pre-processor flags |
| 116 |
# CFLAGS C compilation flags |
| 117 |
# CCFLAGS C++ compilation flags |
| 118 |
# DCFLAGS C compilation flags for debugging |
| 119 |
# DCCFLAGS C++ compilation flags for debugging |
| 120 |
# DEFFLAGS C++ preprocessor flag for defining symbols |
| 121 |
# DLD Name of dynamic linker |
| 122 |
# LD Name of linker |
| 123 |
# IDL Name of the CORBA IDL compiler |
| 124 |
# INSBIN Binary (executable) installation directory |
| 125 |
# INSINC Include file installation directory |
| 126 |
# INSMAN Manpage installation directory |
| 127 |
# INSLIB Library installation directory |
| 128 |
# LDFLAGS ld linker flags |
| 129 |
# LINK.c Flags for linking with C |
| 130 |
# LINK.cc Flags for linking with C++ |
| 131 |
# MAKEFLAGS Flags that are passed into the compilation from the commandline |
| 132 |
# OCFLAGS Optimizing C compilation flags |
| 133 |
# OCCFLAGS Optimizing C++ compilation flags |
| 134 |
# PCFLAGS C compilation flags for profiling |
| 135 |
# PCCFLAGS C++ compilation flags for profiling |
| 136 |
# PLATFORM_XT_CPPFLAGS |
| 137 |
# Platform CPP options for X11 (some require -I...) |
| 138 |
# PLATFORM_XT_LDFLAGS |
| 139 |
# Platform LD options for X11 (some require -L...) |
| 140 |
# PLATFORM_XT_LIBS |
| 141 |
# Platform libraries require with X11 |
| 142 |
# PLATFORM_SSL_CPPFLAGS |
| 143 |
# Platform CPP options for OpenSSL (may need -I...) |
| 144 |
# PLATFORM_SSL_LDFLAGS |
| 145 |
# Platform LD options for OpenSSL (may need -L...) |
| 146 |
# PLATFORM_SSL_LIBS |
| 147 |
# Platform libraries required with OpenSSL |
| 148 |
# PLATFORM_RAPI_CPPFLAGS |
| 149 |
# Platform CPP options for RAPI |
| 150 |
# PLATFORM_RAPI_LDFLAGS |
| 151 |
# Platform LD options for RAPI |
| 152 |
# PLATFORM_RAPI_LIBS |
| 153 |
# Platform libraries required with RAPI |
| 154 |
# PLATFORM_SCTP_CPPFLAGS |
| 155 |
# Platform CPP options required for SCTP |
| 156 |
# PLATFORM_SCTP_LDFLAGS |
| 157 |
# Platform LD options required for SCTP |
| 158 |
# PLATFORM_SCTP_LIBS |
| 159 |
# Platform libraries required for SCTP |
| 160 |
# PRELINK Executable to precede linking, such as quantify |
| 161 |
# PREPROCESS.c Command to preprocess C |
| 162 |
# PREPROCESS.cc |
| 163 |
# Command to preprocess C++ |
| 164 |
# PURELINK If set, contains purify executable as well as all options |
| 165 |
# PURE_CACHE_BASE_DIR |
| 166 |
# The base directory in which Pure products will produce |
| 167 |
# instrumented libraries. If you don't want that to be below |
| 168 |
# /tmp, set this variable in your environment or on the make |
| 169 |
# command line. |
| 170 |
# PURE_CACHE_DIR |
| 171 |
# The full name of the directory in which Pure produces will |
| 172 |
# produce instrumented libraries. |
| 173 |
# PWD Command to get the current working directory |
| 174 |
# PTDIRS Pathnames of directories containing template code |
| 175 |
# RM Name of program to use to remove files |
| 176 |
# ACE_MKDIR Name of program to (recursively) create directories |
| 177 |
# SOFLAGS Flags used to build a shared library |
| 178 |
# SOLINK.cc Link line necessary to build a share library |
| 179 |
# VAR Variant identifier suffix |
| 180 |
# VDIR Directory for object code |
| 181 |
# VSHDIR Directory for shared object code |
| 182 |
# ACE_ROOT Pathname for the root of the build tree |
| 183 |
# |
| 184 |
#---------------------------------------------------------------------------- |
| 185 |
# Platform-dependent macro definitions |
| 186 |
# (link to the appropriate platform-specific config file). |
| 187 |
#---------------------------------------------------------------------------- |
| 188 |
|
| 189 |
#### Default to building shared libraries only. Set it here to give the |
| 190 |
#### platform a chance to override. |
| 191 |
ifndef shared_libs |
| 192 |
shared_libs = 1 |
| 193 |
endif # shared_libs |
| 194 |
ifndef static_libs |
| 195 |
static_libs = 0 |
| 196 |
endif # static_libs |
| 197 |
|
| 198 |
#### Set up the build ACE version in case the platform_macros.GNU wants it. |
| 199 |
ifeq (cmd,$(findstring cmd,$(SHELL))) |
| 200 |
ACE_MAJOR_VERSION := $(shell awk "/ACE_MAJOR_VERSION/ { print $$3}" ${ACE_ROOT}/ace/Version.h) |
| 201 |
ACE_MINOR_VERSION := $(shell awk "/ACE_MINOR_VERSION/ { print $$3}" ${ACE_ROOT}/ace/Version.h) |
| 202 |
ACE_MICRO_VERSION := $(shell awk "/ACE_MICRO_VERSION/ { print $$3}" ${ACE_ROOT}/ace/Version.h) |
| 203 |
ACE_BETA_VERSION := $(shell awk "/ACE_MICRO_VERSION/ { print $$3}" ${ACE_ROOT}/ace/Version.h) |
| 204 |
else |
| 205 |
ACE_MAJOR_VERSION := $(shell awk '/ACE_MAJOR_VERSION/ { print $$3}' ${ACE_ROOT}/ace/Version.h) |
| 206 |
ACE_MINOR_VERSION := $(shell awk '/ACE_MINOR_VERSION/ { print $$3}' ${ACE_ROOT}/ace/Version.h) |
| 207 |
ACE_MICRO_VERSION := $(shell awk '/ACE_MICRO_VERSION/ { print $$3}' ${ACE_ROOT}/ace/Version.h) |
| 208 |
ACE_BETA_VERSION := $(shell awk '/ACE_MICRO_VERSION/ { print $$3}' ${ACE_ROOT}/ace/Version.h) |
| 209 |
endif |
| 210 |
|
| 211 |
ACE_VERSION = $(ACE_MAJOR_VERSION).$(ACE_MINOR_VERSION).$(ACE_MICRO_VERSION) |
| 212 |
|
| 213 |
# Define some variables to silence warnings |
| 214 |
SHR_FILTER ?= |
| 215 |
|
| 216 |
# Include this before the below variables to make it possible for |
| 217 |
# platform_macros.GNU to set default values for them. |
| 218 |
ifneq ($(alternate_platform_macros),) |
| 219 |
include $(alternate_platform_macros) |
| 220 |
else |
| 221 |
include $(ACE_ROOT)/include/makeinclude/platform_macros.GNU |
| 222 |
endif # alternate_platform_macros |
| 223 |
|
| 224 |
# Define some variables to silence warnings |
| 225 |
GHS ?= |
| 226 |
|
| 227 |
# $(ACE_PLATFORM_CONFIG) is used in dependency rules and corresponds to the |
| 228 |
# platform dependent config-*.h file included in config.h, and can be set |
| 229 |
# in your platform_*.GNU file or platform_macros.GNU. |
| 230 |
ACE_PLATFORM_CONFIG ?= config.h |
| 231 |
|
| 232 |
ifeq ($(threads),0) |
| 233 |
ifneq ($(findstring -DACE_MT_SAFE=0,$(CPPFLAGS)),-DACE_MT_SAFE=0) |
| 234 |
CPPFLAGS += -DACE_MT_SAFE=0 |
| 235 |
endif # -DACE_MT_SAFE=0 |
| 236 |
endif # threads |
| 237 |
|
| 238 |
#### |
| 239 |
#### Defaults are fast off (0), threads on (1) |
| 240 |
#### and versioned_so on (1). |
| 241 |
#### |
| 242 |
fast ?= 0 |
| 243 |
versioned_so ?= 1 |
| 244 |
use_dep_libs ?= 1 |
| 245 |
threads ?= 1 |
| 246 |
symlinks ?= relative |
| 247 |
link_groups ?= 0 |
| 248 |
mcpp ?= 0 |
| 249 |
root_is_symlink ?= 0 |
| 250 |
|
| 251 |
SOVERSION ?= |
| 252 |
SONAME ?= |
| 253 |
|
| 254 |
ifeq ($(root_is_symlink),1) |
| 255 |
ifneq ($(symlinks),relative) |
| 256 |
warn_output:=$(warning WARNING: You should really use relative library symlinks with symlinked root) |
| 257 |
endif |
| 258 |
use_pwd_call = 1 |
| 259 |
### use 'real' pwd command from shell; internal make command resolves symlinks |
| 260 |
ifeq ($(PWD),) |
| 261 |
PWD=$(shell $(SHELL) -c pwd) |
| 262 |
endif |
| 263 |
else |
| 264 |
ifeq ($(PWD),) |
| 265 |
PWD=$(shell pwd) |
| 266 |
endif |
| 267 |
endif |
| 268 |
|
| 269 |
ifeq ($(ACE_MKDIR),) |
| 270 |
MKDIR = mkdir -p |
| 271 |
else |
| 272 |
MKDIR = $(ACE_MKDIR) |
| 273 |
endif |
| 274 |
|
| 275 |
#---------------------------------------------------------------------------- |
| 276 |
# Platform-independent macro definitions |
| 277 |
#---------------------------------------------------------------------------- |
| 278 |
|
| 279 |
INCLDIRS ?= |
| 280 |
DEFFLAGS ?= |
| 281 |
|
| 282 |
ifeq ($(debug),0) |
| 283 |
DEFFLAGS += -DNDEBUG |
| 284 |
endif |
| 285 |
|
| 286 |
CPPFLAGS += $(DEFFLAGS) $(INCLDIRS) |
| 287 |
|
| 288 |
# Define default extensions for IDL-generated files |
| 289 |
IDL_CLIENT_HDR_EXT ?= C.h |
| 290 |
IDL_CLIENT_INL_EXT ?= C.inl |
| 291 |
IDL_CLIENT_SRC_EXT ?= C.cpp |
| 292 |
IDL_SERVER_HDR_EXT ?= S.h |
| 293 |
IDL_SERVER_SRC_EXT ?= S.cpp |
| 294 |
IDL_SERVER_THDR_EXT ?= S_T.h |
| 295 |
IDL_SERVER_TINL_EXT ?= S_T.inl |
| 296 |
IDL_SERVER_TSRC_EXT ?= S_T.cpp |
| 297 |
IDL_GEN_FILES_DIR ?= . |
| 298 |
|
| 299 |
ifeq (default,$(origin LEX)) |
| 300 |
LEX = flex |
| 301 |
endif |
| 302 |
|
| 303 |
EXEEXT ?= |
| 304 |
|
| 305 |
ifndef COMSPEC |
| 306 |
ifdef ComSpec |
| 307 |
#### ACE+TAO use COMSPEC, but ComSpec is defined. |
| 308 |
COMSPEC = $(ComSpec) |
| 309 |
endif # ComSpec |
| 310 |
endif # ! COMPSPEC |
| 311 |
|
| 312 |
ifdef COMSPEC |
| 313 |
#### Assume we're on a WIN32 host. |
| 314 |
ACE_NUL = $(if $(findstring /bin/sh,$(SHELL)),/dev/null,nul) |
| 315 |
else # ! WIN32 |
| 316 |
ACE_NUL = /dev/null |
| 317 |
endif # ! WIN32 |
| 318 |
|
| 319 |
#### Redirect stderr to nul device, and mask exit status. |
| 320 |
ACE_NUL_STDERR = 2>$(ACE_NUL) || true |
| 321 |
PCFLAGS += #### set in platform_macros.GNU file, e.g., -p |
| 322 |
PCCFLAGS += #### set in platform_macros.GNU file, e.g., -p |
| 323 |
VAR ?= |
| 324 |
|
| 325 |
# User-written makefiles that are not MPC-generated often use LIB to specify |
| 326 |
# what to build. This is in contrast to MPC-generated files that use |
| 327 |
# LIB_CHECKED for this purpose. LIB causes conflicts on Windows with gmake |
| 328 |
# and Visual Studio which uses the LIB environment variable as a search path |
| 329 |
# for libraries to link. So, to allow non-MPC makefiles to keep working, set |
| 330 |
# LIB_CHECKED based on LIB if the former is not set and the latter is. |
| 331 |
ifndef COMSPEC |
| 332 |
LIB_CHECKED ?= $(LIB) |
| 333 |
endif # ! COMPSPEC (and, therefore, assumed !Windows |
| 334 |
|
| 335 |
# default to not using an architecture-specific output directory |
| 336 |
ARCH ?= |
| 337 |
|
| 338 |
ifdef ARCH |
| 339 |
INSLIB := $(INSLIB:%=%/$(ARCH)) |
| 340 |
|
| 341 |
# ADD_ARCH is a function used with $(call) to "ARCHIFY" a variable which |
| 342 |
# contains the name and path of an executable or library. If the file is not |
| 343 |
# located in the ARCH subdir, the non-ARCH location is used. First we need |
| 344 |
# some helper functions to deal with quoting/protecting spaces. |
| 345 |
# ADD_ARCH can return a path containing a space, the caller must quote it or |
| 346 |
# escape the space, depending on the context. |
| 347 |
PROT_SPC = $(subst $(SPACE),?,$(1)) |
| 348 |
UNPROT_SPC = $(subst ?,$(SPACE),$(1)) |
| 349 |
FILE_EXISTS = $(wildcard $(subst $(SPACE),\$(SPACE),$(1))) |
| 350 |
ADD_ARCH_HLP = $(call UNPROT_SPC,$(dir $(1))$(ARCH)/$(notdir $(1))) |
| 351 |
ARCH_FILE = $(call FILE_EXISTS,$(call ADD_ARCH_HLP,$(call PROT_SPC,$(1)))) |
| 352 |
ADD_ARCH = $(if $(call ARCH_FILE,$(1)),$(call ARCH_FILE,$(1)),$(call FILE_EXISTS,$(1))) |
| 353 |
|
| 354 |
ARCH_BIN = $(if $(BIN),$(ARCH)/$(BIN)) |
| 355 |
ARCH_BIN2 = $(if $(BIN2),$(ARCH)/$(BIN2)) |
| 356 |
ARCH_LIB = $(if $(LIB_CHECKED),$(ARCH)/$(LIB_CHECKED)) |
| 357 |
ARCH_LIB2 = $(if $(LIB2),$(ARCH)/$(LIB2)) |
| 358 |
ARCH_SHLIB = $(if $(SHLIB),$(ARCH)/$(SHLIB)) |
| 359 |
ARCH_SHLIB2 = $(if $(SHLIB2),$(ARCH)/$(SHLIB2)) |
| 360 |
ARCH_SHLIBA = $(if $(SHLIBA),$(ARCH)/$(SHLIBA)) |
| 361 |
ARCH_SHLIBA2 = $(if $(SHLIBA2),$(ARCH)/$(SHLIBA2)) |
| 362 |
|
| 363 |
else #ARCH is not defined |
| 364 |
|
| 365 |
ADD_ARCH = $(1) |
| 366 |
|
| 367 |
ARCH_BIN = $(BIN) |
| 368 |
ARCH_BIN2 = $(BIN2) |
| 369 |
ARCH_LIB = $(LIB_CHECKED) |
| 370 |
ARCH_LIB2 = $(LIB2) |
| 371 |
ARCH_SHLIB = $(SHLIB) |
| 372 |
ARCH_SHLIB2 = $(SHLIB2) |
| 373 |
ARCH_SHLIBA = $(SHLIBA) |
| 374 |
ARCH_SHLIBA2 = $(SHLIBA2) |
| 375 |
|
| 376 |
endif #ARCH |
| 377 |
|
| 378 |
# for use with the result of ADD_ARCH |
| 379 |
ADD_QUOTE = $(if $(findstring $(SPACE),$(1)),"$(1)",$(1)) |
| 380 |
|
| 381 |
|
| 382 |
INSINC ?= $(ACE_ROOT)/ace |
| 383 |
INSLIB ?= $(ACE_ROOT)/lib |
| 384 |
INSMAN ?= $(ACE_ROOT)/man |
| 385 |
|
| 386 |
ifeq (,$(findstring -L$(INSLIB),$(LDFLAGS))) |
| 387 |
LDFLAGS += -L$(INSLIB) |
| 388 |
endif |
| 389 |
|
| 390 |
#ifdef ARCH |
| 391 |
# LDFLAGS_ARCH := $(LDFLAGS:-L%=-L%/$(ARCH)) |
| 392 |
# LDFLAGS += $(LDFLAGS_ARCH) |
| 393 |
#endif |
| 394 |
|
| 395 |
# Set the cleanup targets. These targets are used by realclean even if |
| 396 |
# the component isn't being built, i.e., the decision to build it was based |
| 397 |
# on components built in another makefile and written a file (that might no |
| 398 |
# longer be available) and accessed by $(ACE_ROOT)/bin/ace_components. |
| 399 |
# |
| 400 |
# If a component should always be built, just use the normal BIN, LIB, or |
| 401 |
# SHLIB variables. If it's dependent on a component, use the BIN2 or |
| 402 |
# BIN_UNCHECKED variety, then assign that to BIN if the required component |
| 403 |
# is available. |
| 404 |
|
| 405 |
BIN_UNCHECKED ?= |
| 406 |
CLEANUP_BIN ?= |
| 407 |
ifdef BIN |
| 408 |
CLEANUP_BIN = $(ARCH_BIN) |
| 409 |
endif # !BIN |
| 410 |
ifdef BIN2 |
| 411 |
CLEANUP_BIN += $(ARCH_BIN2) |
| 412 |
endif # !BIN2 |
| 413 |
ifneq ($(BIN_UNCHECKED),) |
| 414 |
CLEANUP_BIN += $(BIN_UNCHECKED) |
| 415 |
endif # !BIN_UNCHECKED |
| 416 |
|
| 417 |
LIB_UNCHECKED ?= |
| 418 |
CLEANUP_LIB ?= |
| 419 |
ifdef LIB_CHECKED |
| 420 |
CLEANUP_LIB = $(ARCH_LIB) |
| 421 |
endif # !LIB_CHECKED |
| 422 |
ifdef LIB2 |
| 423 |
CLEANUP_LIB += $(ARCH_LIB2) |
| 424 |
endif # !LIB2 |
| 425 |
ifneq ($(LIB_UNCHECKED),) |
| 426 |
CLEANUP_LIB = $(LIB_UNCHECKED) |
| 427 |
endif # !LIB_UNCHECKED |
| 428 |
|
| 429 |
SHLIB_UNCHECKED ?= |
| 430 |
CLEANUP_SHLIB ?= |
| 431 |
ifdef SHLIB |
| 432 |
CLEANUP_SHLIB = $(ARCH_SHLIB) |
| 433 |
endif # !SHLIB |
| 434 |
ifdef SHLIB2 |
| 435 |
CLEANUP_SHLIB += $(ARCH_SHLIB2) |
| 436 |
endif # SHLIB2 |
| 437 |
ifneq ($(SHLIB_UNCHECKED),) |
| 438 |
CLEANUP_SHLIB += $(SHLIB_UNCHECKED) |
| 439 |
endif # ! SHLIB_UNCHECKED |
| 440 |
|
| 441 |
SHLIBA_UNCHECKED ?= |
| 442 |
CLEANUP_SHLIBA ?= |
| 443 |
ifdef SHLIBA |
| 444 |
CLEANUP_SHLIBA = $(ARCH_SHLIBA) |
| 445 |
endif # SHLIBA |
| 446 |
ifdef SHLIBA2 |
| 447 |
CLEANUP_SHLIBA = $(ARCH_SHLIBA2) |
| 448 |
endif # SHLIB2A |
| 449 |
ifneq ($(SHLIBA_UNCHECKED),) |
| 450 |
CLEANUP_SHLIBA = $(SHLIBA_UNCHECKED) |
| 451 |
endif # SHLIBA_UNCHECKED |
| 452 |
|
| 453 |
# Let users override the default VDIR directories |
| 454 |
VDIR_PRJ ?= |
| 455 |
ifdef ARCH |
| 456 |
VDIR ?= $(ARCH)/.obj/$(VDIR_PRJ) |
| 457 |
VSHDIR ?= $(ARCH)/.shobj/$(VDIR_PRJ) |
| 458 |
else |
| 459 |
VDIR ?= .obj/$(VDIR_PRJ) |
| 460 |
VSHDIR ?= .shobj/$(VDIR_PRJ) |
| 461 |
endif |
| 462 |
|
| 463 |
# NOTE: VLDLIBS is defined below, in case it is overridden for static- |
| 464 |
# or shared-only builds. |
| 465 |
ifeq (default,$(origin YACC)) |
| 466 |
YACC = bison |
| 467 |
endif |
| 468 |
|
| 469 |
#---------------------------------------------------------------------------- |
| 470 |
# Platform-dependent macros that require platform_macros.GNU. |
| 471 |
#---------------------------------------------------------------------------- |
| 472 |
|
| 473 |
OBJEXT ?= o |
| 474 |
SOEXT ?= so |
| 475 |
LIBEXT ?= a |
| 476 |
LIB_PREFIX ?= lib |
| 477 |
|
| 478 |
CC_OUTPUT_FLAG ?= -o |
| 479 |
SO_OUTPUT_FLAG ?= -o |
| 480 |
LINK_OUTPUT_FLAG ?= -o |
| 481 |
|
| 482 |
#---------------------------------------------------------------------------- |
| 483 |
# make flags |
| 484 |
#---------------------------------------------------------------------------- |
| 485 |
|
| 486 |
ifeq ($(optimize),0) |
| 487 |
override optimize = |
| 488 |
endif # optimize |
| 489 |
|
| 490 |
ifneq ($(optimize),) |
| 491 |
CFLAGS += $(OCFLAGS) |
| 492 |
CCFLAGS += $(OCCFLAGS) |
| 493 |
endif # optimize |
| 494 |
|
| 495 |
ifeq ($(debug),0) |
| 496 |
override debug = |
| 497 |
endif # debug |
| 498 |
|
| 499 |
ifeq ($(debug),) |
| 500 |
CPPFLAGS += -DACE_NDEBUG |
| 501 |
else |
| 502 |
CFLAGS += $(DCFLAGS) |
| 503 |
CCFLAGS += $(DCCFLAGS) |
| 504 |
endif # debug |
| 505 |
|
| 506 |
dmalloc ?= |
| 507 |
ifeq ($(dmalloc),0) |
| 508 |
override dmalloc = |
| 509 |
endif # dmalloc |
| 510 |
|
| 511 |
ifdef dmalloc |
| 512 |
CPPFLAGS += $(PLATFORM_DMALLOC_CPPFLAGS) |
| 513 |
LDFLAGS += $(PLATFORM_DMALLOC_LDFLAGS) |
| 514 |
LIBS += $(PLATFORM_DMALLOC_LIBS) |
| 515 |
endif # dmalloc |
| 516 |
|
| 517 |
mtrace ?= |
| 518 |
ifeq ($(mtrace),0) |
| 519 |
override mtrace = |
| 520 |
endif # mtrace |
| 521 |
|
| 522 |
ifdef mtrace |
| 523 |
CPPFLAGS += $(PLATFORM_MTRACE_CPPFLAGS) |
| 524 |
endif # mtrace |
| 525 |
|
| 526 |
ifeq ($(threads),0) |
| 527 |
override threads = |
| 528 |
endif # threads |
| 529 |
|
| 530 |
trio ?= |
| 531 |
ifeq ($(trio),0) |
| 532 |
override trio = |
| 533 |
endif # trio |
| 534 |
|
| 535 |
ifdef trio |
| 536 |
CPPFLAGS += -DACE_HAS_TRIO $(PLATFORM_TRIO_CPPFLAGS) |
| 537 |
LDFLAGS += $(PLATFORM_TRIO_LDFLAGS) |
| 538 |
LIBS += -ltrio $(PLATFORM_TRIO_LIBS) |
| 539 |
ACE_MAKE_OPTIONS += trio |
| 540 |
endif # trio |
| 541 |
|
| 542 |
# ace_for_tao subsetting is disabled by default. |
| 543 |
ace_for_tao ?= |
| 544 |
ifeq ($(ace_for_tao),0) |
| 545 |
override ace_for_tao = |
| 546 |
endif # ace_for_tao |
| 547 |
|
| 548 |
ifneq ($(ace_for_tao),) |
| 549 |
ACE_MAKE_OPTIONS += ace_for_tao |
| 550 |
endif # ace_for_tao |
| 551 |
|
| 552 |
|
| 553 |
ifeq ($(xt),0) |
| 554 |
override xt = |
| 555 |
endif # xt |
| 556 |
|
| 557 |
ifneq ($(xt),) |
| 558 |
override x11=1 |
| 559 |
override xt=1 |
| 560 |
override ace_xtreactor=1 |
| 561 |
override tao_xtresource=1 |
| 562 |
ACE_MAKE_OPTIONS += xt |
| 563 |
endif # xt |
| 564 |
|
| 565 |
fl ?= |
| 566 |
ifeq ($(fl),0) |
| 567 |
override fl = |
| 568 |
endif # fl |
| 569 |
|
| 570 |
ifneq ($(fl),) |
| 571 |
override x11=1 |
| 572 |
override gl=1 |
| 573 |
override ace_flreactor=1 |
| 574 |
override tao_flresource=1 |
| 575 |
ACE_MAKE_OPTIONS += fl |
| 576 |
endif # fl |
| 577 |
|
| 578 |
tk ?= |
| 579 |
ifeq ($(tk),0) |
| 580 |
override tk = |
| 581 |
endif # tk |
| 582 |
|
| 583 |
ifneq ($(tk),) |
| 584 |
override x11=1 |
| 585 |
override tk=1 |
| 586 |
override ace_tkreactor=1 |
| 587 |
override tao_tkresource=1 |
| 588 |
ACE_MAKE_OPTIONS += tk |
| 589 |
endif # tk |
| 590 |
|
| 591 |
qt ?= |
| 592 |
ifeq ($(qt),0) |
| 593 |
override qt = |
| 594 |
endif # qt |
| 595 |
|
| 596 |
ifneq ($(qt),) |
| 597 |
override qt=1 |
| 598 |
override ace_qtreactor=1 |
| 599 |
override tao_qtresource=1 |
| 600 |
ACE_MAKE_OPTIONS += qt |
| 601 |
endif # qt |
| 602 |
gtk_reactor ?= |
| 603 |
|
| 604 |
ifeq ($(gtk_reactor),0) |
| 605 |
override gtk_reactor = |
| 606 |
endif # gtk_reactor |
| 607 |
|
| 608 |
ifneq ($(gtk_reactor),) |
| 609 |
override ace_with_gtk=1 |
| 610 |
CPPFLAGS += -DACE_HAS_GTK $(PLATFORM_GTK_CPPFLAGS) |
| 611 |
LIBS += $(PLATFORM_GTK_LIBS) |
| 612 |
LDFLAGS += $(PLATFORM_GTK_LDFLAGS) |
| 613 |
ACE_MAKE_OPTIONS += gtk_reactor |
| 614 |
endif # gtk_reactor |
| 615 |
|
| 616 |
fox ?= |
| 617 |
ifeq ($(fox),0) |
| 618 |
override fox = |
| 619 |
endif # fox |
| 620 |
|
| 621 |
ifneq ($(fox),) |
| 622 |
override x11=1 |
| 623 |
override gl=1 |
| 624 |
override ace_foxreactor=1 |
| 625 |
override tao_foxresource=1 |
| 626 |
ACE_MAKE_OPTIONS += fox |
| 627 |
endif #fox |
| 628 |
|
| 629 |
QTDIR ?= |
| 630 |
ifneq ($(QTDIR),) |
| 631 |
MOC = ${QTDIR}/bin/moc |
| 632 |
else |
| 633 |
MOC = moc |
| 634 |
endif |
| 635 |
|
| 636 |
rapi ?= |
| 637 |
ifeq ($(rapi),0) |
| 638 |
override rapi = |
| 639 |
endif #rapi |
| 640 |
|
| 641 |
ifneq ($(rapi),) |
| 642 |
CPPFLAGS += -DACE_HAS_RAPI $(PLATFORM_RAPI_CPPFLAGS) |
| 643 |
LIBS += $(PLATFORM_RAPI_LIBS) |
| 644 |
LDFLAGS += $(PLATFORM_RAPI_LDFLAGS) |
| 645 |
ACE_MAKE_OPTIONS += rapi |
| 646 |
endif # rapi |
| 647 |
|
| 648 |
sctp ?= |
| 649 |
ifeq ($(sctp),0) |
| 650 |
override sctp = |
| 651 |
endif #rapi |
| 652 |
|
| 653 |
# if any sctp implementation is present then add |
| 654 |
ifneq ($(sctp),) |
| 655 |
CPPFLAGS += -DACE_HAS_SCTP $(PLATFORM_SCTP_CPPFLAGS) |
| 656 |
LDFLAGS += $(PLATFORM_SCTP_LDFLAGS) |
| 657 |
LIBS += $(PLATFORM_SCTP_LIBS) |
| 658 |
ACE_MAKE_OPTIONS += sctp |
| 659 |
endif |
| 660 |
|
| 661 |
gl ?= |
| 662 |
ifeq ($(gl),0) |
| 663 |
override gl = |
| 664 |
endif # gl |
| 665 |
|
| 666 |
ifneq ($(gl),) |
| 667 |
ACE_MAKE_OPTIONS += gl |
| 668 |
endif # gl |
| 669 |
|
| 670 |
ssl ?= 0 |
| 671 |
ifeq ($(ssl),0) |
| 672 |
override ssl = |
| 673 |
else |
| 674 |
ifneq ($(SSL_ROOT), /usr) |
| 675 |
ifneq ($(SSL_ROOT),) |
| 676 |
ifneq ($(SSL_INCDIR),) |
| 677 |
PLATFORM_SSL_CPPFLAGS += -I$(SSL_INCDIR) |
| 678 |
else |
| 679 |
PLATFORM_SSL_CPPFLAGS += -I$(SSL_ROOT)/include |
| 680 |
endif |
| 681 |
ifneq ($(SSL_LIBDIR),) |
| 682 |
PLATFORM_SSL_LDFLAGS += -L$(SSL_LIBDIR) |
| 683 |
else |
| 684 |
PLATFORM_SSL_LDFLAGS += -L$(SSL_ROOT)/lib |
| 685 |
endif |
| 686 |
endif |
| 687 |
endif |
| 688 |
PLATFORM_SSL_LIBS ?= -lssl -lcrypto |
| 689 |
ACE_MAKE_OPTIONS += ssl |
| 690 |
endif |
| 691 |
|
| 692 |
## These are related to MPC. When 'requires' is used in a project |
| 693 |
## it controls whether or not the project is generated. There is also |
| 694 |
## a second level of control in platform macros and thus requires |
| 695 |
## some features to be set here as well. |
| 696 |
ec_typed_events ?= 1 |
| 697 |
zlib ?= 1 |
| 698 |
|
| 699 |
valgrind ?= |
| 700 |
ifeq ($(valgrind),1) |
| 701 |
CPPFLAGS += -DACE_HAS_VALGRIND |
| 702 |
# Does the valgrind version support --keep-debug-info, if not |
| 703 |
# we disable dlclose in ACE to get complete callstacks |
| 704 |
valgrind_keep_debuginfo ?= |
| 705 |
ifeq ($(valgrind_keep_debuginfo),0) |
| 706 |
CPPFLAGS += -DACE_LACKS_DLCLOSE |
| 707 |
endif |
| 708 |
endif |
| 709 |
|
| 710 |
profile ?= |
| 711 |
ifeq ($(profile),0) |
| 712 |
override profile = |
| 713 |
endif # profile |
| 714 |
|
| 715 |
ifneq ($(profile),) |
| 716 |
CFLAGS += $(PCFLAGS) |
| 717 |
CCFLAGS += $(PCCFLAGS) |
| 718 |
endif # profile |
| 719 |
|
| 720 |
inline ?= 1 |
| 721 |
ifeq ($(inline),0) |
| 722 |
CPPFLAGS += -DACE_NO_INLINE |
| 723 |
else |
| 724 |
ifeq ($(inline),1) |
| 725 |
CPPFLAGS += -D__ACE_INLINE__ |
| 726 |
endif # inline eq 1 |
| 727 |
endif # inline eq 0 |
| 728 |
|
| 729 |
ifeq ($(shared_libs),0) |
| 730 |
override shared_libs = |
| 731 |
endif # shared_libs |
| 732 |
ifeq ($(static_libs),0) |
| 733 |
override static_libs = |
| 734 |
endif # static_libs |
| 735 |
|
| 736 |
shared_libs_only ?= |
| 737 |
ifeq ($(shared_libs_only),0) |
| 738 |
override shared_libs_only = |
| 739 |
endif # shared_libs_only |
| 740 |
|
| 741 |
static_libs_only ?= |
| 742 |
ifeq ($(static_libs_only),0) |
| 743 |
override static_libs_only = |
| 744 |
endif # static_libs_only |
| 745 |
|
| 746 |
ifdef shared_libs_only |
| 747 |
ifdef static_libs_only |
| 748 |
$(error Both static_libs_only and shared_libs_only defined.) |
| 749 |
else |
| 750 |
override shared_libs = 1 |
| 751 |
override static_libs = |
| 752 |
endif |
| 753 |
endif # shared_libs_only |
| 754 |
ifdef static_libs_only |
| 755 |
override shared_libs = |
| 756 |
override static_libs = 1 |
| 757 |
endif # static_libs_only |
| 758 |
|
| 759 |
ifdef shared_libs |
| 760 |
ifndef static_libs |
| 761 |
override shared_libs_only = 1 |
| 762 |
endif |
| 763 |
ACE_MAKE_OPTIONS += shared_libs |
| 764 |
endif |
| 765 |
|
| 766 |
ifdef static_libs |
| 767 |
ifndef shared_libs |
| 768 |
override static_libs_only = 1 |
| 769 |
endif |
| 770 |
ACE_MAKE_OPTIONS += static_libs |
| 771 |
endif |
| 772 |
|
| 773 |
ACE_SHLIBS ?= |
| 774 |
|
| 775 |
ifdef shared_libs |
| 776 |
ifdef SHLIBA |
| 777 |
LDLIBS := $(LDLIBS:-l%=-l%shr) |
| 778 |
ACE_SHLIBS := $(ACE_SHLIBS:-l%=-l%shr) |
| 779 |
endif # SHLIBA |
| 780 |
else # ! shared_libs |
| 781 |
ifdef static_libs |
| 782 |
#### Don't build shared libs. |
| 783 |
PIC = |
| 784 |
SHLIB = |
| 785 |
SOEXT = o |
| 786 |
VSHDIR = $(VDIR) |
| 787 |
VLDLIBS = $(LDLIBS:%.so=%.o) |
| 788 |
endif # static_libs |
| 789 |
endif # shared_libs |
| 790 |
|
| 791 |
VLDLIBS = $(LDLIBS) $(LIBS) |
| 792 |
|
| 793 |
probe ?= |
| 794 |
ifeq ($(probe),0) |
| 795 |
override probe = |
| 796 |
endif # probe |
| 797 |
|
| 798 |
ifeq ($(probe),1) |
| 799 |
CPPFLAGS += -DACE_COMPILE_TIMEPROBES |
| 800 |
endif # probe |
| 801 |
|
| 802 |
purify ?= |
| 803 |
ifeq ($(purify),0) |
| 804 |
override purify = |
| 805 |
endif # purify |
| 806 |
|
| 807 |
ifdef purify |
| 808 |
PURE_CACHE_BASE_DIR = /tmp/purifycache |
| 809 |
PURE_CACHE_DIR = $(PURE_CACHE_BASE_DIR)-$(LOGNAME)-$(notdir $(CXX) ) |
| 810 |
|
| 811 |
#### Pick up Purify directory from the users PATH. |
| 812 |
ACE_PURIFY_DIR := \ |
| 813 |
$(shell type purify | sed -e 's/.* is //' -e 's%/purify$$%%') |
| 814 |
|
| 815 |
#### You might want to adjust the Purify options below. |
| 816 |
#### -best-effort is undocumented but supported, and seems |
| 817 |
#### to help avoid occasional link failure. |
| 818 |
PURELINK += purify -best-effort -cache-dir=$(PURE_CACHE_DIR) \ |
| 819 |
-chain-length=20 -fds-inuse-at-exit=no \ |
| 820 |
-inuse-at-exit -max_threads=100 $(PLATFORM_PURIFY_OPTIONS) |
| 821 |
CPPFLAGS += -DACE_HAS_PURIFY -I$(ACE_PURIFY_DIR) |
| 822 |
endif # purify |
| 823 |
|
| 824 |
quantify ?= |
| 825 |
ifeq ($(quantify),0) |
| 826 |
override quantify = |
| 827 |
endif # quantify |
| 828 |
|
| 829 |
ifdef quantify |
| 830 |
#### Pick up Quantify directory from the users PATH. |
| 831 |
ACE_QUANTIFY_DIR := \ |
| 832 |
$(shell type quantify | sed -e 's/.* is //' -e 's%/quantify$$%%') |
| 833 |
|
| 834 |
#### You might want to adjust the Quantify options below. |
| 835 |
#### -best-effort is undocumented but supported, and seems |
| 836 |
#### to help avoid occasional link failure. |
| 837 |
PURELINK += quantify -best-effort -cache-dir=$(PURE_CACHE_DIR) \ |
| 838 |
-max_threads=100 $(PLATFORM_QUANTIFY_OPTIONS) |
| 839 |
CPPFLAGS += -DACE_HAS_QUANTIFY -I$(ACE_QUANTIFY_DIR) |
| 840 |
endif # quantify |
| 841 |
|
| 842 |
repo ?= |
| 843 |
ifeq ($(repo),0) |
| 844 |
override repo = |
| 845 |
endif # repo |
| 846 |
|
| 847 |
ifdef repo |
| 848 |
#### Remove -fno-implicit-templates from, and add -frepo to, CCFLAGS. |
| 849 |
CCFLAGS := $(strip $(subst -fno-implicit-templates,,$(CCFLAGS))) |
| 850 |
CCFLAGS += -frepo |
| 851 |
CPPFLAGS += -DACE_HAS_GNU_REPO |
| 852 |
# ace_lib_prelink := 1 |
| 853 |
endif # repo |
| 854 |
|
| 855 |
# If pipes is not set, we default to 0 |
| 856 |
pipes ?= 0 |
| 857 |
|
| 858 |
# If pipes is set to 1 then add the compiler flag -pipe. This uses pipe instead |
| 859 |
# of intermediate files. This can be disabled by setting pipes to 0 in the |
| 860 |
# platform_macros.GNU file. |
| 861 |
ifeq ($(pipes),1) |
| 862 |
FLAGS_C_CC += -pipe |
| 863 |
endif # pipes |
| 864 |
|
| 865 |
# RMCast is turned on by default |
| 866 |
rmcast ?= 1 |
| 867 |
ifeq ($(rmcast),1) |
| 868 |
ACE_MAKE_OPTIONS += rmcast |
| 869 |
endif |
| 870 |
|
| 871 |
# If not explicitly is set that we don't have rwho, assume we have it. |
| 872 |
rwho ?= 1 |
| 873 |
|
| 874 |
# If not explicitly is set that we don't have stlport, assume we |
| 875 |
# don't have it. |
| 876 |
stlport ?= 0 |
| 877 |
ifeq ($(stlport),1) |
| 878 |
CPPFLAGS += -DACE_HAS_STLPORT $(PLATFORM_STLPORT_CPPFLAGS) |
| 879 |
CCFLAGS += $(PLATFORM_STLPORT_CCFLAGS) |
| 880 |
LDFLAGS += $(PLATFORM_STLPORT_LDFLAGS) |
| 881 |
LIBS += $(PLATFORM_STLPORT_LIBS) |
| 882 |
endif |
| 883 |
|
| 884 |
# If not explicitly is set that we have wfmo, assume we don't have it. |
| 885 |
wfmo ?= 0 |
| 886 |
|
| 887 |
# If not explicitly is set that we have winregistry, assume we don't have it. |
| 888 |
winregistry ?= 0 |
| 889 |
|
| 890 |
# If not explicitly is set that we have winnt, assume we don't have it. |
| 891 |
winnt ?= 0 |
| 892 |
|
| 893 |
# In MPC, these are now features that are enabled by default. |
| 894 |
ace_other ?= 1 |
| 895 |
ace_codecs ?= 1 |
| 896 |
ace_token ?= 1 |
| 897 |
ace_svcconf ?= 1 |
| 898 |
ace_uuid ?= 1 |
| 899 |
ace_filecache ?= 1 |
| 900 |
acexml ?= 1 |
| 901 |
|
| 902 |
# Icecream distributed compilation support |
| 903 |
ifeq ($(icecream),1) |
| 904 |
# check availability of icecc |
| 905 |
ifneq ($(ICECC_ROOT),) |
| 906 |
ICECC_PROG := $(ICECC_ROOT)/icecc |
| 907 |
else |
| 908 |
ICECC_PROG := $(shell which icecc 2>/dev/null) |
| 909 |
endif |
| 910 |
ICECC_VERTEST := $(shell test -x "$(ICECC_PROG)" && $(ICECC_PROG) --version) |
| 911 |
ifneq (ICECC,$(findstring ICECC,$(ICECC_VERTEST))) |
| 912 |
# not good, try alternative install location |
| 913 |
ICECC_PROG := /opt/icecream/bin/icecc |
| 914 |
ICECC_VERTEST := $(shell test -x "$(ICECC_PROG)" && $(ICECC_PROG) --version) |
| 915 |
ifneq (ICECC,$(findstring ICECC,$(ICECC_VERTEST))) |
| 916 |
override icecream := 0 |
| 917 |
$(error Cannot locate valid Icecream compiler.) |
| 918 |
endif |
| 919 |
endif |
| 920 |
ifeq ($(icecream),1) |
| 921 |
# force LD and DLD to be 'normal' tools |
| 922 |
override LD := $(LD) |
| 923 |
override DLD := $(DLD) |
| 924 |
# define tools that icecc should call for local jobs |
| 925 |
ICECC_CC := $(CC) |
| 926 |
ICECC_CXX := $(CXX) |
| 927 |
export ICECC_CC ICECC_CXX |
| 928 |
# let all compilation go through icecc |
| 929 |
CC := $(ICECC_PROG) |
| 930 |
CXX := $(ICECC_PROG) |
| 931 |
endif |
| 932 |
endif |
| 933 |
|
| 934 |
#---------------------------------------------------------------------------- |
| 935 |
# Conditional macro definitions |
| 936 |
#---------------------------------------------------------------------------- |
| 937 |
|
| 938 |
PTDIRS ?= |
| 939 |
PRELINK ?= |
| 940 |
POSTLINK ?= |
| 941 |
PURELINK ?= |
| 942 |
MVCMD ?= |
| 943 |
PREPROCESS_OPT ?= -E |
| 944 |
PREPROCESS_SUFFIX ?= i |
| 945 |
|
| 946 |
COMPILE.c = $(CC) $(CFLAGS) $(FLAGS_C_CC) $(CPPFLAGS) -c |
| 947 |
COMPILE.cc = $(CXX) $(CCFLAGS) $(FLAGS_C_CC) $(CPPFLAGS) $(PTDIRS) -c |
| 948 |
PREPROCESS.c ?= $(CC) $(PREPROCESS_OPT) $(CFLAGS) $(CPPFLAGS) |
| 949 |
PREPROCESS.cc ?= $(CXX) $(PREPROCESS_OPT) $(CCFLAGS) $(CPPFLAGS) |
| 950 |
RC ?= |
| 951 |
|
| 952 |
COMPILE.rc = $(RC) $(RCFLAGS) |
| 953 |
COMPILE-NO_DASH_G.cc = `echo $(COMPILE.cc) | sed 's/-g //'` |
| 954 |
# 960905 Marius Kjeldahl <[email protected]> |
| 955 |
# Added the line below to be used for compiling executable shared objects |
| 956 |
COMPILEESO.cc = $(CXX) $(CCFLAGS) $(FLAGS_C_CC) $(CPPFLAGS) $(PTDIRS) |
| 957 |
|
| 958 |
ifeq ($(LINK.c),override) |
| 959 |
LINK.c = $(LINK.c.override) |
| 960 |
else |
| 961 |
LINK.c = $(PURELINK) $(PRELINK) $(LD) $(CFLAGS) $(FLAGS_C_CC) $(CPPFLAGS) $(LDFLAGS) \ |
| 962 |
$(LDLIBS) $(LIBS) |
| 963 |
endif # LINK.c.override |
| 964 |
|
| 965 |
ifeq ($(LINK.cc),override) |
| 966 |
LINK.cc = $(LINK.cc.override) |
| 967 |
else |
| 968 |
LINK.cc = $(PURELINK) $(PRELINK) $(LD) $(CCFLAGS) $(FLAGS_C_CC) $(CPPFLAGS) $(PTDIRS) |
| 969 |
endif # LINK.cc.override |
| 970 |
|
| 971 |
ifeq ($(SOLINK.cc),override) |
| 972 |
SOLINK.cc = $(SOLINK.cc.override) |
| 973 |
else |
| 974 |
SOLINK.cc = $(PRELINK) $(DLD) $(SOFLAGS) |
| 975 |
endif # SOLINK.cc.override |