-
Notifications
You must be signed in to change notification settings - Fork 0
/
Config
107 lines (81 loc) · 2.63 KB
/
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# compiler executables --------------------------------------------------------
CC = gcc
CXX = g++
FC = gfortran
# language standard -----------------------------------------------------------
# CSTD = -std=c89 -Wno-unused-function
CSTD = -std=c99
CXXSTD = -std=c++98
# CXXSTD = -std=c++11
FSTD = -std=f2003 -ffree-form -Wno-c-binding-type
# common compiler options -----------------------------------------------------
FLAGS = -O3 -fPIC -Wall -Wextra -pedantic -I../include
SOFLAGS =
# macOS compiler options (uncomment on macOS) ---------------------------------
# SOFLAGS += -undefined dynamic_lookup
# OpenMP compiler options -----------------------------------------------------
# do not uncomment; use "make ZFP_WITH_OPENMP=0" to disable OpenMP
OMPFLAGS = -fopenmp
# optional compiler macros ----------------------------------------------------
# use long long for 64-bit types
# DEFS += -DZFP_INT64='long long' -DZFP_INT64_SUFFIX='ll'
# DEFS += -DZFP_UINT64='unsigned long long' -DZFP_UINT64_SUFFIX='ull'
# use smaller bit stream word type for finer rate granularity
# DEFS += -DBIT_STREAM_WORD_TYPE=uint8
# DEFS += -DBIT_STREAM_WORD_TYPE=uint16
# DEFS += -DBIT_STREAM_WORD_TYPE=uint32
# DEFS += -DBIT_STREAM_WORD_TYPE=uint64
# enable strided access for progressive zfp streams
# DEFS += -DBIT_STREAM_STRIDED
# use aligned memory allocation
# DEFS += -DZFP_WITH_ALIGNED_ALLOC
# use two-way skew-associative cache
# DEFS += -DZFP_WITH_CACHE_TWOWAY
# use faster but more collision prone hash function
# DEFS += -DZFP_WITH_CACHE_FAST_HASH
# count cache misses
# DEFS += -DZFP_WITH_CACHE_PROFILE
# build targets ---------------------------------------------------------------
# default targets
BUILD_CFP = 0
BUILD_ZFORP = 0
BUILD_UTILITIES = 1
BUILD_EXAMPLES = 0
BUILD_TESTING = 1
BUILD_SHARED_LIBS = 0
# build all targets?
ifdef BUILD_ALL
ifneq ($(BUILD_ALL),0)
BUILD_CFP = 1
BUILD_ZFORP = 1
BUILD_UTILITIES = 1
BUILD_EXAMPLES = 1
BUILD_TESTING = 1
endif
endif
# build shared libraries?
ifneq ($(BUILD_SHARED_LIBS),0)
LIBRARY = shared
LIBZFP = libzfp.so
LIBCFP = libcfp.so
else
LIBRARY = static
LIBZFP = libzfp.a
LIBCFP = libcfp.a
endif
# conditionals ----------------------------------------------------------------
# enable OpenMP?
ifdef ZFP_WITH_OPENMP
ifneq ($(ZFP_WITH_OPENMP),0)
ifneq ($(ZFP_WITH_OPENMP),OFF)
FLAGS += $(OMPFLAGS)
endif
endif
endif
ifdef PPM_CHROMA
PPM_FLAGS += -DPPM_CHROMA=$(PPM_CHROMA)
endif
# compiler options ------------------------------------------------------------
CFLAGS = $(CSTD) $(FLAGS) $(DEFS)
CXXFLAGS = $(CXXSTD) $(FLAGS) $(DEFS)
FFLAGS = $(FSTD) $(FLAGS) $(DEFS)