Follow-on fix for bug 457825. Use sheet principal for agent and user sheets. r=dbaron...
[wine-gecko.git] / nsprpub / config / config.mk
blob10ebfdab1392507f2729b33059f754230738f771
1 #! gmake
2 #
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
14 # License.
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.
23 # Contributor(s):
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
42 NSPR_CONFIG_MK = 1
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.
49 # For example:
51 # BUILD_OPT=1
52 # USE_PTHREADS=1
53 # NS_USE_GCC=
55 ifndef topsrcdir
56 topsrcdir=$(MOD_DEPTH)
57 endif
59 ifndef srcdir
60 srcdir=.
61 endif
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)
69 # For purify
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)
77 define MAKE_OBJDIR
78 if test ! -d $(@D); then rm -rf $(@D); $(NSINSTALL) -D $(@D); fi
79 endef
81 LINK_DLL = $(LD) $(OS_DLLFLAGS) $(DLLFLAGS)
83 ifeq ($(OS_ARCH),Darwin)
84 PWD := $(shell pwd)
85 endif
87 ifeq (,$(CROSS_COMPILE)$(filter-out WINNT OS2, $(OS_ARCH)))
88 INSTALL = $(NSINSTALL)
89 else
90 ifeq ($(NSDISTMODE),copy)
91 # copy files, but preserve source mtime
92 INSTALL = $(NSINSTALL) -t
93 else
94 ifeq ($(NSDISTMODE),absolute_symlink)
95 # install using absolute symbolic links
96 ifeq ($(OS_ARCH),Darwin)
97 INSTALL = $(NSINSTALL) -L $(PWD)
98 else
99 INSTALL = $(NSINSTALL) -L `$(NFSPWD)`
100 endif
101 else
102 # install using relative symbolic links
103 INSTALL = $(NSINSTALL) -R
104 endif
105 endif
106 endif # (WINNT || OS2) && !CROSS_COMPILE
108 DEPENDENCIES = $(OBJDIR)/.md
110 ifdef BUILD_DEBUG_GC
111 DEFINES += -DDEBUG_GC
112 endif
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
128 endif
130 ifeq ($(USE_PTHREADS), 1)
131 DEFINES += -D_PR_PTHREADS -UHAVE_CVAR_BUILT_ON_SEM
132 endif
134 ifeq ($(PTHREADS_USER), 1)
135 DEFINES += -DPTHREADS_USER -UHAVE_CVAR_BUILT_ON_SEM
136 endif
138 ifeq ($(USE_IPV6),1)
139 DEFINES += -D_PR_INET6
140 endif
142 ifeq ($(MOZ_UNICODE),1)
143 DEFINES += -DMOZ_UNICODE
144 endif
146 ####################################################################
148 # Configuration for the release process
150 ####################################################################
152 MDIST = /m/dist
153 ifeq ($(OS_ARCH),WINNT)
154 MDIST = //helium/dist
155 MDIST_DOS = $(subst /,\\,$(MDIST))
156 endif
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