canu: Add NetBSD support to build system
authorJason Bacon <bacon@NetBSD.org>
Fri, 4 Jan 2019 15:15:42 +0000 (09:15 -0600)
committerJason Bacon <bacon@NetBSD.org>
Fri, 4 Jan 2019 15:16:14 +0000 (09:16 -0600)
canu/patches/patch-Makefile [new file with mode: 0644]

diff --git a/canu/patches/patch-Makefile b/canu/patches/patch-Makefile
new file mode 100644 (file)
index 0000000..4bbabdd
--- /dev/null
@@ -0,0 +1,47 @@
+$NetBSD$
+
+# Requires platform-specific defaults
+
+--- Makefile.orig      2018-10-22 16:47:31.000000000 +0000
++++ Makefile
+@@ -545,6 +545,40 @@ endif
+ endif
++ifeq (${OSTYPE}, NetBSD)
++  CC       ?= gcc
++  CXX      ?= g++
++
++  #  GCC
++  CXXFLAGS  += -pthread -fopenmp -fPIC
++  LDFLAGS   += -pthread -fopenmp -lm -lexecinfo
++
++  #CXXFLAGS  += -Wall -Wextra -Wformat  -Wno-unused   -Wno-parentheses
++  CXXFLAGS  += -Wall -Wextra -Wformat -Wno-unused-function -Wno-unused-parameter -Wno-unused-variable -Wno-char-subscripts -Wno-write-strings -Wno-sign-compare -Wno-format-truncation
++
++  #  Google Performance Tools malloc and heapchecker (HEAPCHECK=normal)
++  #CXXFLAGS  +=
++  #LDFLAGS   += -ltcmalloc
++
++  #  Google Performance Tools cpu profiler (CPUPROFILE=/path)
++  #CXXFLAGS  +=
++  #LDFLAGS   += -lprofiler
++
++  #  callgrind
++  #CXXFLAGS  += -g3 -Wa,--gstabs -save-temps
++
++  ifeq ($(BUILDOPTIMIZED), 1)
++  else
++    CXXFLAGS += -g3
++  endif
++
++  ifeq ($(BUILDDEBUG), 1)
++  else
++    CXXFLAGS += -O3   -finline-functions -fomit-frame-pointer
++  endif
++endif
++
++
+ ifneq (,$(findstring CYGWIN, ${OSTYPE}))
+   CC        ?= gcc
+   CXX       ?= g++