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 ifeq (,$(findstring -I$(ACE_ROOT),$(INCLDIRS)))
287 INCLDIRS += -I$(ACE_ROOT)
290 CPPFLAGS += $(DEFFLAGS) $(INCLDIRS)
292 # Define default extensions for IDL-generated files
293 IDL_CLIENT_HDR_EXT ?= C.h
294 IDL_CLIENT_INL_EXT ?= C.inl
295 IDL_CLIENT_SRC_EXT ?= C.cpp
296 IDL_SERVER_HDR_EXT ?= S.h
297 IDL_SERVER_SRC_EXT ?= S.cpp
298 IDL_SERVER_THDR_EXT ?= S_T.h
299 IDL_SERVER_TINL_EXT ?= S_T.inl
300 IDL_SERVER_TSRC_EXT ?= S_T.cpp
301 IDL_GEN_FILES_DIR ?= .
303 ifeq (default,$(origin LEX))
311 #### ACE+TAO use COMSPEC, but ComSpec is defined.
317 #### Assume we're on a WIN32 host.
318 ACE_NUL = $(if $(findstring /bin/sh,$(SHELL)),/dev/null,nul)
323 #### Redirect stderr to nul device, and mask exit status.
324 ACE_NUL_STDERR = 2>$(ACE_NUL) || true
325 PCFLAGS += #### set in platform_macros.GNU file, e.g., -p
326 PCCFLAGS += #### set in platform_macros.GNU file, e.g., -p
329 # User-written makefiles that are not MPC-generated often use LIB to specify
330 # what to build. This is in contrast to MPC-generated files that use
331 # LIB_CHECKED for this purpose. LIB causes conflicts on Windows with gmake
332 # and Visual Studio which uses the LIB environment variable as a search path
333 # for libraries to link. So, to allow non-MPC makefiles to keep working, set
334 # LIB_CHECKED based on LIB if the former is not set and the latter is.
336 LIB_CHECKED ?= $(LIB)
337 endif # ! COMPSPEC (and, therefore, assumed !Windows
339 # default to not using an architecture-specific output directory
343 INSLIB := $(INSLIB:%=%/$(ARCH))
345 # ADD_ARCH is a function used with $(call) to "ARCHIFY" a variable which
346 # contains the name and path of an executable or library. If the file is not
347 # located in the ARCH subdir, the non-ARCH location is used. First we need
348 # some helper functions to deal with quoting/protecting spaces.
349 # ADD_ARCH can return a path containing a space, the caller must quote it or
350 # escape the space, depending on the context.
351 PROT_SPC = $(subst $(SPACE),?,$(1))
352 UNPROT_SPC = $(subst ?,$(SPACE),$(1))
353 FILE_EXISTS = $(wildcard $(subst $(SPACE),\$(SPACE),$(1)))
354 ADD_ARCH_HLP = $(call UNPROT_SPC,$(dir $(1))$(ARCH)/$(notdir $(1)))
355 ARCH_FILE = $(call FILE_EXISTS,$(call ADD_ARCH_HLP,$(call PROT_SPC,$(1))))
356 ADD_ARCH = $(if $(call ARCH_FILE,$(1)),$(call ARCH_FILE,$(1)),$(call FILE_EXISTS,$(1)))
358 ARCH_BIN = $(if $(BIN),$(ARCH)/$(BIN))
359 ARCH_BIN2 = $(if $(BIN2),$(ARCH)/$(BIN2))
360 ARCH_LIB = $(if $(LIB_CHECKED),$(ARCH)/$(LIB_CHECKED))
361 ARCH_LIB2 = $(if $(LIB2),$(ARCH)/$(LIB2))
362 ARCH_SHLIB = $(if $(SHLIB),$(ARCH)/$(SHLIB))
363 ARCH_SHLIB2 = $(if $(SHLIB2),$(ARCH)/$(SHLIB2))
364 ARCH_SHLIBA = $(if $(SHLIBA),$(ARCH)/$(SHLIBA))
365 ARCH_SHLIBA2 = $(if $(SHLIBA2),$(ARCH)/$(SHLIBA2))
367 else #ARCH is not defined
373 ARCH_LIB = $(LIB_CHECKED)
375 ARCH_SHLIB = $(SHLIB)
376 ARCH_SHLIB2 = $(SHLIB2)
377 ARCH_SHLIBA = $(SHLIBA)
378 ARCH_SHLIBA2 = $(SHLIBA2)
382 # for use with the result of ADD_ARCH
383 ADD_QUOTE = $(if $(findstring $(SPACE),$(1)),"$(1)",$(1))
386 INSINC ?= $(ACE_ROOT)/ace
387 INSLIB ?= $(ACE_ROOT)/lib
388 INSMAN ?= $(ACE_ROOT)/man
390 ifeq (,$(findstring -L$(INSLIB),$(LDFLAGS)))
391 LDFLAGS += -L$(INSLIB)
395 # LDFLAGS_ARCH := $(LDFLAGS:-L%=-L%/$(ARCH))
396 # LDFLAGS += $(LDFLAGS_ARCH)
399 # Set the cleanup targets. These targets are used by realclean even if
400 # the component isn't being built, i.e., the decision to build it was based
401 # on components built in another makefile and written a file (that might no
402 # longer be available) and accessed by $(ACE_ROOT)/bin/ace_components.
404 # If a component should always be built, just use the normal BIN, LIB, or
405 # SHLIB variables. If it's dependent on a component, use the BIN2 or
406 # BIN_UNCHECKED variety, then assign that to BIN if the required component
412 CLEANUP_BIN = $(ARCH_BIN)
415 CLEANUP_BIN += $(ARCH_BIN2)
417 ifneq ($(BIN_UNCHECKED),)
418 CLEANUP_BIN += $(BIN_UNCHECKED)
419 endif # !BIN_UNCHECKED
424 CLEANUP_LIB = $(ARCH_LIB)
427 CLEANUP_LIB += $(ARCH_LIB2)
429 ifneq ($(LIB_UNCHECKED),)
430 CLEANUP_LIB = $(LIB_UNCHECKED)
431 endif # !LIB_UNCHECKED
436 CLEANUP_SHLIB = $(ARCH_SHLIB)
439 CLEANUP_SHLIB += $(ARCH_SHLIB2)
441 ifneq ($(SHLIB_UNCHECKED),)
442 CLEANUP_SHLIB += $(SHLIB_UNCHECKED)
443 endif # ! SHLIB_UNCHECKED
448 CLEANUP_SHLIBA = $(ARCH_SHLIBA)
451 CLEANUP_SHLIBA = $(ARCH_SHLIBA2)
453 ifneq ($(SHLIBA_UNCHECKED),)
454 CLEANUP_SHLIBA = $(SHLIBA_UNCHECKED)
455 endif # SHLIBA_UNCHECKED
457 # Let users override the default VDIR directories
460 VDIR ?= $(ARCH)/.obj/$(VDIR_PRJ)
461 VSHDIR ?= $(ARCH)/.shobj/$(VDIR_PRJ)
463 VDIR ?= .obj/$(VDIR_PRJ)
464 VSHDIR ?= .shobj/$(VDIR_PRJ)
467 # NOTE: VLDLIBS is defined below, in case it is overridden for static-
468 # or shared-only builds.
469 ifeq (default,$(origin YACC))
473 #----------------------------------------------------------------------------
474 # Platform-dependent macros that require platform_macros.GNU.
475 #----------------------------------------------------------------------------
484 LINK_OUTPUT_FLAG ?= -o
486 #----------------------------------------------------------------------------
488 #----------------------------------------------------------------------------
496 CCFLAGS += $(OCCFLAGS)
504 CPPFLAGS += -DACE_NDEBUG
507 CCFLAGS += $(DCCFLAGS)
516 CPPFLAGS += $(PLATFORM_DMALLOC_CPPFLAGS)
517 LDFLAGS += $(PLATFORM_DMALLOC_LDFLAGS)
518 LIBS += $(PLATFORM_DMALLOC_LIBS)
527 CPPFLAGS += $(PLATFORM_MTRACE_CPPFLAGS)
540 CPPFLAGS += -DACE_HAS_TRIO $(PLATFORM_TRIO_CPPFLAGS)
541 LDFLAGS += $(PLATFORM_TRIO_LDFLAGS)
542 LIBS += -ltrio $(PLATFORM_TRIO_LIBS)
543 ACE_MAKE_OPTIONS += trio
546 # ace_for_tao subsetting is disabled by default.
548 ifeq ($(ace_for_tao),0)
549 override ace_for_tao =
552 ifneq ($(ace_for_tao),)
553 ACE_MAKE_OPTIONS += ace_for_tao
564 override ace_xtreactor=1
565 override tao_xtresource=1
566 ACE_MAKE_OPTIONS += xt
577 override ace_flreactor=1
578 override tao_flresource=1
579 ACE_MAKE_OPTIONS += fl
590 override ace_tkreactor=1
591 override tao_tkresource=1
592 ACE_MAKE_OPTIONS += tk
602 override ace_qtreactor=1
603 override tao_qtresource=1
604 ACE_MAKE_OPTIONS += qt
608 ifeq ($(gtk_reactor),0)
609 override gtk_reactor =
612 ifneq ($(gtk_reactor),)
613 override ace_with_gtk=1
614 CPPFLAGS += -DACE_HAS_GTK $(PLATFORM_GTK_CPPFLAGS)
615 LIBS += $(PLATFORM_GTK_LIBS)
616 LDFLAGS += $(PLATFORM_GTK_LDFLAGS)
617 ACE_MAKE_OPTIONS += gtk_reactor
628 override ace_foxreactor=1
629 override tao_foxresource=1
630 ACE_MAKE_OPTIONS += fox
635 MOC = ${QTDIR}/bin/moc
646 CPPFLAGS += -DACE_HAS_RAPI $(PLATFORM_RAPI_CPPFLAGS)
647 LIBS += $(PLATFORM_RAPI_LIBS)
648 LDFLAGS += $(PLATFORM_RAPI_LDFLAGS)
649 ACE_MAKE_OPTIONS += rapi
657 # if any sctp implementation is present then add
659 CPPFLAGS += -DACE_HAS_SCTP $(PLATFORM_SCTP_CPPFLAGS)
660 LDFLAGS += $(PLATFORM_SCTP_LDFLAGS)
661 LIBS += $(PLATFORM_SCTP_LIBS)
662 ACE_MAKE_OPTIONS += sctp
671 ACE_MAKE_OPTIONS += gl
678 ifneq ($(SSL_ROOT), /usr)
680 ifneq ($(SSL_INCDIR),)
681 PLATFORM_SSL_CPPFLAGS += -I$(SSL_INCDIR)
683 PLATFORM_SSL_CPPFLAGS += -I$(SSL_ROOT)/include
685 ifneq ($(SSL_LIBDIR),)
686 PLATFORM_SSL_LDFLAGS += -L$(SSL_LIBDIR)
688 PLATFORM_SSL_LDFLAGS += -L$(SSL_ROOT)/lib
692 PLATFORM_SSL_LIBS ?= -lssl -lcrypto
693 ACE_MAKE_OPTIONS += ssl
696 ## These are related to MPC. When 'requires' is used in a project
697 ## it controls whether or not the project is generated. There is also
698 ## a second level of control in platform macros and thus requires
699 ## some features to be set here as well.
705 CPPFLAGS += -DACE_HAS_VALGRIND
706 # Does the valgrind version support --keep-debug-info, if not
707 # we disable dlclose in ACE to get complete callstacks
708 valgrind_keep_debuginfo ?=
709 ifeq ($(valgrind_keep_debuginfo),0)
710 CPPFLAGS += -DACE_LACKS_DLCLOSE
721 CCFLAGS += $(PCCFLAGS)
726 CPPFLAGS += -DACE_NO_INLINE
729 CPPFLAGS += -D__ACE_INLINE__
733 ifeq ($(shared_libs),0)
734 override shared_libs =
736 ifeq ($(static_libs),0)
737 override static_libs =
741 ifeq ($(shared_libs_only),0)
742 override shared_libs_only =
743 endif # shared_libs_only
746 ifeq ($(static_libs_only),0)
747 override static_libs_only =
748 endif # static_libs_only
750 ifdef shared_libs_only
751 ifdef static_libs_only
752 $(error Both static_libs_only and shared_libs_only defined.)
754 override shared_libs = 1
755 override static_libs =
757 endif # shared_libs_only
758 ifdef static_libs_only
759 override shared_libs =
760 override static_libs = 1
761 endif # static_libs_only
765 override shared_libs_only = 1
767 ACE_MAKE_OPTIONS += shared_libs
772 override static_libs_only = 1
774 ACE_MAKE_OPTIONS += static_libs
781 LDLIBS := $(LDLIBS:-l%=-l%shr)
782 ACE_SHLIBS := $(ACE_SHLIBS:-l%=-l%shr)
786 #### Don't build shared libs.
791 VLDLIBS = $(LDLIBS:%.so=%.o)
795 VLDLIBS = $(LDLIBS) $(LIBS)
803 CPPFLAGS += -DACE_COMPILE_TIMEPROBES
812 PURE_CACHE_BASE_DIR = /tmp/purifycache
813 PURE_CACHE_DIR = $(PURE_CACHE_BASE_DIR)-$(LOGNAME)-$(notdir $(CXX) )
815 #### Pick up Purify directory from the users PATH.
817 $(shell type purify | sed -e 's/.* is //' -e 's%/purify$$%%')
819 #### You might want to adjust the Purify options below.
820 #### -best-effort is undocumented but supported, and seems
821 #### to help avoid occasional link failure.
822 PURELINK += purify -best-effort -cache-dir=$(PURE_CACHE_DIR) \
823 -chain-length=20 -fds-inuse-at-exit=no \
824 -inuse-at-exit -max_threads=100 $(PLATFORM_PURIFY_OPTIONS)
825 CPPFLAGS += -DACE_HAS_PURIFY -I$(ACE_PURIFY_DIR)
834 #### Pick up Quantify directory from the users PATH.
835 ACE_QUANTIFY_DIR := \
836 $(shell type quantify | sed -e 's/.* is //' -e 's%/quantify$$%%')
838 #### You might want to adjust the Quantify options below.
839 #### -best-effort is undocumented but supported, and seems
840 #### to help avoid occasional link failure.
841 PURELINK += quantify -best-effort -cache-dir=$(PURE_CACHE_DIR) \
842 -max_threads=100 $(PLATFORM_QUANTIFY_OPTIONS)
843 CPPFLAGS += -DACE_HAS_QUANTIFY -I$(ACE_QUANTIFY_DIR)
852 #### Remove -fno-implicit-templates from, and add -frepo to, CCFLAGS.
853 CCFLAGS := $(strip $(subst -fno-implicit-templates,,$(CCFLAGS)))
855 CPPFLAGS += -DACE_HAS_GNU_REPO
856 # ace_lib_prelink := 1
859 # If pipes is not set, we default to 0
862 # If pipes is set to 1 then add the compiler flag -pipe. This uses pipe instead
863 # of intermediate files. This can be disabled by setting pipes to 0 in the
864 # platform_macros.GNU file.
869 # RMCast is turned on by default
872 ACE_MAKE_OPTIONS += rmcast
875 # If not explicitly is set that we don't have rwho, assume we have it.
878 # If not explicitly is set that we don't have stlport, assume we
882 CPPFLAGS += -DACE_HAS_STLPORT $(PLATFORM_STLPORT_CPPFLAGS)
883 CCFLAGS += $(PLATFORM_STLPORT_CCFLAGS)
884 LDFLAGS += $(PLATFORM_STLPORT_LDFLAGS)
885 LIBS += $(PLATFORM_STLPORT_LIBS)
888 # If not explicitly is set that we have wfmo, assume we don't have it.
891 # If not explicitly is set that we have winregistry, assume we don't have it.
894 # If not explicitly is set that we have winnt, assume we don't have it.
897 # In MPC, these are now features that are enabled by default.
906 # Icecream distributed compilation support
908 # check availability of icecc
909 ifneq ($(ICECC_ROOT),)
910 ICECC_PROG := $(ICECC_ROOT)/icecc
912 ICECC_PROG := $(shell which icecc 2>/dev/null)
914 ICECC_VERTEST := $(shell test -x "$(ICECC_PROG)" && $(ICECC_PROG) --version)
915 ifneq (ICECC,$(findstring ICECC,$(ICECC_VERTEST)))
916 # not good, try alternative install location
917 ICECC_PROG := /opt/icecream/bin/icecc
918 ICECC_VERTEST := $(shell test -x "$(ICECC_PROG)" && $(ICECC_PROG) --version)
919 ifneq (ICECC,$(findstring ICECC,$(ICECC_VERTEST)))
920 override icecream := 0
921 $(error Cannot locate valid Icecream compiler.)
925 # force LD and DLD to be 'normal' tools
927 override DLD := $(DLD)
928 # define tools that icecc should call for local jobs
931 export ICECC_CC ICECC_CXX
932 # let all compilation go through icecc
938 #----------------------------------------------------------------------------
939 # Conditional macro definitions
940 #----------------------------------------------------------------------------
948 PREPROCESS_SUFFIX ?= i
950 COMPILE.c = $(CC) $(CFLAGS) $(FLAGS_C_CC) $(CPPFLAGS) -c
951 COMPILE.cc = $(CXX) $(CCFLAGS) $(FLAGS_C_CC) $(CPPFLAGS) $(PTDIRS) -c
952 PREPROCESS.c ?= $(CC) $(PREPROCESS_OPT) $(CFLAGS) $(CPPFLAGS)
953 PREPROCESS.cc ?= $(CXX) $(PREPROCESS_OPT) $(CCFLAGS) $(CPPFLAGS)
956 COMPILE.rc = $(RC) $(RCFLAGS)
957 COMPILE-NO_DASH_G.cc = `echo $(COMPILE.cc) | sed 's/-g //'`
958 # 960905 Marius Kjeldahl <marius@funcom.com>
959 # Added the line below to be used for compiling executable shared objects
960 COMPILEESO.cc = $(CXX) $(CCFLAGS) $(FLAGS_C_CC) $(CPPFLAGS) $(PTDIRS)
962 ifeq ($(LINK.c),override)
963 LINK.c = $(LINK.c.override)
965 LINK.c = $(PURELINK) $(PRELINK) $(LD) $(CFLAGS) $(FLAGS_C_CC) $(CPPFLAGS) $(LDFLAGS) \
967 endif # LINK.c.override
969 ifeq ($(LINK.cc),override)
970 LINK.cc = $(LINK.cc.override)
972 LINK.cc = $(PURELINK) $(PRELINK) $(LD) $(CCFLAGS) $(FLAGS_C_CC) $(CPPFLAGS) $(PTDIRS)
973 endif # LINK.cc.override
975 ifeq ($(SOLINK.cc),override)
976 SOLINK.cc = $(SOLINK.cc.override)
978 SOLINK.cc = $(PRELINK) $(DLD) $(SOFLAGS)
979 endif # SOLINK.cc.override