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 := $(shell uname -p) michael@0: ifeq ($(CPU_ARCH),i386) michael@0: OS_REL_CFLAGS = -Di386 michael@0: CPU_ARCH = x86 michael@0: endif michael@0: michael@0: ifndef OBJECT_FMT michael@0: OBJECT_FMT := $(shell if echo __ELF__ | $${CC:-cc} -E - | grep -q __ELF__ ; then echo a.out ; else echo ELF ; fi) michael@0: endif michael@0: michael@0: ifeq ($(OBJECT_FMT),ELF) michael@0: DLL_SUFFIX = so michael@0: else michael@0: DLL_SUFFIX = so.1.0 michael@0: endif michael@0: michael@0: OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -ansi -Wall -Wno-switch -pipe -DNETBSD -Dunix -DHAVE_STRERROR -DHAVE_BSD_FLOCK michael@0: michael@0: OS_LIBS = -lcompat michael@0: michael@0: ARCH = netbsd michael@0: michael@0: DSO_CFLAGS = -fPIC -DPIC michael@0: DSO_LDOPTS = -shared michael@0: ifeq ($(OBJECT_FMT),ELF) michael@0: DSO_LDOPTS += -Wl,-soname,lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX) michael@0: endif michael@0: michael@0: ifdef LIBRUNPATH michael@0: DSO_LDOPTS += -Wl,-R$(LIBRUNPATH) michael@0: endif michael@0: michael@0: MKSHLIB = $(CC) $(DSO_LDOPTS) michael@0: ifdef MAPFILE michael@0: # Add LD options to restrict exported symbols to those in the map file michael@0: endif michael@0: # Change PROCESS to put the mapfile in the correct format for this platform michael@0: PROCESS_MAP_FILE = cp $< $@ michael@0: michael@0: michael@0: G++INCLUDES = -I/usr/include/g++ michael@0: michael@0: INCLUDES += -I/usr/X11R6/include