~ubuntu-branches/ubuntu/saucy/nspr/saucy-updates

« back to all changes in this revision

Viewing changes to .pc/sonames.patch/mozilla/nsprpub/config/rules.mk

  • Committer: Package Import Robot
  • Author(s): Timo Aaltonen
  • Date: 2012-11-27 17:39:22 UTC
  • mfrom: (1.1.15) (27.1.1 raring-proposed)
  • Revision ID: package-import@ubuntu.com-20121127173922-1zfbtwmy1vczqwxq
Tags: 2:4.9.3-1ubuntu1
* Merge from Debian unstable.  Remaining changes:
  - rules: Enable Thumb2 build on armel, armhf.
  - control: Change Vcs-* to XS-Debian-Vcs-*.
  - control: Add conflicts to evolution-documentation-*,
    language-support-translation-*.
  - control: Add Breaks: evolution-plugins.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! gmake
2
 
3
 
# ***** BEGIN LICENSE BLOCK *****
4
 
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
5
 
#
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/
10
 
#
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.
15
 
#
16
 
# The Original Code is the Netscape Portable Runtime (NSPR).
17
 
#
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.
22
 
#
23
 
# Contributor(s):
24
 
#
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.
36
 
#
37
 
# ***** END LICENSE BLOCK *****
38
 
 
39
 
################################################################################
40
 
# We used to have a 4 pass build process.  Now we do everything in one pass.
41
 
#
42
 
# export - Create generated headers and stubs. Publish public headers to
43
 
#          dist/<arch>/include.
44
 
#          Create libraries. Publish libraries to dist/<arch>/lib.
45
 
#          Create programs. 
46
 
#
47
 
# libs - obsolete.  Now a synonym of "export".
48
 
#
49
 
# all - the default makefile target.  Now a synonym of "export".
50
 
#
51
 
# install - Install headers, libraries, and programs on the system.
52
 
#
53
 
# Parameters to this makefile (set these before including):
54
 
#
55
 
# a)
56
 
#       TARGETS -- the target to create 
57
 
#                       (defaults to $LIBRARY $PROGRAM)
58
 
# b)
59
 
#       DIRS    -- subdirectories for make to recurse on
60
 
#                       (the 'all' rule builds $TARGETS $DIRS)
61
 
# c)
62
 
#       CSRCS   -- .c files to compile
63
 
#                       (used to define $OBJS)
64
 
# d)
65
 
#       PROGRAM -- the target program name to create from $OBJS
66
 
#                       ($OBJDIR automatically prepended to it)
67
 
# e)
68
 
#       LIBRARY -- the target library name to create from $OBJS
69
 
#                       ($OBJDIR automatically prepended to it)
70
 
#
71
 
################################################################################
72
 
 
73
 
ifndef topsrcdir
74
 
topsrcdir=$(MOD_DEPTH)
75
 
endif
76
 
 
77
 
ifndef srcdir
78
 
srcdir=.
79
 
endif
80
 
 
81
 
ifndef NSPR_CONFIG_MK
82
 
include $(topsrcdir)/config/config.mk
83
 
endif
84
 
 
85
 
ifdef USE_AUTOCONF
86
 
ifdef CROSS_COMPILE
87
 
ifdef INTERNAL_TOOLS
88
 
CC=$(HOST_CC)
89
 
CCC=$(HOST_CXX)
90
 
CFLAGS=$(HOST_CFLAGS)
91
 
CXXFLAGS=$(HOST_CXXFLAGS)
92
 
LDFLAGS=$(HOST_LDFLAGS)
93
 
endif
94
 
endif
95
 
endif
96
 
 
97
 
#
98
 
# This makefile contains rules for building the following kinds of
99
 
# libraries:
100
 
# - LIBRARY: a static (archival) library
101
 
# - SHARED_LIBRARY: a shared (dynamic link) library
102
 
# - IMPORT_LIBRARY: an import library, used only on Windows and OS/2
103
 
#
104
 
# The names of these libraries can be generated by simply specifying
105
 
# LIBRARY_NAME and LIBRARY_VERSION.
106
 
#
107
 
 
108
 
ifdef LIBRARY_NAME
109
 
ifeq (,$(filter-out WINNT WINCE OS2,$(OS_ARCH)))
110
 
 
111
 
#
112
 
# Win95 and OS/2 require library names conforming to the 8.3 rule.
113
 
# other platforms do not.
114
 
#
115
 
ifeq (,$(filter-out WIN95 WINCE WINMO OS2,$(OS_TARGET)))
116
 
LIBRARY         = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)_s.$(LIB_SUFFIX)
117
 
SHARED_LIBRARY  = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
118
 
IMPORT_LIBRARY  = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).$(LIB_SUFFIX)
119
 
SHARED_LIB_PDB  = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).pdb
120
 
else
121
 
LIBRARY         = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION)_s.$(LIB_SUFFIX)
122
 
SHARED_LIBRARY  = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
123
 
IMPORT_LIBRARY  = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(LIB_SUFFIX)
124
 
SHARED_LIB_PDB  = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).pdb
125
 
endif
126
 
 
127
 
else
128
 
 
129
 
LIBRARY         = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(LIB_SUFFIX)
130
 
ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.1)
131
 
SHARED_LIBRARY  = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION)_shr.a
132
 
else
133
 
ifdef MKSHLIB
134
 
SHARED_LIBRARY  = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
135
 
endif
136
 
endif
137
 
 
138
 
endif
139
 
endif
140
 
 
141
 
ifndef TARGETS
142
 
ifeq (,$(filter-out WINNT WINCE OS2,$(OS_ARCH)))
143
 
TARGETS         = $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY)
144
 
ifdef MOZ_DEBUG_SYMBOLS
145
 
ifdef MSC_VER
146
 
ifneq (,$(filter-out 1100 1200,$(MSC_VER)))
147
 
TARGETS         += $(SHARED_LIB_PDB)
148
 
endif
149
 
endif
150
 
endif
151
 
else
152
 
TARGETS         = $(LIBRARY) $(SHARED_LIBRARY)
153
 
endif
154
 
endif
155
 
 
156
 
#
157
 
# OBJS is the list of object files.  It can be constructed by
158
 
# specifying CSRCS (list of C source files) and ASFILES (list
159
 
# of assembly language source files).
160
 
#
161
 
 
162
 
ifndef OBJS
163
 
OBJS            = $(addprefix $(OBJDIR)/,$(CSRCS:.c=.$(OBJ_SUFFIX))) \
164
 
                  $(addprefix $(OBJDIR)/,$(ASFILES:.$(ASM_SUFFIX)=.$(OBJ_SUFFIX)))
165
 
endif
166
 
 
167
 
ALL_TRASH               = $(TARGETS) $(OBJS) $(RES) $(filter-out . .., $(OBJDIR)) LOGS TAGS $(GARBAGE) \
168
 
                          $(NOSUCHFILE) \
169
 
                          so_locations
170
 
 
171
 
ifndef RELEASE_LIBS_DEST
172
 
RELEASE_LIBS_DEST       = $(RELEASE_LIB_DIR)
173
 
endif
174
 
 
175
 
define MAKE_IN_DIR
176
 
        $(MAKE) -C $(dir) $@
177
 
 
178
 
endef # do not remove the blank line!
179
 
 
180
 
ifdef DIRS
181
 
LOOP_OVER_DIRS = $(foreach dir,$(DIRS),$(MAKE_IN_DIR))
182
 
endif
183
 
 
184
 
################################################################################
185
 
 
186
 
all:: export
187
 
 
188
 
export::
189
 
        +$(LOOP_OVER_DIRS)
190
 
 
191
 
libs:: export
192
 
 
193
 
clean::
194
 
        rm -rf $(OBJS) $(RES) so_locations $(NOSUCHFILE) $(GARBAGE)
195
 
        +$(LOOP_OVER_DIRS)
196
 
 
197
 
clobber::
198
 
        rm -rf $(OBJS) $(RES) $(TARGETS) $(filter-out . ..,$(OBJDIR)) $(GARBAGE) so_locations $(NOSUCHFILE)
199
 
        +$(LOOP_OVER_DIRS)
200
 
 
201
 
realclean clobber_all::
202
 
        rm -rf $(wildcard *.OBJ *.OBJD) dist $(ALL_TRASH)
203
 
        +$(LOOP_OVER_DIRS)
204
 
 
205
 
distclean::
206
 
        rm -rf $(wildcard *.OBJ *.OBJD) dist $(ALL_TRASH) $(DIST_GARBAGE)
207
 
        +$(LOOP_OVER_DIRS)
208
 
 
209
 
install:: $(RELEASE_BINS) $(RELEASE_HEADERS) $(RELEASE_LIBS)
210
 
ifdef RELEASE_BINS
211
 
        $(NSINSTALL) -t -m 0755 $(RELEASE_BINS) $(DESTDIR)$(bindir)
212
 
endif
213
 
ifdef RELEASE_HEADERS
214
 
        $(NSINSTALL) -t -m 0644 $(RELEASE_HEADERS) $(DESTDIR)$(includedir)/$(include_subdir)
215
 
endif
216
 
ifdef RELEASE_LIBS
217
 
        $(NSINSTALL) -t -m 0755 $(RELEASE_LIBS) $(DESTDIR)$(libdir)/$(lib_subdir)
218
 
endif
219
 
        +$(LOOP_OVER_DIRS)
220
 
 
221
 
release:: export
222
 
ifdef RELEASE_BINS
223
 
        @echo "Copying executable programs and scripts to release directory"
224
 
        @if test -z "$(BUILD_NUMBER)"; then \
225
 
                echo "BUILD_NUMBER must be defined"; \
226
 
                false; \
227
 
        else \
228
 
                true; \
229
 
        fi
230
 
        @if test ! -d $(RELEASE_BIN_DIR); then \
231
 
                rm -rf $(RELEASE_BIN_DIR); \
232
 
                $(NSINSTALL) -D $(RELEASE_BIN_DIR);\
233
 
        else \
234
 
                true; \
235
 
        fi
236
 
        cp $(RELEASE_BINS) $(RELEASE_BIN_DIR)
237
 
endif
238
 
ifdef RELEASE_LIBS
239
 
        @echo "Copying libraries to release directory"
240
 
        @if test -z "$(BUILD_NUMBER)"; then \
241
 
                echo "BUILD_NUMBER must be defined"; \
242
 
                false; \
243
 
        else \
244
 
                true; \
245
 
        fi
246
 
        @if test ! -d $(RELEASE_LIBS_DEST); then \
247
 
                rm -rf $(RELEASE_LIBS_DEST); \
248
 
                $(NSINSTALL) -D $(RELEASE_LIBS_DEST);\
249
 
        else \
250
 
                true; \
251
 
        fi
252
 
        cp $(RELEASE_LIBS) $(RELEASE_LIBS_DEST)
253
 
endif
254
 
ifdef RELEASE_HEADERS
255
 
        @echo "Copying header files to release directory"
256
 
        @if test -z "$(BUILD_NUMBER)"; then \
257
 
                echo "BUILD_NUMBER must be defined"; \
258
 
                false; \
259
 
        else \
260
 
                true; \
261
 
        fi
262
 
        @if test ! -d $(RELEASE_HEADERS_DEST); then \
263
 
                rm -rf $(RELEASE_HEADERS_DEST); \
264
 
                $(NSINSTALL) -D $(RELEASE_HEADERS_DEST);\
265
 
        else \
266
 
                true; \
267
 
        fi
268
 
        cp $(RELEASE_HEADERS) $(RELEASE_HEADERS_DEST)
269
 
endif
270
 
        +$(LOOP_OVER_DIRS)
271
 
 
272
 
alltags:
273
 
        rm -f TAGS tags
274
 
        find . -name dist -prune -o \( -name '*.[hc]' -o -name '*.cp' -o -name '*.cpp' \) -print | xargs etags -a
275
 
        find . -name dist -prune -o \( -name '*.[hc]' -o -name '*.cp' -o -name '*.cpp' \) -print | xargs ctags -a
276
 
 
277
 
$(NFSPWD):
278
 
        cd $(@D); $(MAKE) $(@F)
279
 
 
280
 
$(PROGRAM): $(OBJS)
281
 
        @$(MAKE_OBJDIR)
282
 
ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
283
 
ifdef MOZ_PROFILE_USE
284
 
# In the second pass, we need to merge the pgc files into the pgd file.
285
 
# The compiler would do this for us automatically if they were in the right
286
 
# place, but they're in dist/bin.
287
 
        python $(topsrcdir)/build/win32/pgomerge.py \
288
 
                $(notdir $(PROGRAM:.exe=)) $(DIST)/bin
289
 
endif   # MOZ_PROFILE_USE
290
 
        $(CC) $(OBJS) -Fe$@ -link $(LDFLAGS) $(OS_LIBS) $(EXTRA_LIBS)
291
 
ifdef MT
292
 
        @if test -f $@.manifest; then \
293
 
                $(MT) -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;1; \
294
 
                rm -f $@.manifest; \
295
 
        fi
296
 
endif   # MSVC with manifest tool
297
 
ifdef MOZ_PROFILE_GENERATE
298
 
# touch it a few seconds into the future to work around FAT's
299
 
# 2-second granularity
300
 
        touch -t `date +%Y%m%d%H%M.%S -d "now+5seconds"` pgo.relink
301
 
endif   # MOZ_PROFILE_GENERATE
302
 
else    # WINNT && !GCC
303
 
        $(CC) -o $@ $(CFLAGS) $(OBJS) $(LDFLAGS)
304
 
endif   # WINNT && !GCC
305
 
ifdef ENABLE_STRIP
306
 
        $(STRIP) $@
307
 
endif
308
 
 
309
 
$(LIBRARY): $(OBJS)
310
 
        @$(MAKE_OBJDIR)
311
 
        rm -f $@
312
 
        $(AR) $(AR_FLAGS) $(OBJS) $(AR_EXTRA_ARGS)
313
 
        $(RANLIB) $@
314
 
 
315
 
ifeq ($(OS_TARGET), OS2)
316
 
$(IMPORT_LIBRARY): $(MAPFILE)
317
 
        rm -f $@
318
 
        $(IMPLIB) $@ $(MAPFILE)
319
 
else
320
 
ifeq (,$(filter-out WIN95 WINCE WINMO,$(OS_TARGET)))
321
 
# PDBs and import libraries need to depend on the shared library to
322
 
# order dependencies properly.
323
 
$(IMPORT_LIBRARY): $(SHARED_LIBRARY)
324
 
$(SHARED_LIB_PDB): $(SHARED_LIBRARY)
325
 
endif
326
 
endif
327
 
 
328
 
$(SHARED_LIBRARY): $(OBJS) $(RES) $(MAPFILE)
329
 
        @$(MAKE_OBJDIR)
330
 
        rm -f $@
331
 
ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.1)
332
 
        echo "#!" > $(OBJDIR)/lib$(LIBRARY_NAME)_syms
333
 
        nm -B -C -g $(OBJS) \
334
 
                | awk '/ [T,D] / {print $$3}' \
335
 
                | sed -e 's/^\.//' \
336
 
                | sort -u >> $(OBJDIR)/lib$(LIBRARY_NAME)_syms
337
 
        $(LD) $(XCFLAGS) -o $@ $(OBJS) -bE:$(OBJDIR)/lib$(LIBRARY_NAME)_syms \
338
 
                -bM:SRE -bnoentry $(OS_LIBS) $(EXTRA_LIBS)
339
 
else    # AIX 4.1
340
 
ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
341
 
ifdef MOZ_PROFILE_USE
342
 
        python $(topsrcdir)/build/win32/pgomerge.py \
343
 
                $(notdir $(SHARED_LIBRARY:.$(DLL_SUFFIX)=)) $(DIST)/bin
344
 
endif   # MOZ_PROFILE_USE
345
 
        $(LINK_DLL) -MAP $(DLLBASE) $(DLL_LIBS) $(EXTRA_LIBS) $(OBJS) $(RES)
346
 
ifdef MT
347
 
        @if test -f $@.manifest; then \
348
 
                $(MT) -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;2; \
349
 
                rm -f $@.manifest; \
350
 
        fi
351
 
endif   # MSVC with manifest tool
352
 
ifdef MOZ_PROFILE_GENERATE
353
 
        touch -t `date +%Y%m%d%H%M.%S -d "now+5seconds"` pgo.relink
354
 
endif   # MOZ_PROFILE_GENERATE
355
 
else    # WINNT && !GCC
356
 
        $(MKSHLIB) $(OBJS) $(RES) $(LDFLAGS) $(EXTRA_LIBS)
357
 
endif   # WINNT && !GCC
358
 
endif   # AIX 4.1
359
 
ifdef ENABLE_STRIP
360
 
        $(STRIP) $@
361
 
endif
362
 
 
363
 
################################################################################
364
 
 
365
 
ifdef MOZ_PROFILE_USE
366
 
ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
367
 
# When building with PGO, we have to make sure to re-link
368
 
# in the MOZ_PROFILE_USE phase if we linked in the
369
 
# MOZ_PROFILE_GENERATE phase. We'll touch this pgo.relink
370
 
# file in the link rule in the GENERATE phase to indicate
371
 
# that we need a relink.
372
 
$(SHARED_LIBRARY): pgo.relink
373
 
 
374
 
$(PROGRAM): pgo.relink
375
 
 
376
 
endif   # WINNT && !GCC
377
 
endif   # MOZ_PROFILE_USE
378
 
 
379
 
################################################################################
380
 
 
381
 
ifdef MOZ_PROFILE_GENERATE
382
 
# Clean up profiling data during PROFILE_GENERATE phase
383
 
export::
384
 
        -$(RM) *.pgd *.gcda
385
 
endif
386
 
 
387
 
################################################################################
388
 
 
389
 
ifeq ($(OS_ARCH),WINNT)
390
 
$(RES): $(RESNAME)
391
 
        @$(MAKE_OBJDIR)
392
 
# The resource compiler does not understand the -U option.
393
 
ifdef NS_USE_GCC
394
 
        $(RC) $(RCFLAGS) $(filter-out -U%,$(DEFINES)) $(INCLUDES:-I%=--include-dir %) -o $@ $<
395
 
else
396
 
        $(RC) $(RCFLAGS) $(filter-out -U%,$(DEFINES)) $(INCLUDES) -Fo$@ $<
397
 
endif # GCC
398
 
        @echo $(RES) finished
399
 
endif
400
 
 
401
 
$(MAPFILE): $(LIBRARY_NAME).def
402
 
        @$(MAKE_OBJDIR)
403
 
ifeq ($(OS_ARCH),SunOS)
404
 
        grep -v ';-' $< | \
405
 
        sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@
406
 
endif
407
 
ifeq ($(OS_ARCH),OS2)
408
 
        echo LIBRARY $(LIBRARY_NAME)$(LIBRARY_VERSION) INITINSTANCE TERMINSTANCE > $@
409
 
        echo PROTMODE >> $@
410
 
        echo CODE    LOADONCALL MOVEABLE DISCARDABLE >> $@
411
 
        echo DATA    PRELOAD MOVEABLE MULTIPLE NONSHARED >> $@
412
 
        echo EXPORTS >> $@
413
 
        grep -v ';+' $< | grep -v ';-' | \
414
 
        sed -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,,' -e 's,\([\t ]*\),\1_,' | \
415
 
        awk 'BEGIN {ord=1;} { print($$0 " @" ord " RESIDENTNAME"); ord++;}'     >> $@
416
 
        $(ADD_TO_DEF_FILE)
417
 
endif
418
 
 
419
 
#
420
 
# Translate source filenames to absolute paths. This is required for
421
 
# debuggers under Windows and OS/2 to find source files automatically.
422
 
#
423
 
 
424
 
ifeq (,$(filter-out AIX OS2,$(OS_ARCH)))
425
 
NEED_ABSOLUTE_PATH = 1
426
 
endif
427
 
 
428
 
ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
429
 
NEED_ABSOLUTE_PATH = 1
430
 
endif
431
 
 
432
 
ifdef NEED_ABSOLUTE_PATH
433
 
# The quotes allow absolute paths to contain spaces.
434
 
pr_abspath = "$(if $(findstring :,$(1)),$(1),$(if $(filter /%,$(1)),$(1),$(CURDIR)/$(1)))"
435
 
endif
436
 
 
437
 
$(OBJDIR)/%.$(OBJ_SUFFIX): %.cpp
438
 
        @$(MAKE_OBJDIR)
439
 
ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
440
 
        $(CCC) -Fo$@ -c $(CCCFLAGS) $(call pr_abspath,$<)
441
 
else
442
 
ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINCE)
443
 
        $(CCC) -Fo$@ -c $(CCCFLAGS) $<
444
 
else
445
 
ifdef NEED_ABSOLUTE_PATH
446
 
        $(CCC) -o $@ -c $(CCCFLAGS) $(call pr_abspath,$<)
447
 
else
448
 
        $(CCC) -o $@ -c $(CCCFLAGS) $<
449
 
endif
450
 
endif
451
 
endif
452
 
 
453
 
WCCFLAGS1 = $(subst /,\\,$(CFLAGS))
454
 
WCCFLAGS2 = $(subst -I,-i=,$(WCCFLAGS1))
455
 
WCCFLAGS3 = $(subst -D,-d,$(WCCFLAGS2))
456
 
$(OBJDIR)/%.$(OBJ_SUFFIX): %.c
457
 
        @$(MAKE_OBJDIR)
458
 
ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
459
 
        $(CC) -Fo$@ -c $(CFLAGS) $(call pr_abspath,$<)
460
 
else
461
 
ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINCE)
462
 
        $(CC) -Fo$@ -c $(CFLAGS) $<
463
 
else
464
 
ifdef NEED_ABSOLUTE_PATH
465
 
        $(CC) -o $@ -c $(CFLAGS) $(call pr_abspath,$<)
466
 
else
467
 
        $(CC) -o $@ -c $(CFLAGS) $<
468
 
endif
469
 
endif
470
 
endif
471
 
 
472
 
 
473
 
$(OBJDIR)/%.$(OBJ_SUFFIX): %.s
474
 
        @$(MAKE_OBJDIR)
475
 
        $(AS) -o $@ $(ASFLAGS) -c $<
476
 
 
477
 
%.i: %.c
478
 
        $(CC) -C -E $(CFLAGS) $< > $*.i
479
 
 
480
 
%: %.pl
481
 
        rm -f $@; cp $< $@; chmod +x $@
482
 
 
483
 
#
484
 
# HACK ALERT
485
 
#
486
 
# The only purpose of this rule is to pass Mozilla's Tinderbox depend
487
 
# builds (http://tinderbox.mozilla.org/showbuilds.cgi).  Mozilla's
488
 
# Tinderbox builds NSPR continuously as part of the Mozilla client.
489
 
# Because NSPR's make depend is not implemented, whenever we change
490
 
# an NSPR header file, the depend build does not recompile the NSPR
491
 
# files that depend on the header.
492
 
#
493
 
# This rule makes all the objects depend on a dummy header file.
494
 
# Touch this dummy header file to force the depend build to recompile
495
 
# everything.
496
 
#
497
 
# This rule should be removed when make depend is implemented.
498
 
#
499
 
 
500
 
DUMMY_DEPEND_H = $(topsrcdir)/config/prdepend.h
501
 
 
502
 
$(filter $(OBJDIR)/%.$(OBJ_SUFFIX),$(OBJS)): $(OBJDIR)/%.$(OBJ_SUFFIX): $(DUMMY_DEPEND_H)
503
 
 
504
 
# END OF HACK
505
 
 
506
 
################################################################################
507
 
# Special gmake rules.
508
 
################################################################################
509
 
 
510
 
#
511
 
# Disallow parallel builds with MSVC < 8 since it can't open the PDB file in
512
 
# parallel.
513
 
#
514
 
ifeq (,$(filter-out 1200 1300 1310,$(MSC_VER)))
515
 
.NOTPARALLEL:
516
 
endif
517
 
 
518
 
#
519
 
# Re-define the list of default suffixes, so gmake won't have to churn through
520
 
# hundreds of built-in suffix rules for stuff we don't need.
521
 
#
522
 
.SUFFIXES:
523
 
.SUFFIXES: .a .$(OBJ_SUFFIX) .c .cpp .s .h .i .pl
524
 
 
525
 
#
526
 
# Fake targets.  Always run these rules, even if a file/directory with that
527
 
# name already exists.
528
 
#
529
 
.PHONY: all alltags clean export install libs realclean release
530
 
 
531
 
#
532
 
# List the target pattern of an implicit rule as a dependency of the
533
 
# special target .PRECIOUS to preserve intermediate files made by
534
 
# implicit rules whose target patterns match that file's name.
535
 
# (See GNU Make documentation, Edition 0.51, May 1996, Sec. 10.4,
536
 
# p. 107.)
537
 
#
538
 
.PRECIOUS: $(OBJDIR)/%.$(OBJ_SUFFIX)