]> jfr.im git - irc/quakenet/newserv.git/blobdiff - build.mk.in
CHANSERV: better batcher error handling for expired accounts/accounts with no email.
[irc/quakenet/newserv.git] / build.mk.in
index 2942940cb17bc3b70b73b77597e3963408e929b6..3049edd7cd829eea1332e8053ada2639cab930c8 100644 (file)
@@ -1,9 +1,44 @@
-@include@ @includel@configure.mk@includel@
-@sinclude@ @includel@settings.mk@includel@
+ifndef INCPATH
+INCPATH=../
+endif
 
-BUILDID := \"$(shell (hg id || echo "unknown") | sed -e "s/ /-/;s/+-/-/")\"
+CONFIGURED=1
+CFLAGS=
+LEX=flex
+MFLAGS=
 
-CC=gcc
-CFLAGS+=-Wall -g -fPIC -export-dynamic -finline-functions -funroll-loops -std=c99 -I./ -DBUILDID=${BUILDID}
+ifeq (${HOOKS_NEW},1)
+HOOK_ENGINE=new
+else
+HOOK_ENGINE=old
+endif
 
-export CC CFLAGS
+ifndef BUILDID
+BUILDID := $(shell (hg id || echo "unknown") | sed -e "s/[()]//g;s/+ /+/g;s/ /-/g" )
+endif
+MFLAGS+=BUILDID=$(BUILDID)
+
+default: all
+
+.SUFFIXES: .so .y .l
+
+-include $(wildcard .deps/*.d)
+
+.c.o:
+       @if [ ! -d .deps ]; then mkdir .deps || true; fi
+       $(CC) $(CFLAGS) -MMD -MF .deps/$(subst .o,.d,$@) -fPIC -c -o $@ $<
+
+.o.so:
+       $(CC) -nostartfiles -Wl,--export-dynamic -shared -o $@ $^ $(LDFLAGS)
+
+.y.c:  ;
+
+.l.c:  ;
+
+CFLAGS+=-I. -I.. -DBUILDID=$(BUILDID)
+CFLAGS+=-Wall -g -finline-functions -funroll-loops -Werror=format-security
+EXECFLAGS=
+
+ifndef NOC99
+CFLAGS+=-std=c99
+endif