1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/security/nss/coreconf/NetBSD.mk Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,55 @@ 1.4 +# 1.5 +# This Source Code Form is subject to the terms of the Mozilla Public 1.6 +# License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 +# file, You can obtain one at http://mozilla.org/MPL/2.0/. 1.8 + 1.9 +include $(CORE_DEPTH)/coreconf/UNIX.mk 1.10 + 1.11 +DEFAULT_COMPILER = gcc 1.12 +CC = gcc 1.13 +CCC = g++ 1.14 +RANLIB = ranlib 1.15 + 1.16 +CPU_ARCH := $(shell uname -p) 1.17 +ifeq ($(CPU_ARCH),i386) 1.18 +OS_REL_CFLAGS = -Di386 1.19 +CPU_ARCH = x86 1.20 +endif 1.21 + 1.22 +ifndef OBJECT_FMT 1.23 +OBJECT_FMT := $(shell if echo __ELF__ | $${CC:-cc} -E - | grep -q __ELF__ ; then echo a.out ; else echo ELF ; fi) 1.24 +endif 1.25 + 1.26 +ifeq ($(OBJECT_FMT),ELF) 1.27 +DLL_SUFFIX = so 1.28 +else 1.29 +DLL_SUFFIX = so.1.0 1.30 +endif 1.31 + 1.32 +OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -ansi -Wall -Wno-switch -pipe -DNETBSD -Dunix -DHAVE_STRERROR -DHAVE_BSD_FLOCK 1.33 + 1.34 +OS_LIBS = -lcompat 1.35 + 1.36 +ARCH = netbsd 1.37 + 1.38 +DSO_CFLAGS = -fPIC -DPIC 1.39 +DSO_LDOPTS = -shared 1.40 +ifeq ($(OBJECT_FMT),ELF) 1.41 +DSO_LDOPTS += -Wl,-soname,lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX) 1.42 +endif 1.43 + 1.44 +ifdef LIBRUNPATH 1.45 +DSO_LDOPTS += -Wl,-R$(LIBRUNPATH) 1.46 +endif 1.47 + 1.48 +MKSHLIB = $(CC) $(DSO_LDOPTS) 1.49 +ifdef MAPFILE 1.50 +# Add LD options to restrict exported symbols to those in the map file 1.51 +endif 1.52 +# Change PROCESS to put the mapfile in the correct format for this platform 1.53 +PROCESS_MAP_FILE = cp $< $@ 1.54 + 1.55 + 1.56 +G++INCLUDES = -I/usr/include/g++ 1.57 + 1.58 +INCLUDES += -I/usr/X11R6/include