3 #----------------------------------------------------------------------------
5 #----------------------------------------------------------------------------
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.
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.
21 # ace_for_tao Build "ace_for_tao" subset. Primarily useful for
22 # reducing the size of the ACE shared library when
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
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
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
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
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.
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.
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++.
104 # The following describes the ACE wrapper macros:
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
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...)
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...)
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
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
159 # Platform libraries required for SCTP
160 # PRELINK Executable to precede linking, such as quantify
161 # PREPROCESS.c Command to preprocess C
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
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
184 #----------------------------------------------------------------------------
185 # Platform-dependent macro definitions
186 # (link to the appropriate platform-specific config file).
187 #----------------------------------------------------------------------------
189 #### Default to building shared libraries only. Set it here to give the
190 #### platform a chance to override.
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)
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)
211 ACE_VERSION = $(ACE_MAJOR_VERSION).$(ACE_MINOR_VERSION).$(ACE_MICRO_VERSION)
213 # Define some variables to silence warnings
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)
221 include $(ACE_ROOT)/include/makeinclude/platform_macros.GNU
222 endif # alternate_platform_macros
224 # Define some variables to silence warnings
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
233 ifneq ($(findstring -DACE_MT_SAFE=0,$(CPPFLAGS)),-DACE_MT_SAFE=0)
234 CPPFLAGS += -DACE_MT_SAFE=0
235 endif # -DACE_MT_SAFE=0
239 #### Defaults are fast off (0), threads on (1)
240 #### and versioned_so on (1).
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)
259 ### use 'real' pwd command from shell; internal make command resolves symlinks
261 PWD=$(shell $(SHELL) -c pwd)
275 #----------------------------------------------------------------------------
276 # Platform-independent macro definitions
277 #----------------------------------------------------------------------------
286 CPPFLAGS += $(DEFFLAGS) $(INCLDIRS)
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 ?= .
299 ifeq (default,$(origin LEX))
307 #### ACE+TAO use COMSPEC, but ComSpec is defined.
313 #### Assume we're on a WIN32 host.
314 ACE_NUL = $(if $(findstring /bin/sh,$(SHELL)),/dev/null,nul)
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
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.
332 LIB_CHECKED ?= $(LIB)
333 endif # ! COMPSPEC (and, therefore, assumed !Windows
335 # default to not using an architecture-specific output directory
339 INSLIB := $(INSLIB:%=%/$(ARCH))
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)))
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))
363 else #ARCH is not defined
369 ARCH_LIB = $(LIB_CHECKED)
371 ARCH_SHLIB = $(SHLIB)
372 ARCH_SHLIB2 = $(SHLIB2)
373 ARCH_SHLIBA = $(SHLIBA)
374 ARCH_SHLIBA2 = $(SHLIBA2)
378 # for use with the result of ADD_ARCH
379 ADD_QUOTE = $(if $(findstring $(SPACE),$(1)),"$(1)",$(1))
382 INSINC ?= $(ACE_ROOT)/ace
383 INSLIB ?= $(ACE_ROOT)/lib
384 INSMAN ?= $(ACE_ROOT)/man
386 ifeq (,$(findstring -L$(INSLIB),$(LDFLAGS)))
387 LDFLAGS += -L$(INSLIB)
391 # LDFLAGS_ARCH := $(LDFLAGS:-L%=-L%/$(ARCH))
392 # LDFLAGS += $(LDFLAGS_ARCH)
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.
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
408 CLEANUP_BIN = $(ARCH_BIN)
411 CLEANUP_BIN += $(ARCH_BIN2)
413 ifneq ($(BIN_UNCHECKED),)
414 CLEANUP_BIN += $(BIN_UNCHECKED)
415 endif # !BIN_UNCHECKED
420 CLEANUP_LIB = $(ARCH_LIB)
423 CLEANUP_LIB += $(ARCH_LIB2)
425 ifneq ($(LIB_UNCHECKED),)
426 CLEANUP_LIB = $(LIB_UNCHECKED)
427 endif # !LIB_UNCHECKED
432 CLEANUP_SHLIB = $(ARCH_SHLIB)
435 CLEANUP_SHLIB += $(ARCH_SHLIB2)
437 ifneq ($(SHLIB_UNCHECKED),)
438 CLEANUP_SHLIB += $(SHLIB_UNCHECKED)
439 endif # ! SHLIB_UNCHECKED
444 CLEANUP_SHLIBA = $(ARCH_SHLIBA)
447 CLEANUP_SHLIBA = $(ARCH_SHLIBA2)
449 ifneq ($(SHLIBA_UNCHECKED),)
450 CLEANUP_SHLIBA = $(SHLIBA_UNCHECKED)
451 endif # SHLIBA_UNCHECKED
453 # Let users override the default VDIR directories
456 VDIR ?= $(ARCH)/.obj/$(VDIR_PRJ)
457 VSHDIR ?= $(ARCH)/.shobj/$(VDIR_PRJ)
459 VDIR ?= .obj/$(VDIR_PRJ)
460 VSHDIR ?= .shobj/$(VDIR_PRJ)
463 # NOTE: VLDLIBS is defined below, in case it is overridden for static-
464 # or shared-only builds.
465 ifeq (default,$(origin YACC))
469 #----------------------------------------------------------------------------
470 # Platform-dependent macros that require platform_macros.GNU.
471 #----------------------------------------------------------------------------
480 LINK_OUTPUT_FLAG ?= -o
482 #----------------------------------------------------------------------------
484 #----------------------------------------------------------------------------
492 CCFLAGS += $(OCCFLAGS)
500 CPPFLAGS += -DACE_NDEBUG
503 CCFLAGS += $(DCCFLAGS)
512 CPPFLAGS += $(PLATFORM_DMALLOC_CPPFLAGS)
513 LDFLAGS += $(PLATFORM_DMALLOC_LDFLAGS)
514 LIBS += $(PLATFORM_DMALLOC_LIBS)
523 CPPFLAGS += $(PLATFORM_MTRACE_CPPFLAGS)
536 CPPFLAGS += -DACE_HAS_TRIO $(PLATFORM_TRIO_CPPFLAGS)
537 LDFLAGS += $(PLATFORM_TRIO_LDFLAGS)
538 LIBS += -ltrio $(PLATFORM_TRIO_LIBS)
539 ACE_MAKE_OPTIONS += trio
542 # ace_for_tao subsetting is disabled by default.
544 ifeq ($(ace_for_tao),0)
545 override ace_for_tao =
548 ifneq ($(ace_for_tao),)
549 ACE_MAKE_OPTIONS += ace_for_tao
560 override ace_xtreactor=1
561 override tao_xtresource=1
562 ACE_MAKE_OPTIONS += xt
573 override ace_flreactor=1
574 override tao_flresource=1
575 ACE_MAKE_OPTIONS += fl
586 override ace_tkreactor=1
587 override tao_tkresource=1
588 ACE_MAKE_OPTIONS += tk
598 override ace_qtreactor=1
599 override tao_qtresource=1
600 ACE_MAKE_OPTIONS += qt
604 ifeq ($(gtk_reactor),0)
605 override gtk_reactor =
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
624 override ace_foxreactor=1
625 override tao_foxresource=1
626 ACE_MAKE_OPTIONS += fox
631 MOC = ${QTDIR}/bin/moc
642 CPPFLAGS += -DACE_HAS_RAPI $(PLATFORM_RAPI_CPPFLAGS)
643 LIBS += $(PLATFORM_RAPI_LIBS)
644 LDFLAGS += $(PLATFORM_RAPI_LDFLAGS)
645 ACE_MAKE_OPTIONS += rapi
653 # if any sctp implementation is present then add
655 CPPFLAGS += -DACE_HAS_SCTP $(PLATFORM_SCTP_CPPFLAGS)
656 LDFLAGS += $(PLATFORM_SCTP_LDFLAGS)
657 LIBS += $(PLATFORM_SCTP_LIBS)
658 ACE_MAKE_OPTIONS += sctp
667 ACE_MAKE_OPTIONS += gl
674 ifneq ($(SSL_ROOT), /usr)
676 ifneq ($(SSL_INCDIR),)
677 PLATFORM_SSL_CPPFLAGS += -I$(SSL_INCDIR)
679 PLATFORM_SSL_CPPFLAGS += -I$(SSL_ROOT)/include
681 ifneq ($(SSL_LIBDIR),)
682 PLATFORM_SSL_LDFLAGS += -L$(SSL_LIBDIR)
684 PLATFORM_SSL_LDFLAGS += -L$(SSL_ROOT)/lib
688 PLATFORM_SSL_LIBS ?= -lssl -lcrypto
689 ACE_MAKE_OPTIONS += ssl
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.
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
717 CCFLAGS += $(PCCFLAGS)
722 CPPFLAGS += -DACE_NO_INLINE
725 CPPFLAGS += -D__ACE_INLINE__
729 ifeq ($(shared_libs),0)
730 override shared_libs =
732 ifeq ($(static_libs),0)
733 override static_libs =
737 ifeq ($(shared_libs_only),0)
738 override shared_libs_only =
739 endif # shared_libs_only
742 ifeq ($(static_libs_only),0)
743 override static_libs_only =
744 endif # static_libs_only
746 ifdef shared_libs_only
747 ifdef static_libs_only
748 $(error Both static_libs_only and shared_libs_only defined.)
750 override shared_libs = 1
751 override static_libs =
753 endif # shared_libs_only
754 ifdef static_libs_only
755 override shared_libs =
756 override static_libs = 1
757 endif # static_libs_only
761 override shared_libs_only = 1
763 ACE_MAKE_OPTIONS += shared_libs
768 override static_libs_only = 1
770 ACE_MAKE_OPTIONS += static_libs
777 LDLIBS := $(LDLIBS:-l%=-l%shr)
778 ACE_SHLIBS := $(ACE_SHLIBS:-l%=-l%shr)
782 #### Don't build shared libs.
787 VLDLIBS = $(LDLIBS:%.so=%.o)
791 VLDLIBS = $(LDLIBS) $(LIBS)
799 CPPFLAGS += -DACE_COMPILE_TIMEPROBES
808 PURE_CACHE_BASE_DIR = /tmp/purifycache
809 PURE_CACHE_DIR = $(PURE_CACHE_BASE_DIR)-$(LOGNAME)-$(notdir $(CXX) )
811 #### Pick up Purify directory from the users PATH.
813 $(shell type purify | sed -e 's/.* is //' -e 's%/purify$$%%')
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)
830 #### Pick up Quantify directory from the users PATH.
831 ACE_QUANTIFY_DIR := \
832 $(shell type quantify | sed -e 's/.* is //' -e 's%/quantify$$%%')
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)
848 #### Remove -fno-implicit-templates from, and add -frepo to, CCFLAGS.
849 CCFLAGS := $(strip $(subst -fno-implicit-templates,,$(CCFLAGS)))
851 CPPFLAGS += -DACE_HAS_GNU_REPO
852 # ace_lib_prelink := 1
855 # If pipes is not set, we default to 0
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.
865 # RMCast is turned on by default
868 ACE_MAKE_OPTIONS += rmcast
871 # If not explicitly is set that we don't have rwho, assume we have it.
874 # If not explicitly is set that we don't have stlport, assume we
878 CPPFLAGS += -DACE_HAS_STLPORT $(PLATFORM_STLPORT_CPPFLAGS)
879 CCFLAGS += $(PLATFORM_STLPORT_CCFLAGS)
880 LDFLAGS += $(PLATFORM_STLPORT_LDFLAGS)
881 LIBS += $(PLATFORM_STLPORT_LIBS)
884 # If not explicitly is set that we have wfmo, assume we don't have it.
887 # If not explicitly is set that we have winregistry, assume we don't have it.
890 # If not explicitly is set that we have winnt, assume we don't have it.
893 # In MPC, these are now features that are enabled by default.
902 # Icecream distributed compilation support
904 # check availability of icecc
905 ifneq ($(ICECC_ROOT),)
906 ICECC_PROG := $(ICECC_ROOT)/icecc
908 ICECC_PROG := $(shell which icecc 2>/dev/null)
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.)
921 # force LD and DLD to be 'normal' tools
923 override DLD := $(DLD)
924 # define tools that icecc should call for local jobs
927 export ICECC_CC ICECC_CXX
928 # let all compilation go through icecc
934 #----------------------------------------------------------------------------
935 # Conditional macro definitions
936 #----------------------------------------------------------------------------
944 PREPROCESS_SUFFIX ?= i
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)
952 COMPILE.rc = $(RC) $(RCFLAGS)
953 COMPILE-NO_DASH_G.cc = `echo $(COMPILE.cc) | sed 's/-g //'`
954 # 960905 Marius Kjeldahl <marius@funcom.com>
955 # Added the line below to be used for compiling executable shared objects
956 COMPILEESO.cc = $(CXX) $(CCFLAGS) $(FLAGS_C_CC) $(CPPFLAGS) $(PTDIRS)
958 ifeq ($(LINK.c),override)
959 LINK.c = $(LINK.c.override)
961 LINK.c = $(PURELINK) $(PRELINK) $(LD) $(CFLAGS) $(FLAGS_C_CC) $(CPPFLAGS) $(LDFLAGS) \
963 endif # LINK.c.override
965 ifeq ($(LINK.cc),override)
966 LINK.cc = $(LINK.cc.override)
968 LINK.cc = $(PURELINK) $(PRELINK) $(LD) $(CCFLAGS) $(FLAGS_C_CC) $(CPPFLAGS) $(PTDIRS)
969 endif # LINK.cc.override
971 ifeq ($(SOLINK.cc),override)
972 SOLINK.cc = $(SOLINK.cc.override)
974 SOLINK.cc = $(PRELINK) $(DLD) $(SOFLAGS)
975 endif # SOLINK.cc.override