star-uvm

Spatial structuring of unstructured volumetric meshes
git clone git://git.meso-star.fr/star-uvm.git
Log | Files | Refs | README | LICENSE

config.mk (2304B)


      1 VERSION = 0.4.1
      2 PREFIX = /usr/local
      3 
      4 LIB_TYPE = SHARED
      5 #LIB_TYPE = STATIC
      6 
      7 BUILD_TYPE = RELEASE
      8 #BUILD_TYPE = DEBUG
      9 
     10 BINPREFIX = $(PREFIX)/bin
     11 LIBPREFIX = $(PREFIX)/lib
     12 INCPREFIX = $(PREFIX)/include
     13 MANPREFIX = $(PREFIX)/share/man
     14 
     15 # Enable building and installation of additional utilities
     16 # Comment it to build and install the library only
     17 #ADDON = utils
     18 
     19 ################################################################################
     20 # Tools
     21 ################################################################################
     22 AR = ar
     23 CC = cc
     24 LD = ld
     25 OBJCOPY = objcopy
     26 PKG_CONFIG = pkg-config
     27 RANLIB = ranlib
     28 
     29 ################################################################################
     30 # Dependencies
     31 ################################################################################
     32 PCFLAGS_STATIC = --static
     33 PCFLAGS = $(PCFLAGS_$(LIB_TYPE))
     34 
     35 EMBREE_VERSION = 4.0
     36 RSYS_VERSION = 0.14
     37 SMSH_VERSION = 0.1 # Optional (required by utils)
     38 
     39 INCS = $$($(PKG_CONFIG) $(PCFLAGS) --cflags embree4 rsys)
     40 LIBS = $$($(PKG_CONFIG) $(PCFLAGS) --libs embree4 rsys) -lm
     41 
     42 ################################################################################
     43 # Compilation options
     44 ################################################################################
     45 WFLAGS =\
     46  -Wall\
     47  -Wcast-align\
     48  -Wconversion\
     49  -Wextra\
     50  -Wmissing-declarations\
     51  -Wmissing-prototypes\
     52  -Wshadow
     53 
     54 CFLAGS_HARDENED =\
     55  -D_FORTIFY_SOURCES=2\
     56  -fcf-protection=full\
     57  -fstack-clash-protection\
     58  -fstack-protector-strong
     59 
     60 CFLAGS_COMMON =\
     61  -pedantic\
     62  -fPIC\
     63  -fvisibility=hidden\
     64  -fstrict-aliasing\
     65  $(CFLAGS_HARDENED)\
     66  $(WFLAGS)
     67 
     68 CFLAGS_DEBUG = -g $(CFLAGS_COMMON)
     69 CFLAGS_RELEASE = -O3 -DNDEBUG $(CFLAGS_COMMON)
     70 CFLAGS = $(CFLAGS_$(BUILD_TYPE))
     71 
     72 CFLAGS_SO = $(CFLAGS) -fPIC
     73 CFLAGS_EXE = $(CFLAGS) -fPIE
     74 
     75 ################################################################################
     76 # Linker options
     77 ################################################################################
     78 LDFLAGS_HARDENED = -Wl,-z,relro,-z,now
     79 LDFLAGS_DEBUG = $(LDFLAGS_HARDENED)
     80 LDFLAGS_RELEASE = -s $(LDFLAGS_HARDENED)
     81 LDFLAGS = $(LDFLAGS_$(BUILD_TYPE))
     82 
     83 LDFLAGS_SO = $(LDFLAGS) -shared -Wl,--no-undefined
     84 LDFLAGS_EXE = $(LDFLAGS) -pie
     85 
     86 OCPFLAGS_DEBUG = --localize-hidden
     87 OCPFLAGS_RELEASE = --localize-hidden --strip-unneeded
     88 OCPFLAGS = $(OCPFLAGS_$(BUILD_TYPE))