Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | # |
michael@0 | 2 | # This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | # License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
michael@0 | 5 | |
michael@0 | 6 | include $(CORE_DEPTH)/coreconf/UNIX.mk |
michael@0 | 7 | |
michael@0 | 8 | DEFAULT_COMPILER = gcc |
michael@0 | 9 | CC = gcc |
michael@0 | 10 | CCC = g++ |
michael@0 | 11 | RANLIB = ranlib |
michael@0 | 12 | |
michael@0 | 13 | CPU_ARCH := $(shell uname -p) |
michael@0 | 14 | ifeq ($(CPU_ARCH),i386) |
michael@0 | 15 | OS_REL_CFLAGS = -Di386 |
michael@0 | 16 | CPU_ARCH = x86 |
michael@0 | 17 | endif |
michael@0 | 18 | |
michael@0 | 19 | ifndef OBJECT_FMT |
michael@0 | 20 | OBJECT_FMT := $(shell if echo __ELF__ | $${CC:-cc} -E - | grep -q __ELF__ ; then echo a.out ; else echo ELF ; fi) |
michael@0 | 21 | endif |
michael@0 | 22 | |
michael@0 | 23 | ifeq ($(OBJECT_FMT),ELF) |
michael@0 | 24 | DLL_SUFFIX = so |
michael@0 | 25 | else |
michael@0 | 26 | DLL_SUFFIX = so.1.0 |
michael@0 | 27 | endif |
michael@0 | 28 | |
michael@0 | 29 | OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -ansi -Wall -Wno-switch -pipe -DNETBSD -Dunix -DHAVE_STRERROR -DHAVE_BSD_FLOCK |
michael@0 | 30 | |
michael@0 | 31 | OS_LIBS = -lcompat |
michael@0 | 32 | |
michael@0 | 33 | ARCH = netbsd |
michael@0 | 34 | |
michael@0 | 35 | DSO_CFLAGS = -fPIC -DPIC |
michael@0 | 36 | DSO_LDOPTS = -shared |
michael@0 | 37 | ifeq ($(OBJECT_FMT),ELF) |
michael@0 | 38 | DSO_LDOPTS += -Wl,-soname,lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX) |
michael@0 | 39 | endif |
michael@0 | 40 | |
michael@0 | 41 | ifdef LIBRUNPATH |
michael@0 | 42 | DSO_LDOPTS += -Wl,-R$(LIBRUNPATH) |
michael@0 | 43 | endif |
michael@0 | 44 | |
michael@0 | 45 | MKSHLIB = $(CC) $(DSO_LDOPTS) |
michael@0 | 46 | ifdef MAPFILE |
michael@0 | 47 | # Add LD options to restrict exported symbols to those in the map file |
michael@0 | 48 | endif |
michael@0 | 49 | # Change PROCESS to put the mapfile in the correct format for this platform |
michael@0 | 50 | PROCESS_MAP_FILE = cp $< $@ |
michael@0 | 51 | |
michael@0 | 52 | |
michael@0 | 53 | G++INCLUDES = -I/usr/include/g++ |
michael@0 | 54 | |
michael@0 | 55 | INCLUDES += -I/usr/X11R6/include |