~ubuntu-branches/ubuntu/gutsy/virtualbox-ose/gutsy

« back to all changes in this revision

Viewing changes to src/libs/xpcom18a4/nsprpub/pr/src/Makefile.in

  • Committer: Bazaar Package Importer
  • Author(s): Steve Kowalik
  • Date: 2007-09-08 16:44:58 UTC
  • Revision ID: james.westby@ubuntu.com-20070908164458-wao29470vqtr8ksy
Tags: upstream-1.5.0-dfsg2
ImportĀ upstreamĀ versionĀ 1.5.0-dfsg2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
2
# ***** BEGIN LICENSE BLOCK *****
 
3
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
 
4
#
 
5
# The contents of this file are subject to the Mozilla Public License Version
 
6
# 1.1 (the "License"); you may not use this file except in compliance with
 
7
# the License. You may obtain a copy of the License at
 
8
# http://www.mozilla.org/MPL/
 
9
#
 
10
# Software distributed under the License is distributed on an "AS IS" basis,
 
11
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 
12
# for the specific language governing rights and limitations under the
 
13
# License.
 
14
#
 
15
# The Original Code is the Netscape Portable Runtime (NSPR).
 
16
#
 
17
# The Initial Developer of the Original Code is
 
18
# Netscape Communications Corporation.
 
19
# Portions created by the Initial Developer are Copyright (C) 1998-2000
 
20
# the Initial Developer. All Rights Reserved.
 
21
#
 
22
# Contributor(s):
 
23
#
 
24
# Alternatively, the contents of this file may be used under the terms of
 
25
# either the GNU General Public License Version 2 or later (the "GPL"), or
 
26
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 
27
# in which case the provisions of the GPL or the LGPL are applicable instead
 
28
# of those above. If you wish to allow use of your version of this file only
 
29
# under the terms of either the GPL or the LGPL, and not to allow others to
 
30
# use your version of this file under the terms of the MPL, indicate your
 
31
# decision by deleting the provisions above and replace them with the notice
 
32
# and other provisions required by the GPL or the LGPL. If you do not delete
 
33
# the provisions above, a recipient may use your version of this file under
 
34
# the terms of any one of the MPL, the GPL or the LGPL.
 
35
#
 
36
# ***** END LICENSE BLOCK *****
 
37
 
 
38
#! gmake
 
39
 
 
40
MOD_DEPTH       = ../..
 
41
topsrcdir       = @top_srcdir@
 
42
srcdir          = @srcdir@
 
43
VPATH           = @srcdir@
 
44
 
 
45
include $(MOD_DEPTH)/config/autoconf.mk
 
46
 
 
47
include $(topsrcdir)/config/config.mk
 
48
 
 
49
DIRS = io linking malloc md memory misc threads
 
50
 
 
51
# For VAC++ 4 geticcdata rule in config/OS2.mk
 
52
ifeq ($(MOZ_OS2_TOOLS),VACPP)
 
53
CSRCS = prvrsion.c
 
54
endif
 
55
 
 
56
ifeq ($(USE_PTHREADS), 1)
 
57
        DIRS += pthreads
 
58
endif
 
59
 
 
60
ifeq ($(USE_BTHREADS), 1)
 
61
        DIRS += bthreads
 
62
endif
 
63
 
 
64
ifeq ($(USE_CPLUS), 1)
 
65
        DIRS += cplus
 
66
endif
 
67
 
 
68
#
 
69
# Define platform-dependent OS_LIBS
 
70
#
 
71
 
 
72
ifeq ($(OS_ARCH),SunOS)
 
73
ifeq ($(OS_RELEASE),4.1.3_U1)
 
74
OS_LIBS                 = -lm
 
75
else    # 4.1.3_U1
 
76
MAPFILE = $(OBJDIR)/nsprmap.sun
 
77
GARBAGE += $(MAPFILE)
 
78
ifdef NS_USE_GCC
 
79
ifdef GCC_USE_GNU_LD
 
80
MKSHLIB += -Wl,--version-script,$(MAPFILE)
 
81
else
 
82
MKSHLIB += -Wl,-M,$(MAPFILE)
 
83
endif
 
84
else
 
85
MKSHLIB += -M $(MAPFILE)
 
86
endif
 
87
#
 
88
# In Solaris 2.6 or earlier, -lrt is called -lposix4.
 
89
 
90
LIBRT_TEST=$(firstword $(sort 5.7 $(OS_RELEASE)))
 
91
ifeq (5.7, $(LIBRT_TEST))
 
92
LIBRT=-lrt
 
93
else
 
94
LIBRT=-lposix4
 
95
endif
 
96
 
 
97
ifdef USE_PTHREADS
 
98
OS_LIBS                 = -lpthread -lthread ${LIBRT} -lsocket -lnsl -ldl -lc
 
99
else
 
100
ifdef LOCAL_THREADS_ONLY
 
101
OS_LIBS                 = -lsocket -lnsl -ldl -lc
 
102
else
 
103
OS_LIBS                 = -lthread ${LIBRT} -lsocket -lnsl -ldl -lc
 
104
endif   # LOCAL_THREADS_ONLY
 
105
endif   # USE_PTHREADS
 
106
ifeq ($(OS_TEST),sun4u)
 
107
ifndef USE_64
 
108
DSO_LDOPTS      += -Wl,-f,\$$ORIGIN/cpu/\$$ISALIST/lib$(ULTRASPARC_LIBRARY)$(LIBRARY_VERSION).so
 
109
endif
 
110
endif   # sun4u
 
111
endif   # 4.1.3_U1
 
112
endif   # SunOS
 
113
 
 
114
ifeq ($(OS_ARCH), IRIX)
 
115
ifeq ($(USE_PTHREADS), 1)
 
116
OS_LIBS = -lpthread
 
117
endif
 
118
OS_LIBS += -lc
 
119
endif
 
120
 
 
121
ifeq ($(OS_ARCH),AIX)
 
122
ifeq ($(CLASSIC_NSPR),1)
 
123
ifeq ($(OS_RELEASE),4.1)
 
124
OS_LIBS         = -lsvld -lc
 
125
else
 
126
OS_LIBS         = -ldl -lc
 
127
endif
 
128
else
 
129
ifeq ($(OS_RELEASE),4.1)
 
130
OS_LIBS         = -lpthreads -lsvld -lC_r -lC -lc_r -lm /usr/lib/libc.a
 
131
else
 
132
OS_LIBS         = -lpthreads -ldl -lC_r -lC -lc_r -lm /usr/lib/libc.a
 
133
endif
 
134
endif
 
135
endif
 
136
 
 
137
# On AIX, we override malloc in non-pthread versions.  On AIX 4.2 or
 
138
# above, this requires that we use the rtl-enabled version of libc.a.
 
139
ifeq ($(OS_ARCH),AIX)
 
140
ifneq (,$(filter-out 3.2 4.1,$(OS_RELEASE)))
 
141
ifneq ($(USE_PTHREADS),1)
 
142
BUILD_AIX_RTL_LIBC = 1
 
143
AIX_RTL_LIBC    = $(OBJDIR)/libc.a
 
144
endif
 
145
endif
 
146
endif
 
147
 
 
148
ifeq ($(OS_ARCH),OS2)
 
149
MAPFILE = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).def
 
150
ADD_TO_DEF_FILE = cat $(srcdir)/os2extra.def >> $(MAPFILE)
 
151
GARBAGE += $(MAPFILE)
 
152
MKSHLIB += $(MAPFILE)
 
153
endif
 
154
 
 
155
ifeq ($(OS_ARCH),OSF1)
 
156
ifeq ($(USE_PTHREADS), 1)
 
157
OS_LIBS         = -lpthread -lrt
 
158
endif
 
159
ifneq ($(OS_RELEASE),V2.0)
 
160
OS_LIBS         += -lc_r
 
161
endif
 
162
endif
 
163
 
 
164
ifeq ($(OS_ARCH),Linux)
 
165
ifeq ($(USE_PTHREADS), 1)
 
166
OS_LIBS         = -lpthread -ldl
 
167
else
 
168
OS_LIBS         = -ldl
 
169
endif
 
170
endif
 
171
 
 
172
ifeq ($(OS_ARCH),HP-UX)
 
173
ifeq ($(USE_PTHREADS), 1)
 
174
ifeq (,$(filter-out B.10.10 B.10.20,$(OS_RELEASE)))
 
175
OS_LIBS         = -ldce
 
176
else
 
177
OS_LIBS         = -lpthread -lrt
 
178
endif
 
179
endif
 
180
ifeq ($(PTHREADS_USER), 1)
 
181
OS_LIBS         = -lpthread
 
182
endif
 
183
ifeq ($(basename $(OS_RELEASE)),A.09)
 
184
OS_LIBS         += -ldld -L/lib/pa1.1 -lm
 
185
else
 
186
OS_LIBS         += -ldld -lm -lc
 
187
endif
 
188
endif
 
189
 
 
190
ifeq ($(OS_ARCH),UNIXWARE)
 
191
OS_LIBS         = -lsocket -lc
 
192
endif
 
193
 
 
194
ifeq ($(OS_ARCH),NEWS-OS)
 
195
OS_LIBS         = -lsocket -lnsl -lgen -lresolv
 
196
endif
 
197
 
 
198
ifeq ($(OS_ARCH),WINNT)
 
199
ifdef NS_USE_GCC
 
200
OS_LIBS         = -ladvapi32 -lwsock32
 
201
else
 
202
OS_LIBS         = advapi32.lib wsock32.lib
 
203
endif
 
204
endif
 
205
 
 
206
ifeq ($(OS_TARGET),MacOSX)
 
207
OS_LIBS         = -framework CoreServices -framework CoreFoundation
 
208
endif
 
209
 
 
210
ifdef GC_LEAK_DETECTOR
 
211
EXTRA_LIBS      = -L$(dist_libdir) -lboehm
 
212
endif
 
213
 
 
214
EXTRA_LIBS += $(OS_LIBS)
 
215
 
 
216
#
 
217
# Define platform-dependent OBJS
 
218
#
 
219
 
 
220
OBJS = \
 
221
    $(OBJDIR)/prvrsion.$(OBJ_SUFFIX) \
 
222
    io/$(OBJDIR)/prfdcach.$(OBJ_SUFFIX) \
 
223
    io/$(OBJDIR)/prmwait.$(OBJ_SUFFIX) \
 
224
    io/$(OBJDIR)/prmapopt.$(OBJ_SUFFIX) \
 
225
    io/$(OBJDIR)/priometh.$(OBJ_SUFFIX) \
 
226
    io/$(OBJDIR)/pripv6.$(OBJ_SUFFIX) \
 
227
    io/$(OBJDIR)/prlayer.$(OBJ_SUFFIX) \
 
228
    io/$(OBJDIR)/prlog.$(OBJ_SUFFIX) \
 
229
    io/$(OBJDIR)/prmmap.$(OBJ_SUFFIX) \
 
230
    io/$(OBJDIR)/prpolevt.$(OBJ_SUFFIX) \
 
231
    io/$(OBJDIR)/prprf.$(OBJ_SUFFIX) \
 
232
    io/$(OBJDIR)/prscanf.$(OBJ_SUFFIX) \
 
233
    io/$(OBJDIR)/prstdio.$(OBJ_SUFFIX) \
 
234
    threads/$(OBJDIR)/prcmon.$(OBJ_SUFFIX) \
 
235
        threads/$(OBJDIR)/prrwlock.$(OBJ_SUFFIX) \
 
236
        threads/$(OBJDIR)/prtpd.$(OBJ_SUFFIX) \
 
237
    linking/$(OBJDIR)/prlink.$(OBJ_SUFFIX) \
 
238
    malloc/$(OBJDIR)/prmem.$(OBJ_SUFFIX) \
 
239
    md/$(OBJDIR)/prosdep.$(OBJ_SUFFIX) \
 
240
    memory/$(OBJDIR)/prshm.$(OBJ_SUFFIX) \
 
241
    memory/$(OBJDIR)/prshma.$(OBJ_SUFFIX) \
 
242
    memory/$(OBJDIR)/prseg.$(OBJ_SUFFIX) \
 
243
    misc/$(OBJDIR)/pralarm.$(OBJ_SUFFIX) \
 
244
    misc/$(OBJDIR)/pratom.$(OBJ_SUFFIX) \
 
245
    misc/$(OBJDIR)/prcountr.$(OBJ_SUFFIX) \
 
246
    misc/$(OBJDIR)/prdtoa.$(OBJ_SUFFIX) \
 
247
    misc/$(OBJDIR)/prenv.$(OBJ_SUFFIX) \
 
248
    misc/$(OBJDIR)/prerr.$(OBJ_SUFFIX) \
 
249
    misc/$(OBJDIR)/prerror.$(OBJ_SUFFIX) \
 
250
    misc/$(OBJDIR)/prerrortable.$(OBJ_SUFFIX) \
 
251
    misc/$(OBJDIR)/prinit.$(OBJ_SUFFIX) \
 
252
    misc/$(OBJDIR)/prinrval.$(OBJ_SUFFIX) \
 
253
    misc/$(OBJDIR)/pripc.$(OBJ_SUFFIX) \
 
254
    misc/$(OBJDIR)/prlog2.$(OBJ_SUFFIX) \
 
255
    misc/$(OBJDIR)/prlong.$(OBJ_SUFFIX) \
 
256
    misc/$(OBJDIR)/prnetdb.$(OBJ_SUFFIX) \
 
257
    misc/$(OBJDIR)/prolock.$(OBJ_SUFFIX)         \
 
258
    misc/$(OBJDIR)/prrng.$(OBJ_SUFFIX)   \
 
259
    misc/$(OBJDIR)/prsystem.$(OBJ_SUFFIX) \
 
260
    misc/$(OBJDIR)/prthinfo.$(OBJ_SUFFIX) \
 
261
    misc/$(OBJDIR)/prtpool.$(OBJ_SUFFIX) \
 
262
    misc/$(OBJDIR)/prtrace.$(OBJ_SUFFIX) \
 
263
    misc/$(OBJDIR)/prtime.$(OBJ_SUFFIX)
 
264
 
 
265
# ilib now rejects empty objects
 
266
ifneq ($(MOZ_OS2_TOOLS),VACPP)
 
267
OBJS += malloc/$(OBJDIR)/prmalloc.$(OBJ_SUFFIX)
 
268
endif
 
269
 
 
270
ifdef USE_PTHREADS
 
271
OBJS += \
 
272
    pthreads/$(OBJDIR)/ptsynch.$(OBJ_SUFFIX) \
 
273
    pthreads/$(OBJDIR)/ptio.$(OBJ_SUFFIX) \
 
274
    pthreads/$(OBJDIR)/ptthread.$(OBJ_SUFFIX) \
 
275
    pthreads/$(OBJDIR)/ptmisc.$(OBJ_SUFFIX)
 
276
else
 
277
OBJS += \
 
278
    io/$(OBJDIR)/prdir.$(OBJ_SUFFIX) \
 
279
    io/$(OBJDIR)/prfile.$(OBJ_SUFFIX) \
 
280
    io/$(OBJDIR)/prio.$(OBJ_SUFFIX) \
 
281
    io/$(OBJDIR)/prsocket.$(OBJ_SUFFIX) \
 
282
    misc/$(OBJDIR)/pripcsem.$(OBJ_SUFFIX)
 
283
 
 
284
ifndef USE_BTHREADS
 
285
OBJS += \
 
286
        threads/$(OBJDIR)/prcthr.$(OBJ_SUFFIX) \
 
287
        threads/$(OBJDIR)/prdump.$(OBJ_SUFFIX) \
 
288
        threads/$(OBJDIR)/prmon.$(OBJ_SUFFIX) \
 
289
        threads/$(OBJDIR)/prsem.$(OBJ_SUFFIX) \
 
290
        threads/combined/$(OBJDIR)/prucpu.$(OBJ_SUFFIX) \
 
291
        threads/combined/$(OBJDIR)/prucv.$(OBJ_SUFFIX) \
 
292
        threads/combined/$(OBJDIR)/prulock.$(OBJ_SUFFIX) \
 
293
        threads/combined/$(OBJDIR)/prustack.$(OBJ_SUFFIX) \
 
294
        threads/combined/$(OBJDIR)/pruthr.$(OBJ_SUFFIX)
 
295
endif
 
296
 
 
297
endif
 
298
 
 
299
ifeq ($(USE_CPLUS), 1)
 
300
OBJS += \
 
301
        cplus/$(OBJDIR)/rcbase.$(OBJ_SUFFIX) \
 
302
        cplus/$(OBJDIR)/rccv.$(OBJ_SUFFIX) \
 
303
        cplus/$(OBJDIR)/rcfileio.$(OBJ_SUFFIX) \
 
304
        cplus/$(OBJDIR)/rcinrval.$(OBJ_SUFFIX) \
 
305
        cplus/$(OBJDIR)/rcio.$(OBJ_SUFFIX) \
 
306
        cplus/$(OBJDIR)/rclock.$(OBJ_SUFFIX) \
 
307
        cplus/$(OBJDIR)/rcnetdb.$(OBJ_SUFFIX) \
 
308
        cplus/$(OBJDIR)/rcnetio.$(OBJ_SUFFIX) \
 
309
        cplus/$(OBJDIR)/rcthread.$(OBJ_SUFFIX) \
 
310
        cplus/$(OBJDIR)/rctime.$(OBJ_SUFFIX)
 
311
endif
 
312
 
 
313
ifdef GC_LEAK_DETECTOR
 
314
OBJS += memory/$(OBJDIR)/prgcleak.$(OBJ_SUFFIX)
 
315
endif
 
316
 
 
317
ifeq ($(OS_ARCH), WINNT)
 
318
ifdef NS_USE_GCC
 
319
DLLBASE=-Wl,--image-base -Wl,0x30000000
 
320
else
 
321
DLLBASE=/BASE:0x30000000
 
322
endif # GCC
 
323
RES=$(OBJDIR)/nspr.res
 
324
RESNAME=nspr.rc
 
325
endif # WINNT
 
326
 
 
327
include $(srcdir)/md/$(PR_MD_ARCH_DIR)/objs.mk
 
328
ifdef USE_BTHREADS
 
329
include $(srcdir)/bthreads/objs.mk
 
330
endif
 
331
 
 
332
LIBRARY_NAME = nspr
 
333
LIBRARY_VERSION = $(MOD_MAJOR_VERSION)
 
334
 
 
335
RELEASE_LIBS = $(TARGETS)
 
336
 
 
337
include $(topsrcdir)/config/rules.mk
 
338
 
 
339
ifeq ($(BUILD_AIX_RTL_LIBC),1)
 
340
TARGETS         += $(AIX_RTL_LIBC)
 
341
# XXX is this a shared library?
 
342
endif
 
343
 
 
344
#
 
345
# Version information generation (begin)
 
346
#
 
347
ECHO = echo
 
348
INCLUDES = -I$(dist_includedir) -I$(topsrcdir)/pr/include -I$(topsrcdir)/pr/include/private
 
349
TINC = $(OBJDIR)/_pr_bld.h
 
350
 
 
351
ifeq ($(OS_TARGET),OS2)
 
352
PROD = nspr$(MOD_MAJOR_VERSION).$(DLL_SUFFIX)
 
353
else
 
354
PROD = $(notdir $(SHARED_LIBRARY))
 
355
endif
 
356
 
 
357
NOW = $(MOD_DEPTH)/config/$(OBJDIR)/now
 
358
SH_DATE = $(shell date "+%Y-%m-%d %T")
 
359
SH_NOW = $(shell $(NOW))
 
360
 
 
361
ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
 
362
        SUF = i64
 
363
else
 
364
        SUF = LL
 
365
endif
 
366
 
 
367
DEFINES         += -D_NSPR_BUILD_
 
368
 
 
369
GARBAGE += $(TINC)
 
370
 
 
371
$(TINC):
 
372
        @$(MAKE_OBJDIR)
 
373
        @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC)
 
374
        @if test ! -z "$(SH_NOW)"; then \
 
375
            $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \
 
376
        else \
 
377
            true; \
 
378
        fi
 
379
        @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC)
 
380
 
 
381
 
 
382
$(OBJDIR)/prvrsion.$(OBJ_SUFFIX): prvrsion.c $(TINC)
 
383
ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
 
384
        $(CC) -Fo$@ -c $(CFLAGS) -I$(OBJDIR) $<
 
385
else
 
386
ifeq ($(MOZ_OS2_TOOLS), VACPP)
 
387
        $(CC) -Fo$@ -c $(CFLAGS) -I$(OBJDIR) $<
 
388
else
 
389
        $(CC) -o $@ -c $(CFLAGS) -I$(OBJDIR) $<
 
390
endif
 
391
endif
 
392
#
 
393
# Version information generation (end)
 
394
#
 
395
 
 
396
 
 
397
#
 
398
# The Client build wants the shared libraries in $(dist_bindir)
 
399
# so we also install them there.
 
400
#
 
401
 
 
402
export:: $(TARGETS)
 
403
        $(INSTALL) -m 444 $(TARGETS) $(dist_libdir)
 
404
ifdef SHARED_LIBRARY
 
405
ifeq ($(OS_ARCH),HP-UX)
 
406
        $(INSTALL) -m 755 $(SHARED_LIBRARY) $(dist_libdir)
 
407
        $(INSTALL) -m 755 $(SHARED_LIBRARY) $(dist_bindir)
 
408
else
 
409
        $(INSTALL) -m 444 $(SHARED_LIBRARY) $(dist_bindir)
 
410
endif
 
411
endif
 
412
ifeq ($(MOZ_BITS),16)
 
413
        $(INSTALL) -m 444 $(TARGETS) $(MOZ_DIST)/lib
 
414
        $(INSTALL) -m 444 $(TARGETS) $(MOZ_DIST)/bin
 
415
endif
 
416
 
 
417
ifeq ($(BUILD_AIX_RTL_LIBC),1)
 
418
$(AIX_RTL_LIBC): /usr/ccs/lib/libc.a
 
419
        rtl_enable -o $@ $<
 
420
endif
 
421
 
 
422