]>
Commit | Line | Data |
---|---|---|
c3312d9a | 1 | ifndef INCPATH |
866f59c9 | 2 | INCPATH=../ |
c3312d9a | 3 | endif |
8b485e91 | 4 | |
c5a04a43 | 5 | CONFIGURED=1 |
4bad6412 | 6 | CFLAGS= |
91bf3d57 | 7 | LEX=flex |
1a935a31 | 8 | MFLAGS= |
4bad6412 | 9 | |
c3312d9a | 10 | ifeq (${HOOKS_NEW},1) |
c5f04094 | 11 | HOOK_ENGINE=new |
c3312d9a | 12 | else |
780b6d42 | 13 | HOOK_ENGINE=old |
c3312d9a | 14 | endif |
c5f04094 CP |
15 | |
16 | # if USE_VALGRIND == 1 | |
c3312d9a | 17 | ifeq (${USE_VALGRIND},1) |
c5f04094 CP |
18 | CFLAGS+=-DUSE_VALGRIND |
19 | SSTRING_ENGINE=valgrind | |
20 | ||
73ae62df | 21 | ## if SSTRING_NEW == 1 |
c3312d9a | 22 | ifeq (${SSTRING_NEW},1) |
c5f04094 | 23 | IMPOSSIBLE="USE_VALGRIND and SSTRING_NEW" |
c3312d9a | 24 | endif # SSTRING_NEW == 1 |
c5f04094 | 25 | |
73ae62df | 26 | ## if SSTRING_MMAP == 1 |
c3312d9a | 27 | ifeq (${SSTRING_MMAP},1) |
c5f04094 | 28 | IMPOSSIBLE="USE_VALGRIND and SSTRING_MMAP" |
c3312d9a CP |
29 | endif ## SSTRING_MMAP == 1 |
30 | else # USE_VALGRIND == 1 | |
c5f04094 | 31 | |
73ae62df | 32 | ## if SSTRING_NEW == 1 |
c3312d9a | 33 | ifeq (${SSTRING_NEW},1) |
c5f04094 | 34 | SSTRING_ENGINE=new |
c3312d9a | 35 | else ## SSTRING_NEW == 1 |
c5f04094 CP |
36 | SSTRING_ENGINE=old |
37 | ||
73ae62df | 38 | ### if SSTRING_MMAP == 1 |
c3312d9a | 39 | ifeq (${SSTRING_MMAP},1) |
c5f04094 | 40 | IMPOSSIBLE="SSTRING_MMAP without SSTRING_NEW" |
c3312d9a CP |
41 | endif ### SSTRING_MMAP == 1 |
42 | endif ## SSTRING_NEW == 1 | |
43 | endif # USE_VALGRIND == 1 | |
c5f04094 | 44 | |
c3312d9a CP |
45 | ifdef IMPOSSIBLE |
46 | $(error impossible combination of settings: ${IMPOSSIBLE}) | |
47 | endif | |
c5f04094 | 48 | |
c3312d9a CP |
49 | ifndef BUILDID |
50 | BUILDID = $(shell (hg id || echo "unknown") | sed -e "s/[()]//g;s/+ /+/g;s/ /-/g" ) | |
51 | endif | |
1a935a31 | 52 | MFLAGS+=BUILDID=$(BUILDID) |
8b485e91 | 53 | |
ffc11f03 | 54 | .SUFFIXES: .so .y .l |
4bad6412 CP |
55 | |
56 | .o.so: | |
a5732c33 | 57 | $(CC) -nostartfiles -Wl,--export-dynamic -shared -o $@ $^ $(LDFLAGS) |
4bad6412 | 58 | |
ffc11f03 CP |
59 | .y.c: ; |
60 | ||
61 | .l.c: ; | |
62 | ||
c3312d9a | 63 | default: all |
78668b7c | 64 | |
0555113a | 65 | CFLAGS+=-I./ -DBUILDID=$(BUILDID) -fPIC |
1cf93e54 | 66 | CFLAGS+=-Wall -g -finline-functions -funroll-loops -Werror=format-security |
0555113a | 67 | |
c3312d9a | 68 | ifndef NOC99 |
1613a824 | 69 | CFLAGS+=-std=c99 |
c3312d9a | 70 | endif |