Makefile.config (3440B)
1 SHELL := /bin/bash 2 3 CC ?= mpic++ 4 cc ?= mpicc 5 6 config ?= release 7 bs ?= 16 8 align ?= 16 9 omp ?= 0 10 hdf ?= 1 11 cubismz ?= 0 12 prec ?= float 13 14 #compression stage-1 (floating point) 15 wavz ?= 1 16 fpc ?= 0 17 fpzip ?= 0 18 shuffle ?= 0 19 zerobits ?= 0 20 drain ?= 0 21 22 #compression stage-2 (encoding) 23 zlib ?= 1 24 lz4 ?= 0 25 lzf ?= 0 26 lzma ?= 0 27 zopfli ?=0 28 #fpc2 ?= 0 # this works but I do not know what we compress (mix below) 29 #fpzip2 ?= 0 # this does not seem to work when the stream is a mix of integers and floats 30 # 31 32 #fpc3 ?= 0 # for wavz + fpc 33 #fpzip3 ?= 0 # for wavz + fpz 34 shuffle3 ?= 0 # for wavz + shuffle3 35 36 INC = -Iinclude -Ithird_party/pngwriter -Ithird_party/libpng 37 LIB = -Llib 38 39 CFLAGS = 40 CPPFLAGS = -std=c++11 41 42 ifeq "$(omp)" "1" 43 CFLAGS += -fopenmp 44 CPPFLAGS += -fopenmp -D_USE_OMP_ 45 endif 46 47 ifeq "$(hdf)" "1" 48 INC += -I/usr/local/include 49 LIB += -lhdf5 50 CPPFLAGS += -D_USE_HDF_ 51 endif 52 53 ifeq "$(cubismz)" "1" 54 INC += -Ithird_party/CubismZ/CubismApps/Compressor/source 55 LIB += -lCubismZ 56 CPPFLAGS += -D_USE_CUBISMZ_ 57 endif 58 59 ifeq "$(prec)" "float" 60 CPPFLAGS += -D_FLOAT_PRECISION_ -D_SP_COMP_ 61 endif 62 63 ifneq "$(config)" "release" 64 CFLAGS += -g -O0 65 CPPFLAGS += -g -O0 66 else 67 CFLAGS += -O3 -DNDEBUG 68 CPPFLAGS += -O3 -DNDEBUG 69 endif 70 71 # Compression Options 72 ifeq "$(wavz)" "1" 73 CPPFLAGS += -D_USE_WAVZ_ 74 endif 75 76 ifeq "$(fpc)" "1" 77 CPPFLAGS += -D_USE_FPC_ 78 endif 79 80 ifeq "$(fpzip)" "1" 81 CPPFLAGS += -D_USE_FPZIP_ 82 endif 83 84 ifeq "$(drain)" "1" 85 CPPFLAGS += -D_USE_DRAIN_ 86 endif 87 88 ifeq "$(shuffle)" "1" 89 CPPFLAGS += -D_USE_SHUFFLE_ 90 endif 91 92 ifeq "$(zerobits)" "4" 93 CPPFLAGS += -D_USE_ZEROBITS_ 94 CPPFLAGS += -D_ZEROBITS_=4 95 endif 96 ifeq "$(zerobits)" "8" 97 CPPFLAGS += -D_USE_ZEROBITS_ 98 CPPFLAGS += -D_ZEROBITS_=8 99 endif 100 ifeq "$(zerobits)" "12" 101 CPPFLAGS += -D_USE_ZEROBITS_ 102 CPPFLAGS += -D_ZEROBITS_=12 103 endif 104 ifeq "$(zerobits)" "16" 105 CPPFLAGS += -D_USE_ZEROBITS_ 106 CPPFLAGS += -D_ZEROBITS_=16 107 endif 108 109 110 # Encoding Options 111 ifeq "$(zlib)" "1" 112 CPPFLAGS += -D_USE_ZLIB_ 113 endif 114 115 ifeq "$(lz4)" "1" 116 CPPFLAGS += -D_USE_LZ4_ 117 endif 118 119 ifeq "$(lzf)" "1" 120 CPPFLAGS += -D_USE_LZF_ 121 endif 122 123 ifeq "$(lzma)" "1" 124 CPPFLAGS += -D_USE_LZMA_ 125 endif 126 127 ifeq "$(zopfli)" "1" 128 CPPFLAGS += -D_USE_ZOPFLI_ 129 endif 130 131 ifeq "$(fpc2)" "1" 132 CPPFLAGS += -D_USE_FPC2_ 133 endif 134 135 ifeq "$(fpzip2)" "1" 136 CPPFLAGS += -D_USE_FPZIP2_ 137 endif 138 139 # Extensions to the Wavelet-based Compression (wavz) 140 141 #ifeq "$(fpc3)" "1" 142 # CPPFLAGS += -D_USE_FPC3_ -I../../../tools/fpc 143 # LIB += -L../../../tools/fpc -lfpc 144 #endif 145 #ifeq "$(fpzip3)" "1" 146 # CPPFLAGS += -D_USE_FPZIP3_ -I../../../tools/fpzip/inc 147 # LIB += -L../../../tools/fpzip/lib -lfpzip 148 #endif 149 ifeq "$(shuffle3)" "1" 150 CPPFLAGS += -D_USE_SHUFFLE3_ 151 endif 152 153 # various machines 154 ifneq "$(findstring mira,$(shell hostname))" "" 155 CPPFLAGS += -I${HOME}/usr/zlib/include 156 CFLAGS += -I${HOME}/usr/zlib/include 157 LIB += -L${HOME}/usr/zlib/lib 158 CPPFLAGS += -I/soft/libraries/hdf5/1.8.14/cnk-gcc/current/include 159 LIB += -L/soft/libraries/hdf5/1.8.14/cnk-gcc/current/lib 160 endif 161 162 ifneq "$(findstring cetus,$(shell hostname))" "" 163 CPPFLAGS += -I${HOME}/usr/zlib/include 164 CFLAGS += -I${HOME}/usr/zlib/include 165 LIB += -L${HOME}/usr/zlib/lib 166 CPPFLAGS += -I/soft/libraries/hdf5/1.8.14/cnk-gcc/current/include 167 LIB += -L/soft/libraries/hdf5/1.8.14/cnk-gcc/current/lib 168 endif 169 170 CPPFLAGS += -Wall -Wextra -Wno-deprecated -D_ALIGNBYTES_=$(align) -D_BLOCKSIZE_=$(bs)