2
# ***** BEGIN LICENSE BLOCK *****
3
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
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/
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
15
# The Original Code is the Netscape Portable Runtime (NSPR).
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.
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.
36
# ***** END LICENSE BLOCK *****
2
# This Source Code Form is subject to the terms of the Mozilla Public
3
# License, v. 2.0. If a copy of the MPL was not distributed with this
4
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
329
298
ifeq ($(OS_ARCH), SunOS)
330
ifneq ($(OS_RELEASE), 4.1.3_U1)
332
LDOPTS += -Xlinker -R -Xlinker $(ABSOLUTE_LIB_DIR)
334
ifeq ($(USE_CPLUS), 1)
337
LDOPTS += -R $(ABSOLUTE_LIB_DIR)
300
LDOPTS += -Xlinker -R -Xlinker $(ABSOLUTE_LIB_DIR)
302
ifeq ($(USE_CPLUS), 1)
305
LDOPTS += -R $(ABSOLUTE_LIB_DIR)
341
308
ifdef USE_PTHREADS
346
ifeq ($(OS_ARCH), NEC)
347
EXTRA_LIBS = $(OS_LIBS)
348
# This hardcodes in the executable programs the directory to find
349
# libnspr.so etc. at program startup. Equivalent to the -R or -rpath
350
# option for ld on other platforms.
351
export LD_RUN_PATH = $(ABSOLUTE_LIB_DIR)
354
ifeq ($(OS_ARCH), NCR)
355
# NCR needs to link against -lsocket -lnsl -ldl (and -lc, which is
356
# linked implicitly by $(CC)). Note that we did not link with these
357
# system libraries when we built libnspr.so.
358
EXTRA_LIBS = -lsocket -lnsl -ldl
359
# This hardcodes in the executable programs the directory to find
360
# libnspr.so etc. at program startup. Equivalent to the -R or -rpath
361
# option for ld on other platforms.
362
export LD_RUN_PATH = $(ABSOLUTE_LIB_DIR)
365
ifeq ($(OS_ARCH), NEXTSTEP)
366
# balazs.pataki@sztaki.hu: linkage is done in a different pass in the `tests'
367
# modeul, so we have to pass the `-posix' flag by "hand" to `ld'
371
ifeq ($(OS_ARCH), NEWS-OS)
372
# This hardcodes in the executable programs the directory to find
373
# libnspr.so etc. at program startup. Equivalent to the -R or -rpath
374
# option for ld on other platforms.
375
#export LD_RUN_PATH = $(ABSOLUTE_LIB_DIR)
376
LIBNSPR = $(dist_libdir)/libnspr$(MOD_MAJOR_VERSION).a
377
LIBPLC = $(dist_libdir)/libplc$(MOD_MAJOR_VERSION).a
378
EXTRA_LIBS = -lsocket -lnsl -lgen -lresolv
381
313
ifeq (,$(filter-out Linux GNU GNU_%,$(OS_ARCH)))
382
314
LDOPTS += -Xlinker -rpath $(ABSOLUTE_LIB_DIR)
383
315
ifeq ($(USE_PTHREADS),1)
395
327
export LD_RUN_PATH = $(ABSOLUTE_LIB_DIR)
398
ifeq ($(OS_ARCH),SINIX)
399
EXTRA_LIBS = -lsocket -lnsl -lresolv -ldl
400
# This hardcodes in the executable programs the directory to find
401
# libnspr.so etc. at program startup. Equivalent to the -R or -rpath
402
# option for ld on other platforms.
403
export LD_RUN_PATH = $(ABSOLUTE_LIB_DIR)
406
330
ifeq ($(OS_ARCH),OpenUNIX)
407
331
export LD_RUN_PATH = $(ABSOLUTE_LIB_DIR)
408
332
ifeq ($(USE_PTHREADS),1)
516
439
# The following tests call BSD socket functions, so they need to link
517
440
# with -lsocket on some platforms.
518
441
ifeq ($(OS_ARCH),SunOS)
519
ifneq ($(OS_RELEASE),4.1.3_U1)
520
442
ifeq ($(USE_IPV6),1)
521
443
$(OBJDIR)/gethost: $(OBJDIR)/gethost.o
522
444
$(PURE) $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBNSPR) -lsocket $(EXTRA_LIBS) -o $@
524
446
$(OBJDIR)/prpoll: $(OBJDIR)/prpoll.o
525
447
$(PURE) $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBNSPR) -lsocket $(EXTRA_LIBS) -o $@
529
450
ifeq ($(USE_PTHREADS), 1)
530
451
$(OBJDIR)/attach: $(OBJDIR)/attach.o