FreeBSD.mk 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. include $(CORE_DEPTH)/coreconf/UNIX.mk
  6. DEFAULT_COMPILER = gcc
  7. CC = gcc
  8. CCC = g++
  9. RANLIB = ranlib
  10. CPU_ARCH = $(OS_TEST)
  11. ifeq ($(CPU_ARCH),i386)
  12. CPU_ARCH = x86
  13. endif
  14. ifeq ($(CPU_ARCH),pc98)
  15. CPU_ARCH = x86
  16. endif
  17. ifeq ($(CPU_ARCH),amd64)
  18. CPU_ARCH = x86_64
  19. endif
  20. OS_CFLAGS = $(DSO_CFLAGS) -Wall -Wno-switch -DFREEBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK
  21. DSO_CFLAGS = -fPIC
  22. DSO_LDOPTS = -shared -Wl,-soname -Wl,$(notdir $@)
  23. #
  24. # The default implementation strategy for FreeBSD is pthreads.
  25. #
  26. ifndef CLASSIC_NSPR
  27. USE_PTHREADS = 1
  28. DEFINES += -D_THREAD_SAFE -D_REENTRANT
  29. OS_LIBS += -pthread
  30. DSO_LDOPTS += -pthread
  31. endif
  32. ARCH = freebsd
  33. MOZ_OBJFORMAT := $(shell test -x /usr/bin/objformat && /usr/bin/objformat || echo elf)
  34. ifeq ($(MOZ_OBJFORMAT),elf)
  35. DLL_SUFFIX = so
  36. else
  37. DLL_SUFFIX = so.1.0
  38. endif
  39. MKSHLIB = $(CC) $(DSO_LDOPTS)
  40. ifdef MAPFILE
  41. MKSHLIB += -Wl,--version-script,$(MAPFILE)
  42. endif
  43. PROCESS_MAP_FILE = grep -v ';-' $< | \
  44. sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@
  45. G++INCLUDES = -I/usr/include/g++
  46. INCLUDES += -I/usr/X11R6/include