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/.
6 include $(CORE_DEPTH
)/coreconf
/UNIX.mk
10 DEFAULT_COMPILER
= ${CC}
14 CPU_ARCH
:= $(shell uname
-p
)
15 ifeq ($(CPU_ARCH
),i386
)
16 OS_REL_CFLAGS
= -Di386
19 ifeq (,$(filter-out earm
%,$(CPU_ARCH
)))
22 ifeq ($(CPU_ARCH
),aarch64eb
)
28 OS_CFLAGS
= $(DSO_CFLAGS
) $(OS_REL_CFLAGS
) -Wall
-Wno-switch
-pipe
-DNETBSD
-Dunix
-DHAVE_STRERROR
-DHAVE_BSD_FLOCK
34 DSO_CFLAGS
= -fPIC
-DPIC
35 DSO_LDOPTS
= -shared
-Wl
,-soname
,lib
$(LIBRARY_NAME
)$(LIBRARY_VERSION
).
$(DLL_SUFFIX
)
38 # The default implementation strategy for NetBSD is pthreads.
42 DEFINES
+= -D_THREAD_SAFE
-D_REENTRANT
44 DSO_LDOPTS
+= -pthread
48 DSO_LDOPTS
+= -Wl
,-R
$(LIBRUNPATH
)
51 MKSHLIB
= $(CC
) $(DSO_LDOPTS
)
53 MKSHLIB
+= -Wl
,--version-script
,$(MAPFILE
)
55 PROCESS_MAP_FILE
= grep
-v
';-' $< | \
56 sed
-e
's,;+,,' -e
's; DATA ;;' -e
's,;;,,' -e
's,;.*,;,' > $@