]> jfr.im git - irc/quakenet/newserv.git/blob - build.mk.in
CHANSERV: better batcher error handling for expired accounts/accounts with no email.
[irc/quakenet/newserv.git] / build.mk.in
1 ifndef INCPATH
2 INCPATH=../
3 endif
4
5 CONFIGURED=1
6 CFLAGS=
7 LEX=flex
8 MFLAGS=
9
10 ifeq (${HOOKS_NEW},1)
11 HOOK_ENGINE=new
12 else
13 HOOK_ENGINE=old
14 endif
15
16 ifndef BUILDID
17 BUILDID := $(shell (hg id || echo "unknown") | sed -e "s/[()]//g;s/+ /+/g;s/ /-/g" )
18 endif
19 MFLAGS+=BUILDID=$(BUILDID)
20
21 default: all
22
23 .SUFFIXES: .so .y .l
24
25 -include $(wildcard .deps/*.d)
26
27 .c.o:
28 @if [ ! -d .deps ]; then mkdir .deps || true; fi
29 $(CC) $(CFLAGS) -MMD -MF .deps/$(subst .o,.d,$@) -fPIC -c -o $@ $<
30
31 .o.so:
32 $(CC) -nostartfiles -Wl,--export-dynamic -shared -o $@ $^ $(LDFLAGS)
33
34 .y.c: ;
35
36 .l.c: ;
37
38 CFLAGS+=-I. -I.. -DBUILDID=$(BUILDID)
39 CFLAGS+=-Wall -g -finline-functions -funroll-loops -Werror=format-security
40 EXECFLAGS=
41
42 ifndef NOC99
43 CFLAGS+=-std=c99
44 endif