3 # ***** BEGIN LICENSE BLOCK *****
4 # Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 # The contents of this file are subject to the Mozilla Public License Version
7 # 1.1 (the "License"); you may not use this file except in compliance with
8 # the License. You may obtain a copy of the License at
9 # http://www.mozilla.org/MPL/
11 # Software distributed under the License is distributed on an "AS IS" basis,
12 # WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 # for the specific language governing rights and limitations under the
16 # The Original Code is the Netscape Portable Runtime (NSPR).
18 # The Initial Developer of the Original Code is
19 # Netscape Communications Corporation.
20 # Portions created by the Initial Developer are Copyright (C) 1998-2000
21 # the Initial Developer. All Rights Reserved.
25 # Alternatively, the contents of this file may be used under the terms of
26 # either the GNU General Public License Version 2 or later (the "GPL"), or
27 # the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 # in which case the provisions of the GPL or the LGPL are applicable instead
29 # of those above. If you wish to allow use of your version of this file only
30 # under the terms of either the GPL or the LGPL, and not to allow others to
31 # use your version of this file under the terms of the MPL, indicate your
32 # decision by deleting the provisions above and replace them with the notice
33 # and other provisions required by the GPL or the LGPL. If you do not delete
34 # the provisions above, a recipient may use your version of this file under
35 # the terms of any one of the MPL, the GPL or the LGPL.
37 # ***** END LICENSE BLOCK *****
39 # Configuration information for building in the NSPR source module
41 # Define an include-at-most-once-flag
45 # The variable definitions in this file are inputs to NSPR's
46 # build system. This file, if present, is included at the
47 # beginning of config.mk.
56 topsrcdir
=$(MOD_DEPTH
)
63 NFSPWD
= $(MOD_DEPTH
)/config
/nfspwd
65 CFLAGS
= $(VISIBILITY_FLAGS
) $(CC_ONLY_FLAGS
) $(OPTIMIZER
)\
66 $(OS_CFLAGS
) $(XP_DEFINE
) $(DEFINES
) $(INCLUDES
) $(XCFLAGS
)
67 CCCFLAGS
= $(VISIBILITY_FLAGS
) $(CCC_ONLY_FLAGS
) $(OPTIMIZER
)\
68 $(OS_CFLAGS
) $(XP_DEFINE
) $(DEFINES
) $(INCLUDES
) $(XCFLAGS
)
70 NOMD_CFLAGS
= $(CC_ONLY_FLAGS
) $(OPTIMIZER
) $(NOMD_OS_CFLAGS
)\
71 $(XP_DEFINE
) $(DEFINES
) $(INCLUDES
) $(XCFLAGS
)
72 NOMD_CCFLAGS
= $(CCC_ONLY_FLAGS
) $(OPTIMIZER
) $(NOMD_OS_CFLAGS
)\
73 $(XP_DEFINE
) $(DEFINES
) $(INCLUDES
) $(XCFLAGS
)
75 LDFLAGS
= $(OS_LDFLAGS
)
78 if
test ! -d
$(@D
); then
rm -rf
$(@D
); $(NSINSTALL
) -D
$(@D
); fi
81 LINK_DLL
= $(LD
) $(OS_DLLFLAGS
) $(DLLFLAGS
)
83 ifeq ($(OS_ARCH
),Darwin
)
87 ifeq (,$(CROSS_COMPILE
)$(filter-out WINNT OS2
, $(OS_ARCH
)))
88 INSTALL
= $(NSINSTALL
)
90 ifeq ($(NSDISTMODE
),copy
)
91 # copy files, but preserve source mtime
92 INSTALL
= $(NSINSTALL
) -t
94 ifeq ($(NSDISTMODE
),absolute_symlink
)
95 # install using absolute symbolic links
96 ifeq ($(OS_ARCH
),Darwin
)
97 INSTALL
= $(NSINSTALL
) -L
$(PWD
)
99 INSTALL
= $(NSINSTALL
) -L
`$(NFSPWD)`
102 # install using relative symbolic links
103 INSTALL
= $(NSINSTALL
) -R
106 endif # (WINNT || OS2) && !CROSS_COMPILE
108 DEPENDENCIES
= $(OBJDIR
)/.md
111 DEFINES
+= -DDEBUG_GC
114 GARBAGE
+= $(DEPENDENCIES
) core
$(wildcard core.
[0-9]*)
116 DIST_GARBAGE
+= Makefile
118 ####################################################################
120 # The NSPR-specific configuration
122 ####################################################################
124 DEFINES
+= -DFORCE_PR_LOG
126 ifeq ($(_PR_NO_CLOCK_TIMER
),1)
127 DEFINES
+= -D_PR_NO_CLOCK_TIMER
130 ifeq ($(USE_PTHREADS
), 1)
131 DEFINES
+= -D_PR_PTHREADS
-UHAVE_CVAR_BUILT_ON_SEM
134 ifeq ($(PTHREADS_USER
), 1)
135 DEFINES
+= -DPTHREADS_USER
-UHAVE_CVAR_BUILT_ON_SEM
139 DEFINES
+= -D_PR_INET6
142 ifeq ($(MOZ_UNICODE
),1)
143 DEFINES
+= -DMOZ_UNICODE
146 ####################################################################
148 # Configuration for the release process
150 ####################################################################
153 ifeq ($(OS_ARCH
),WINNT
)
154 MDIST
= //helium
/dist
155 MDIST_DOS
= $(subst /,\\,$(MDIST
))
158 # RELEASE_DIR is ns/dist/<module name>
160 RELEASE_DIR
= $(MOD_DEPTH
)/dist/release
/$(MOD_NAME
)
162 RELEASE_INCLUDE_DIR
= $(RELEASE_DIR
)/$(BUILD_NUMBER
)/$(OBJDIR_NAME
)/include
163 RELEASE_BIN_DIR
= $(RELEASE_DIR
)/$(BUILD_NUMBER
)/$(OBJDIR_NAME
)/bin
164 RELEASE_LIB_DIR
= $(RELEASE_DIR
)/$(BUILD_NUMBER
)/$(OBJDIR_NAME
)/lib