forked from snap-stanford/snap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.config
61 lines (52 loc) · 1.16 KB
/
Makefile.config
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
49
50
51
52
53
54
55
56
57
58
59
60
#
# Global configuration for SNAP makefiles
#
GLIB = glib-core
SNAP = snap-core
GLIBADV = glib-adv
SNAPADV = snap-adv
SNAPEXP = snap-exp
CGLIB = ../$(GLIB)
CSNAP = ../$(SNAP)
EXGLIB = ../../$(GLIB)
EXSNAP = ../../$(SNAP)
EXGLIBADV = ../../$(GLIBADV)
EXSNAPADV = ../../$(SNAPADV)
EXSNAPEXP = ../../$(SNAPEXP)
UNAME := $(shell uname)
ifeq ($(UNAME), Linux)
# Linux flags
CC = g++
CXXFLAGS += -std=c++98 -Wall
CXXFLAGS += -O3 -DNDEBUG -fopenmp
# turn on for crash debugging, get symbols with <prog> 2>&1 | c++filt
#CXXFLAGS += -g -rdynamic
#CXXFLAGS += -ggdb
# turn on for OpenMP
CXXOPENMP =
LDFLAGS +=
LIBS += -lrt
else ifeq ($(UNAME), Darwin)
# OS X flags
CC = g++
CXXFLAGS += -std=c++98 -Wall -Wno-unknown-pragmas
CXXFLAGS += -O3 -DNDEBUG
CLANG := $(shell g++ -v 2>&1 | grep clang | cut -d " " -f 2)
ifneq ($(CLANG), LLVM)
CXXFLAGS += -fopenmp
#CXXOPENMP += -fopenmp
else
CXXFLAGS += -DNOMP
CXXOPENMP =
endif
LDFLAGS +=
LIBS +=
else ifeq ($(shell uname -o), Cygwin)
# Cygwin flags
CC = g++
CXXFLAGS += -Wall -D__STDC_LIMIT_MACROS
CXXFLAGS += -O3 -DNDEBUG
CXXOPENMP = -fopenmp
LDFLAGS +=
LIBS +=
endif