1998-03-28 05:44:41 +03:00
|
|
|
#
|
2000-06-14 00:59:02 +04:00
|
|
|
# The contents of this file are subject to the Mozilla Public
|
|
|
|
# License Version 1.1 (the "License"); you may not use this file
|
|
|
|
# except in compliance with the License. You may obtain a copy of
|
|
|
|
# the License at http://www.mozilla.org/MPL/
|
|
|
|
#
|
|
|
|
# Software distributed under the License is distributed on an "AS
|
|
|
|
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
|
|
|
# implied. See the License for the specific language governing
|
|
|
|
# rights and limitations under the License.
|
|
|
|
#
|
2000-06-21 01:48:45 +04:00
|
|
|
# The Original Code is the Netscape Portable Runtime (NSPR).
|
2000-06-14 00:59:02 +04:00
|
|
|
#
|
|
|
|
# The Initial Developer of the Original Code is Netscape
|
|
|
|
# Communications Corporation. Portions created by Netscape are
|
2000-06-21 01:48:45 +04:00
|
|
|
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
|
2000-06-14 00:59:02 +04:00
|
|
|
# Rights Reserved.
|
|
|
|
#
|
|
|
|
# Contributor(s):
|
|
|
|
#
|
|
|
|
# Alternatively, the contents of this file may be used under the
|
|
|
|
# terms of the GNU General Public License Version 2 or later (the
|
|
|
|
# "GPL"), in which case the provisions of the GPL are applicable
|
|
|
|
# instead of those above. If you wish to allow use of your
|
|
|
|
# version of this file only under the terms of the GPL and not to
|
|
|
|
# allow others to use your version of this file under the MPL,
|
|
|
|
# indicate your decision by deleting the provisions above and
|
|
|
|
# replace them with the notice and other provisions required by
|
|
|
|
# the GPL. If you do not delete the provisions above, a recipient
|
|
|
|
# may use your version of this file under either the MPL or the
|
|
|
|
# GPL.
|
1998-03-28 05:44:41 +03:00
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
# Config stuff for SunOS 5.x on sparc and x86
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(MOD_DEPTH)/config/UNIX.mk
|
|
|
|
|
|
|
|
#
|
|
|
|
# XXX
|
|
|
|
# Temporary define for the Client; to be removed when binary release is used
|
|
|
|
#
|
|
|
|
ifdef MOZILLA_CLIENT
|
1998-09-26 00:34:39 +04:00
|
|
|
ifneq ($(USE_PTHREADS),1)
|
1998-03-28 05:44:41 +03:00
|
|
|
LOCAL_THREADS_ONLY = 1
|
1998-09-26 00:34:39 +04:00
|
|
|
endif
|
1998-03-28 05:44:41 +03:00
|
|
|
ifndef NS_USE_NATIVE
|
|
|
|
NS_USE_GCC = 1
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
#
|
1998-09-26 00:34:39 +04:00
|
|
|
# The default implementation strategy on Solaris is pthreads.
|
|
|
|
# Global threads only and local threads only are also available.
|
1998-03-28 05:44:41 +03:00
|
|
|
#
|
1998-09-26 00:34:39 +04:00
|
|
|
ifeq ($(GLOBAL_THREADS_ONLY),1)
|
|
|
|
IMPL_STRATEGY = _NATIVE
|
|
|
|
DEFINES += -D_PR_GLOBAL_THREADS_ONLY
|
1998-03-28 05:44:41 +03:00
|
|
|
else
|
|
|
|
ifeq ($(LOCAL_THREADS_ONLY),1)
|
1998-09-26 00:34:39 +04:00
|
|
|
IMPL_STRATEGY = _EMU
|
1998-03-28 05:44:41 +03:00
|
|
|
DEFINES += -D_PR_LOCAL_THREADS_ONLY
|
|
|
|
else
|
1998-09-26 00:34:39 +04:00
|
|
|
USE_PTHREADS = 1
|
|
|
|
IMPL_STRATEGY = _PTH
|
1998-03-28 05:44:41 +03:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifdef NS_USE_GCC
|
1998-04-14 01:44:55 +04:00
|
|
|
CC = gcc -Wall
|
|
|
|
CCC = g++ -Wall
|
1999-08-18 06:17:13 +04:00
|
|
|
ASFLAGS += -Wa,-P
|
1998-03-28 05:44:41 +03:00
|
|
|
COMPILER_TAG = _gcc
|
|
|
|
ifdef NO_MDUPDATE
|
|
|
|
OS_CFLAGS = $(NOMD_OS_CFLAGS)
|
|
|
|
else
|
|
|
|
OS_CFLAGS = $(NOMD_OS_CFLAGS) -MDupdate $(DEPENDENCIES)
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
CC = cc -xstrconst
|
|
|
|
CCC = CC -Qoption cg -xstrconst
|
|
|
|
ASFLAGS += -Wa,-P
|
|
|
|
OS_CFLAGS = $(NOMD_OS_CFLAGS)
|
|
|
|
#
|
|
|
|
# If we are building for a release, we want to put all symbol
|
|
|
|
# tables in the debug executable or share library instead of
|
|
|
|
# the .o files, so that our clients can run dbx on the debug
|
|
|
|
# library without having the .o files around.
|
|
|
|
#
|
|
|
|
ifdef BUILD_NUMBER
|
|
|
|
ifndef BUILD_OPT
|
|
|
|
OS_CFLAGS += -xs
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
1999-10-13 22:32:42 +04:00
|
|
|
ifeq ($(USE_64),1)
|
|
|
|
ifndef INTERNAL_TOOLS
|
|
|
|
ifndef NS_USE_GCC
|
|
|
|
CC += -xarch=v9
|
|
|
|
CCC += -xarch=v9
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
COMPILER_TAG = _64
|
|
|
|
else
|
|
|
|
COMPILER_TAG = _32
|
|
|
|
endif
|
|
|
|
|
1998-03-28 05:44:41 +03:00
|
|
|
RANLIB = echo
|
|
|
|
|
Bugzilla bug #62457: set the flock structure correctly and use fcntl
file locking on AIX 4.3, HP-UX 11.00, IRIX, Linux, OSF1 V4.0, and Solaris.
Modified Files: AIX.mk, HP-UX.mk, IRIX.mk, Linux.mk, OSF1.mk, SunOS5.mk,
and unix.c.
2000-12-22 09:02:52 +03:00
|
|
|
OS_DEFINES = -DSVR4 -DSYSV -D__svr4 -D__svr4__ -DSOLARIS -DHAVE_FCNTL_FILE_LOCKING
|
1998-03-28 05:44:41 +03:00
|
|
|
|
1998-04-21 21:21:53 +04:00
|
|
|
ifeq ($(OS_TEST),i86pc)
|
1998-03-28 05:44:41 +03:00
|
|
|
CPU_ARCH = x86
|
|
|
|
OS_DEFINES += -Di386
|
1998-05-28 03:15:32 +04:00
|
|
|
# The default debug format, DWARF (-g), is not supported by gcc
|
|
|
|
# on i386-ANY-sysv4/solaris, but the stabs format is. It is
|
|
|
|
# assumed that the Solaris assembler /usr/ccs/bin/as is used.
|
|
|
|
# If your gcc uses GNU as, you do not need the -Wa,-s option.
|
|
|
|
ifndef BUILD_OPT
|
|
|
|
ifdef NS_USE_GCC
|
|
|
|
OPTIMIZER = -Wa,-s -gstabs
|
|
|
|
endif
|
|
|
|
endif
|
1998-03-28 05:44:41 +03:00
|
|
|
else
|
|
|
|
CPU_ARCH = sparc
|
|
|
|
endif
|
1998-09-26 00:34:39 +04:00
|
|
|
CPU_ARCH_TAG = _$(CPU_ARCH)
|
1998-03-28 05:44:41 +03:00
|
|
|
|
|
|
|
ifeq (5.5,$(findstring 5.5,$(OS_RELEASE)))
|
|
|
|
OS_DEFINES += -DSOLARIS2_5
|
1998-09-26 00:34:39 +04:00
|
|
|
else
|
A jumbo checkin, consisting of:
1. Ports to older revisions of some Unix variants, e.g., BSD/OS 1.1,
OSF1 V2.0, etc., contributed by Brian Ostrom <briano@netscape.com>.
2. QNX port, also contributed by Brian Ostrom.
3. New macro USE_MACH_DYLD to represent the dynamic library loading
API of NEXTSTEP and Rhapsody.
4. On platforms whose socket address has the sa_len field, make a
copy of the PRNetAddr argument for PR_Bind, PR_Connect, and PR_SendTo
and set its sa_len before passing it to the system calls. This
fix is suggested by Bert Driehuis <driehuis@playbeing.org>.
5. Removed the unused field _lockf64 of struct _MD_IOVector. Not
every Unix platform has lockf, and the POSIX file locking API
uses fcntl.
1998-11-23 09:33:00 +03:00
|
|
|
ifeq (,$(filter-out 5.3 5.4,$(OS_RELEASE)))
|
|
|
|
OS_DEFINES += -D_PR_NO_LARGE_FILES
|
|
|
|
else
|
1998-09-26 00:34:39 +04:00
|
|
|
OS_DEFINES += -D_PR_HAVE_OFF64_T
|
1999-05-19 04:40:28 +04:00
|
|
|
# The lfcompile64(5) man page on Solaris 2.6 says:
|
|
|
|
# For applications that do not wish to conform to the POSIX or
|
|
|
|
# X/Open specifications, the 64-bit transitional interfaces
|
|
|
|
# are available by default. No compile-time flags need to be
|
|
|
|
# set.
|
|
|
|
# But gcc 2.7.2.x fails to define _LARGEFILE64_SOURCE by default.
|
|
|
|
# The native compiler, gcc 2.8.x, and egcs don't have this problem.
|
|
|
|
ifdef NS_USE_GCC
|
|
|
|
OS_DEFINES += -D_LARGEFILE64_SOURCE
|
|
|
|
endif
|
1998-03-28 05:44:41 +03:00
|
|
|
endif
|
A jumbo checkin, consisting of:
1. Ports to older revisions of some Unix variants, e.g., BSD/OS 1.1,
OSF1 V2.0, etc., contributed by Brian Ostrom <briano@netscape.com>.
2. QNX port, also contributed by Brian Ostrom.
3. New macro USE_MACH_DYLD to represent the dynamic library loading
API of NEXTSTEP and Rhapsody.
4. On platforms whose socket address has the sa_len field, make a
copy of the PRNetAddr argument for PR_Bind, PR_Connect, and PR_SendTo
and set its sa_len before passing it to the system calls. This
fix is suggested by Bert Driehuis <driehuis@playbeing.org>.
5. Removed the unused field _lockf64 of struct _MD_IOVector. Not
every Unix platform has lockf, and the POSIX file locking API
uses fcntl.
1998-11-23 09:33:00 +03:00
|
|
|
endif
|
1998-03-28 05:44:41 +03:00
|
|
|
|
|
|
|
ifneq ($(LOCAL_THREADS_ONLY),1)
|
1998-09-26 00:34:39 +04:00
|
|
|
OS_DEFINES += -D_REENTRANT -DHAVE_POINTER_LOCALTIME_R
|
1998-03-28 05:44:41 +03:00
|
|
|
endif
|
|
|
|
|
|
|
|
# Purify doesn't like -MDupdate
|
|
|
|
NOMD_OS_CFLAGS = $(DSO_CFLAGS) $(OS_DEFINES) $(SOL_CFLAGS)
|
|
|
|
|
|
|
|
MKSHLIB = $(LD) $(DSO_LDOPTS)
|
|
|
|
|
|
|
|
# ld options:
|
|
|
|
# -G: produce a shared object
|
|
|
|
# -z defs: no unresolved symbols allowed
|
1999-10-13 22:32:42 +04:00
|
|
|
DSO_LDOPTS = -G -h $(notdir $@)
|
1998-03-28 05:44:41 +03:00
|
|
|
|
|
|
|
# -KPIC generates position independent code for use in shared libraries.
|
|
|
|
# (Similarly for -fPIC in case of gcc.)
|
|
|
|
ifdef NS_USE_GCC
|
|
|
|
DSO_CFLAGS = -fPIC
|
|
|
|
else
|
|
|
|
DSO_CFLAGS = -KPIC
|
|
|
|
endif
|
|
|
|
|
|
|
|
NOSUCHFILE = /no-such-file
|
|
|
|
|
|
|
|
#
|
|
|
|
# Library of atomic functions for UltraSparc systems
|
|
|
|
#
|
|
|
|
# The nspr makefiles build ULTRASPARC_LIBRARY (which contains assembly language
|
|
|
|
# implementation of the nspr atomic functions for UltraSparc systems) in addition
|
|
|
|
# to libnspr.so. (The actual name of the library is
|
|
|
|
# lib$(ULTRASPARC_LIBRARY)$(MOD_VERSION).so
|
|
|
|
#
|
|
|
|
# The actual name of the filter-library, recorded in libnspr.so, is set to the
|
|
|
|
# value of $(ULTRASPARC_FILTER_LIBRARY).
|
|
|
|
# For an application to use the assembly-language implementation, a link should be
|
|
|
|
# made so that opening ULTRASPARC_FILTER_LIBRARY results in opening
|
|
|
|
# ULTRASPARC_LIBRARY. This indirection requires the user to explicitly set up
|
|
|
|
# library for use on UltraSparc systems, thereby helping to avoid using it by
|
|
|
|
# accident on non-UltraSparc systems.
|
|
|
|
# The directory containing the ultrasparc libraries should be in LD_LIBRARY_PATH.
|
|
|
|
#
|
|
|
|
ifeq ($(OS_TEST),sun4u)
|
|
|
|
ULTRASPARC_LIBRARY = ultrasparc
|
|
|
|
ULTRASPARC_FILTER_LIBRARY = libatomic.so
|
|
|
|
DSO_LDOPTS += -f $(ULTRASPARC_FILTER_LIBRARY)
|
|
|
|
endif
|