nsprpub/config/config.mk

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/nsprpub/config/config.mk	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,169 @@
     1.4 +#! gmake
     1.5 +# 
     1.6 +# This Source Code Form is subject to the terms of the Mozilla Public
     1.7 +# License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.9 +
    1.10 +# Configuration information for building in the NSPR source module
    1.11 +
    1.12 +# Define an include-at-most-once-flag
    1.13 +NSPR_CONFIG_MK	= 1
    1.14 +
    1.15 +#
    1.16 +# The variable definitions in this file are inputs to NSPR's
    1.17 +# build system.  This file, if present, is included at the
    1.18 +# beginning of config.mk.
    1.19 +#
    1.20 +# For example:
    1.21 +#
    1.22 +# MOZ_OPTIMIZE=1
    1.23 +# USE_PTHREADS=1
    1.24 +# NS_USE_GCC=
    1.25 +#
    1.26 +ifndef topsrcdir
    1.27 +topsrcdir=$(MOD_DEPTH)
    1.28 +endif
    1.29 +
    1.30 +ifndef srcdir
    1.31 +srcdir=.
    1.32 +endif
    1.33 +
    1.34 +NFSPWD		= $(MOD_DEPTH)/config/nfspwd
    1.35 +
    1.36 +CFLAGS		= $(VISIBILITY_FLAGS) $(CC_ONLY_FLAGS) $(OPTIMIZER)\
    1.37 +		  $(OS_CFLAGS) $(XP_DEFINE) $(DEFINES) $(INCLUDES) $(XCFLAGS)
    1.38 +CCCFLAGS	= $(VISIBILITY_FLAGS) $(CCC_ONLY_FLAGS) $(OPTIMIZER)\
    1.39 +		  $(OS_CFLAGS) $(XP_DEFINE) $(DEFINES) $(INCLUDES) $(XCFLAGS)
    1.40 +# For purify
    1.41 +NOMD_CFLAGS	= $(CC_ONLY_FLAGS) $(OPTIMIZER) $(NOMD_OS_CFLAGS)\
    1.42 +		  $(XP_DEFINE) $(DEFINES) $(INCLUDES) $(XCFLAGS)
    1.43 +NOMD_CCFLAGS	= $(CCC_ONLY_FLAGS) $(OPTIMIZER) $(NOMD_OS_CFLAGS)\
    1.44 +		  $(XP_DEFINE) $(DEFINES) $(INCLUDES) $(XCFLAGS)
    1.45 +
    1.46 +LDFLAGS		= $(OS_LDFLAGS)
    1.47 +
    1.48 +# Enable profile-guided optimization
    1.49 +ifndef NO_PROFILE_GUIDED_OPTIMIZE
    1.50 +ifdef MOZ_PROFILE_GENERATE
    1.51 +CFLAGS += $(PROFILE_GEN_CFLAGS)
    1.52 +LDFLAGS += $(PROFILE_GEN_LDFLAGS)
    1.53 +DLLFLAGS += $(PROFILE_GEN_LDFLAGS)
    1.54 +ifeq (WINNT,$(OS_ARCH))
    1.55 +AR_FLAGS += -LTCG
    1.56 +endif
    1.57 +endif # MOZ_PROFILE_GENERATE
    1.58 +
    1.59 +ifdef MOZ_PROFILE_USE
    1.60 +CFLAGS += $(PROFILE_USE_CFLAGS)
    1.61 +LDFLAGS += $(PROFILE_USE_LDFLAGS)
    1.62 +DLLFLAGS += $(PROFILE_USE_LDFLAGS)
    1.63 +ifeq (WINNT,$(OS_ARCH))
    1.64 +AR_FLAGS += -LTCG
    1.65 +endif
    1.66 +endif # MOZ_PROFILE_USE
    1.67 +endif # NO_PROFILE_GUIDED_OPTIMIZE
    1.68 +
    1.69 +define MAKE_OBJDIR
    1.70 +if test ! -d $(@D); then rm -rf $(@D); $(NSINSTALL) -D $(@D); fi
    1.71 +endef
    1.72 +
    1.73 +LINK_DLL	= $(LD) $(OS_DLLFLAGS) $(DLLFLAGS)
    1.74 +
    1.75 +ifeq ($(OS_ARCH),Darwin)
    1.76 +PWD := $(shell pwd)
    1.77 +endif
    1.78 +
    1.79 +ifeq (,$(CROSS_COMPILE)$(filter-out WINNT OS2, $(OS_ARCH)))
    1.80 +INSTALL		= $(NSINSTALL)
    1.81 +else
    1.82 +ifeq ($(NSDISTMODE),copy)
    1.83 +# copy files, but preserve source mtime
    1.84 +INSTALL		= $(NSINSTALL) -t
    1.85 +else
    1.86 +ifeq ($(NSDISTMODE),absolute_symlink)
    1.87 +# install using absolute symbolic links
    1.88 +ifeq ($(OS_ARCH),Darwin)
    1.89 +INSTALL		= $(NSINSTALL) -L $(PWD)
    1.90 +else
    1.91 +INSTALL		= $(NSINSTALL) -L `$(NFSPWD)`
    1.92 +endif
    1.93 +else
    1.94 +# install using relative symbolic links
    1.95 +INSTALL		= $(NSINSTALL) -R
    1.96 +endif
    1.97 +endif
    1.98 +endif # (WINNT || OS2) && !CROSS_COMPILE
    1.99 +
   1.100 +DEPENDENCIES	= $(OBJDIR)/.md
   1.101 +
   1.102 +ifdef BUILD_DEBUG_GC
   1.103 +DEFINES		+= -DDEBUG_GC
   1.104 +endif
   1.105 +
   1.106 +GARBAGE		+= $(DEPENDENCIES) core $(wildcard core.[0-9]*)
   1.107 +
   1.108 +DIST_GARBAGE += Makefile
   1.109 +
   1.110 +####################################################################
   1.111 +#
   1.112 +# The NSPR-specific configuration
   1.113 +#
   1.114 +####################################################################
   1.115 +
   1.116 +DEFINES += -DFORCE_PR_LOG
   1.117 +
   1.118 +ifeq ($(_PR_NO_CLOCK_TIMER),1)
   1.119 +DEFINES += -D_PR_NO_CLOCK_TIMER
   1.120 +endif
   1.121 +
   1.122 +ifeq ($(USE_PTHREADS), 1)
   1.123 +DEFINES += -D_PR_PTHREADS -UHAVE_CVAR_BUILT_ON_SEM
   1.124 +endif
   1.125 +
   1.126 +ifeq ($(PTHREADS_USER), 1)
   1.127 +DEFINES += -DPTHREADS_USER -UHAVE_CVAR_BUILT_ON_SEM
   1.128 +endif
   1.129 +
   1.130 +ifeq ($(USE_IPV6),1)
   1.131 +DEFINES += -D_PR_INET6
   1.132 +endif
   1.133 +
   1.134 +ifeq ($(MOZ_UNICODE),1)
   1.135 +DEFINES += -DMOZ_UNICODE
   1.136 +endif
   1.137 +
   1.138 +####################################################################
   1.139 +#
   1.140 +# Configuration for the release process
   1.141 +#
   1.142 +####################################################################
   1.143 +
   1.144 +MDIST = /m/dist
   1.145 +ifeq ($(OS_ARCH),WINNT)
   1.146 +MDIST = //helium/dist
   1.147 +MDIST_DOS = $(subst /,\\,$(MDIST))
   1.148 +endif
   1.149 +
   1.150 +# RELEASE_DIR is ns/dist/<module name>
   1.151 +
   1.152 +RELEASE_DIR = $(MOD_DEPTH)/dist/release/$(MOD_NAME)
   1.153 +
   1.154 +RELEASE_INCLUDE_DIR = $(RELEASE_DIR)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/include
   1.155 +RELEASE_BIN_DIR = $(RELEASE_DIR)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/bin
   1.156 +RELEASE_LIB_DIR = $(RELEASE_DIR)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/lib
   1.157 +
   1.158 +# autoconf.mk sets OBJ_SUFFIX to an error to avoid use before including
   1.159 +# this file
   1.160 +OBJ_SUFFIX := $(_OBJ_SUFFIX)
   1.161 +
   1.162 +# PGO builds with GCC build objects with instrumentation in a first pass,
   1.163 +# then objects optimized, without instrumentation, in a second pass. If
   1.164 +# we overwrite the ojects from the first pass with those from the second,
   1.165 +# we end up not getting instrumentation data for better optimization on
   1.166 +# incremental builds. As a consequence, we use a different object suffix
   1.167 +# for the first pass.
   1.168 +ifdef MOZ_PROFILE_GENERATE
   1.169 +ifdef NS_USE_GCC
   1.170 +OBJ_SUFFIX := i_o
   1.171 +endif
   1.172 +endif

mercurial