1# 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/. 5 6include $(CORE_DEPTH)/coreconf/UNIX.mk 7 8DEFAULT_COMPILER = gcc 9CC = gcc 10CCC = g++ 11RANLIB = ranlib 12 13CPU_ARCH := $(shell uname -p) 14ifeq ($(CPU_ARCH),i386) 15OS_REL_CFLAGS = -Di386 16CPU_ARCH = x86 17endif 18 19ifndef OBJECT_FMT 20OBJECT_FMT := $(shell if echo __ELF__ | $${CC:-cc} -E - | grep -q __ELF__ ; then echo a.out ; else echo ELF ; fi) 21endif 22 23ifeq ($(OBJECT_FMT),ELF) 24DLL_SUFFIX = so 25else 26DLL_SUFFIX = so.1.0 27endif 28 29OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -Wall -Wno-switch -pipe -DNETBSD -Dunix -DHAVE_STRERROR -DHAVE_BSD_FLOCK 30 31OS_LIBS = -lcompat 32 33ARCH = netbsd 34 35DSO_CFLAGS = -fPIC -DPIC 36DSO_LDOPTS = -shared 37ifeq ($(OBJECT_FMT),ELF) 38DSO_LDOPTS += -Wl,-soname,lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX) 39endif 40 41ifdef LIBRUNPATH 42DSO_LDOPTS += -Wl,-R$(LIBRUNPATH) 43endif 44 45MKSHLIB = $(CC) $(DSO_LDOPTS) 46ifdef MAPFILE 47# Add LD options to restrict exported symbols to those in the map file 48endif 49# Change PROCESS to put the mapfile in the correct format for this platform 50PROCESS_MAP_FILE = cp $< $@ 51 52 53G++INCLUDES = -I/usr/include/g++ 54 55INCLUDES += -I/usr/X11R6/include 56