16 # if USE_VALGRIND == 1
17 ifeq (${USE_VALGRIND},1)
18 CFLAGS+=-DUSE_VALGRIND
19 SSTRING_ENGINE=valgrind
21 ## if SSTRING_NEW == 1
22 ifeq (${SSTRING_NEW},1)
23 IMPOSSIBLE="USE_VALGRIND and SSTRING_NEW"
24 endif # SSTRING_NEW == 1
26 ## if SSTRING_MMAP == 1
27 ifeq (${SSTRING_MMAP},1)
28 IMPOSSIBLE="USE_VALGRIND and SSTRING_MMAP"
29 endif ## SSTRING_MMAP == 1
30 else # USE_VALGRIND == 1
32 ## if SSTRING_NEW == 1
33 ifeq (${SSTRING_NEW},1)
35 else ## SSTRING_NEW == 1
38 ### if SSTRING_MMAP == 1
39 ifeq (${SSTRING_MMAP},1)
40 IMPOSSIBLE="SSTRING_MMAP without SSTRING_NEW"
41 endif ### SSTRING_MMAP == 1
42 endif ## SSTRING_NEW == 1
43 endif # USE_VALGRIND == 1
46 $(error impossible combination of settings: ${IMPOSSIBLE})
50 BUILDID = $(shell (hg id || echo "unknown") | sed -e "s/[()]//g;s/+ /+/g;s/ /-/g" )
52 MFLAGS+=BUILDID=$(BUILDID)
57 $(CC) -nostartfiles -Wl,--export-dynamic -shared -o $@ $^ $(LDFLAGS)
65 CFLAGS+=-I./ -DBUILDID=$(BUILDID) -fPIC
66 CFLAGS+=-Wall -g -finline-functions -funroll-loops -Werror=format-security