michael@0: # michael@0: # This Source Code Form is subject to the terms of the Mozilla Public michael@0: # License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: # file, You can obtain one at http://mozilla.org/MPL/2.0/. michael@0: michael@0: include $(CORE_DEPTH)/coreconf/UNIX.mk michael@0: michael@0: DEFAULT_COMPILER = gcc michael@0: CC = gcc michael@0: CCC = g++ michael@0: RANLIB = ranlib michael@0: michael@0: CPU_ARCH = $(OS_TEST) michael@0: ifeq ($(CPU_ARCH),i386) michael@0: CPU_ARCH = x86 michael@0: endif michael@0: ifeq ($(CPU_ARCH),pc98) michael@0: CPU_ARCH = x86 michael@0: endif michael@0: ifeq ($(CPU_ARCH),amd64) michael@0: CPU_ARCH = x86_64 michael@0: endif michael@0: michael@0: OS_CFLAGS = $(DSO_CFLAGS) -ansi -Wall -Wno-switch -DFREEBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK michael@0: michael@0: DSO_CFLAGS = -fPIC michael@0: DSO_LDOPTS = -shared -Wl,-soname -Wl,$(notdir $@) michael@0: michael@0: # michael@0: # The default implementation strategy for FreeBSD is pthreads. michael@0: # michael@0: ifndef CLASSIC_NSPR michael@0: USE_PTHREADS = 1 michael@0: DEFINES += -D_THREAD_SAFE -D_REENTRANT michael@0: OS_LIBS += -pthread michael@0: DSO_LDOPTS += -pthread michael@0: endif michael@0: michael@0: ARCH = freebsd michael@0: michael@0: MOZ_OBJFORMAT := $(shell test -x /usr/bin/objformat && /usr/bin/objformat || echo elf) michael@0: michael@0: ifeq ($(MOZ_OBJFORMAT),elf) michael@0: DLL_SUFFIX = so michael@0: else michael@0: DLL_SUFFIX = so.1.0 michael@0: endif michael@0: michael@0: MKSHLIB = $(CC) $(DSO_LDOPTS) michael@0: ifdef MAPFILE michael@0: MKSHLIB += -Wl,--version-script,$(MAPFILE) michael@0: endif michael@0: PROCESS_MAP_FILE = grep -v ';-' $< | \ michael@0: sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@ michael@0: michael@0: G++INCLUDES = -I/usr/include/g++ michael@0: michael@0: INCLUDES += -I/usr/X11R6/include