security/nss/coreconf/ruleset.mk

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/security/nss/coreconf/ruleset.mk	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,216 @@
     1.4 +#
     1.5 +# This Source Code Form is subject to the terms of the Mozilla Public
     1.6 +# License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.8 +
     1.9 +#######################################################################
    1.10 +#                                                                     #
    1.11 +# Parameters to this makefile (set these in this file):               #
    1.12 +#                                                                     #
    1.13 +# a)                                                                  #
    1.14 +#	TARGETS	-- the target to create                               #
    1.15 +#			(defaults to $LIBRARY $PROGRAM)               #
    1.16 +# b)                                                                  #
    1.17 +#	DIRS	-- subdirectories for make to recurse on              #
    1.18 +#			(the 'all' rule builds $TARGETS $DIRS)        #
    1.19 +# c)                                                                  #
    1.20 +#	CSRCS, CPPSRCS -- .c and .cpp files to compile                #
    1.21 +#			(used to define $OBJS)                        #
    1.22 +# d)                                                                  #
    1.23 +#	PROGRAM	-- the target program name to create from $OBJS       #
    1.24 +#			($OBJDIR automatically prepended to it)       #
    1.25 +# e)                                                                  #
    1.26 +#	LIBRARY	-- the target library name to create from $OBJS       #
    1.27 +#			($OBJDIR automatically prepended to it)       #
    1.28 +# f)                                                                  #
    1.29 +#	JSRCS	-- java source files to compile into class files      #
    1.30 +#			(if you don't specify this it will default    #
    1.31 +#			 to *.java)                                   #
    1.32 +# g)                                                                  #
    1.33 +#	PACKAGE	-- the package to put the .class files into           #
    1.34 +#			(e.g. netscape/applet)                        #
    1.35 +#			(NOTE: the default definition for this may be #
    1.36 +#                              overridden if "jdk.mk" is included)    #
    1.37 +# h)                                                                  #
    1.38 +#	JMC_EXPORT -- java files to be exported for use by JMC_GEN    #
    1.39 +#			(this is a list of Class names)               #
    1.40 +# i)                                                                  #
    1.41 +#	JRI_GEN	-- files to run through javah to generate headers     #
    1.42 +#                  and stubs                                          #
    1.43 +#			(output goes into the _jri sub-dir)           #
    1.44 +# j)                                                                  #
    1.45 +#	JMC_GEN	-- files to run through jmc to generate headers       #
    1.46 +#                  and stubs                                          #
    1.47 +#			(output goes into the _jmc sub-dir)           #
    1.48 +# k)                                                                  #
    1.49 +#	JNI_GEN	-- files to run through javah to generate headers     #
    1.50 +#			(output goes into the _jni sub-dir)           #
    1.51 +#                                                                     #
    1.52 +#######################################################################
    1.53 +
    1.54 +#
    1.55 +# CPU_TAG is now defined in the $(TARGET).mk files
    1.56 +#
    1.57 +
    1.58 +ifndef COMPILER_TAG
    1.59 +    ifneq ($(DEFAULT_COMPILER), $(notdir $(firstword $(CC))))
    1.60 +#
    1.61 +# Temporary define for the Client; to be removed when binary release is used
    1.62 +#
    1.63 +	ifdef MOZILLA_CLIENT
    1.64 +	    COMPILER_TAG =
    1.65 +	else
    1.66 +	    COMPILER_TAG = _$(notdir $(firstword $(CC)))
    1.67 +	endif
    1.68 +    else
    1.69 +	COMPILER_TAG =
    1.70 +    endif
    1.71 +endif
    1.72 +
    1.73 +ifeq ($(MKPROG),)
    1.74 +    MKPROG = $(CC)
    1.75 +endif
    1.76 +
    1.77 +#
    1.78 +# This makefile contains rules for building the following kinds of
    1.79 +# objects:
    1.80 +# - (1) LIBRARY: a static (archival) library
    1.81 +# - (2) SHARED_LIBRARY: a shared (dynamic link) library
    1.82 +# - (3) IMPORT_LIBRARY: an import library, defined in $(OS_TARGET).mk
    1.83 +# - (4) PROGRAM: an executable binary
    1.84 +#
    1.85 +# NOTE:  The names of libraries can be generated by simply specifying
    1.86 +# LIBRARY_NAME (and LIBRARY_VERSION in the case of non-static libraries).
    1.87 +# LIBRARY and SHARED_LIBRARY may be defined differently in $(OS_TARGET).mk
    1.88 +#
    1.89 +
    1.90 +ifdef LIBRARY_NAME
    1.91 +    ifndef LIBRARY
    1.92 +	LIBRARY        = $(OBJDIR)/$(LIB_PREFIX)$(LIBRARY_NAME).$(LIB_SUFFIX)
    1.93 +    endif
    1.94 +    ifndef SHARED_LIBRARY
    1.95 +	SHARED_LIBRARY = $(OBJDIR)/$(DLL_PREFIX)$(LIBRARY_NAME)$(LIBRARY_VERSION)$(JDK_DEBUG_SUFFIX).$(DLL_SUFFIX)
    1.96 +    endif
    1.97 +    ifndef MAPFILE_SOURCE
    1.98 +	MAPFILE_SOURCE = $(LIBRARY_NAME).def
    1.99 +    endif
   1.100 +endif
   1.101 +
   1.102 +#
   1.103 +# Common rules used by lots of makefiles...
   1.104 +#
   1.105 +
   1.106 +ifdef PROGRAM
   1.107 +    PROGRAM := $(addprefix $(OBJDIR)/, $(PROGRAM)$(JDK_DEBUG_SUFFIX)$(PROG_SUFFIX))
   1.108 +endif
   1.109 +
   1.110 +ifdef PROGRAMS
   1.111 +    PROGRAMS := $(addprefix $(OBJDIR)/, $(PROGRAMS:%=%$(JDK_DEBUG_SUFFIX)$(PROG_SUFFIX)))
   1.112 +endif
   1.113 +
   1.114 +ifndef TARGETS
   1.115 +    TARGETS = $(LIBRARY) $(SHARED_LIBRARY) $(PROGRAM)
   1.116 +endif
   1.117 +
   1.118 +ifndef OBJS
   1.119 +    SIMPLE_OBJS = $(JRI_STUB_CFILES) \
   1.120 +		$(addsuffix $(OBJ_SUFFIX), $(JMC_GEN)) \
   1.121 +		$(CSRCS:.c=$(OBJ_SUFFIX)) \
   1.122 +		$(CPPSRCS:.cpp=$(OBJ_SUFFIX)) \
   1.123 +		$(ASFILES:$(ASM_SUFFIX)=$(OBJ_SUFFIX)) \
   1.124 +		$(BUILT_CSRCS:.c=$(OBJ_SUFFIX)) \
   1.125 +		$(BUILT_CPPSRCS:.cpp=$(OBJ_SUFFIX)) \
   1.126 +		$(BUILT_ASFILES:$(ASM_SUFFIX)=$(OBJ_SUFFIX))
   1.127 +    OBJS =	$(addprefix $(OBJDIR)/$(PROG_PREFIX), $(SIMPLE_OBJS))
   1.128 +endif
   1.129 +
   1.130 +ifndef BUILT_SRCS
   1.131 +    BUILT_SRCS = $(addprefix $(OBJDIR)/$(PROG_PREFIX), \
   1.132 +		 $(BUILT_CSRCS) $(BUILT_CPPSRCS) $(BUILT_ASFILES))
   1.133 +endif
   1.134 +
   1.135 +
   1.136 +ifeq (,$(filter-out WIN%,$(OS_TARGET)))
   1.137 +    MAKE_OBJDIR = $(INSTALL) -D $(OBJDIR)
   1.138 +else
   1.139 +    define MAKE_OBJDIR
   1.140 +	if test ! -d $(@D); then rm -rf $(@D); $(NSINSTALL) -D $(@D); fi
   1.141 +    endef
   1.142 +endif
   1.143 +
   1.144 +ifndef PACKAGE
   1.145 +    PACKAGE = .
   1.146 +endif
   1.147 +
   1.148 +ifdef NSBUILDROOT
   1.149 +    JDK_GEN_DIR  = $(SOURCE_XP_DIR)/_gen
   1.150 +    JMC_GEN_DIR  = $(SOURCE_XP_DIR)/_jmc
   1.151 +    JNI_GEN_DIR  = $(SOURCE_XP_DIR)/_jni
   1.152 +    JRI_GEN_DIR  = $(SOURCE_XP_DIR)/_jri
   1.153 +    JDK_STUB_DIR = $(SOURCE_XP_DIR)/_stubs
   1.154 +else
   1.155 +    JDK_GEN_DIR  = _gen
   1.156 +    JMC_GEN_DIR  = _jmc
   1.157 +    JNI_GEN_DIR  = _jni
   1.158 +    JRI_GEN_DIR  = _jri
   1.159 +    JDK_STUB_DIR = _stubs
   1.160 +endif
   1.161 +
   1.162 +ALL_TRASH =	$(TARGETS) $(OBJS) $(OBJDIR) LOGS TAGS $(GARBAGE) \
   1.163 +		so_locations $(BUILT_SRCS) $(NOSUCHFILE)
   1.164 +
   1.165 +ifdef NS_USE_JDK
   1.166 +    ALL_TRASH += $(JDK_HEADER_CFILES) $(JDK_STUB_CFILES) \
   1.167 +		 $(JMC_HEADERS) $(JMC_STUBS) $(JMC_EXPORT_FILES) \
   1.168 +		 $(JNI_HEADERS) \
   1.169 +		 $(JRI_HEADER_CFILES) $(JRI_STUB_CFILES) \
   1.170 +		 $(JDK_GEN_DIR) $(JMC_GEN_DIR) $(JNI_GEN_DIR) \
   1.171 +		 $(JRI_GEN_DIR) $(JDK_STUB_DIR)
   1.172 +
   1.173 +ifdef JAVA_DESTPATH
   1.174 +    ALL_TRASH += $(wildcard $(JAVA_DESTPATH)/$(PACKAGE)/*.class)
   1.175 +ifdef JDIRS
   1.176 +    ALL_TRASH += $(addprefix $(JAVA_DESTPATH)/,$(JDIRS))
   1.177 +endif
   1.178 +else # !JAVA_DESTPATH
   1.179 +    ALL_TRASH += $(wildcard $(PACKAGE)/*.class) $(JDIRS)
   1.180 +endif
   1.181 +
   1.182 +endif #NS_USE_JDK
   1.183 +
   1.184 +ifdef NSS_BUILD_CONTINUE_ON_ERROR
   1.185 +# Try to build everything. I.e., don't exit on errors.
   1.186 +    EXIT_ON_ERROR		= +e
   1.187 +    IGNORE_ERROR		= -
   1.188 +    CLICK_STOPWATCH		= date
   1.189 +else
   1.190 +    EXIT_ON_ERROR		= -e
   1.191 +    IGNORE_ERROR		=
   1.192 +    CLICK_STOPWATCH		= true
   1.193 +endif
   1.194 +
   1.195 +ifdef REQUIRES
   1.196 +    MODULE_INCLUDES := $(addprefix -I$(SOURCE_XP_DIR)/public/, $(REQUIRES))
   1.197 +    INCLUDES        += $(MODULE_INCLUDES)
   1.198 +    ifeq ($(MODULE), sectools)
   1.199 +	PRIVATE_INCLUDES := $(addprefix -I$(SOURCE_XP_DIR)/private/, $(REQUIRES))
   1.200 +	INCLUDES         += $(PRIVATE_INCLUDES)
   1.201 +    endif
   1.202 +endif
   1.203 +
   1.204 +ifdef SYSTEM_INCL_DIR
   1.205 +    YOPT = -Y$(SYSTEM_INCL_DIR)
   1.206 +endif
   1.207 +
   1.208 +ifdef DIRS
   1.209 +define SUBMAKE
   1.210 ++@echo "cd $2; $(MAKE) $1"
   1.211 +$(IGNORE_ERROR)@$(MAKE) -C $(2) $(1)
   1.212 +@$(CLICK_STOPWATCH)
   1.213 +
   1.214 +endef
   1.215 +
   1.216 +    LOOP_OVER_DIRS	= $(foreach dir,$(DIRS),$(call SUBMAKE,$@,$(dir)))
   1.217 +endif
   1.218 +
   1.219 +MK_RULESET = included

mercurial