~cypheon/pkgsrc-wip

pkgsrc-wip/canu/patches/patch-Makefile -rw-r--r-- 1.2 KiB
5f1bf4f5 — Johann Rudloff Subst PLIST paths for platform specific files for other architectures 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
$NetBSD$

# Template Makefile requires platform-specific defaults for each OS
# To be sent upstream following commit

--- 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++