]> jfr.im git - irc/quakenet/newserv.git/blobdiff - build.mk.in
fixes for clang
[irc/quakenet/newserv.git] / build.mk.in
index dc18a8a56212fd3113b0672f5df37eb9d29bcfe8..fca81a56e433b620ae1a0f02129a21d3e546642a 100644 (file)
@@ -3,7 +3,6 @@ INCPATH=../
 @endif@
 
 CFLAGS=
-CC=gcc
 LEX=flex
 MFLAGS=
 
@@ -50,7 +49,7 @@ HOOK_ENGINE=old
 @endif@
 
 @ifndef@ BUILDID
-BUILDID @shell@ (hg id || echo "unknown") | sed -e "s/+ /-/;s/ /-/" @shellend@
+BUILDID @shell@ (hg id || echo "unknown") | sed -e "s/[()]//g;s/+ /+/g;s/ /-/g" @shellend@
 @endif@
 MFLAGS+=BUILDID=$(BUILDID)
 
@@ -81,8 +80,13 @@ realchecksettings:
 @endif@
 MFLAGS+=CHECKEDSETTINGS=1
 
-CFLAGS+=-Wall -g -finline-functions -funroll-loops
+CFLAGS+=-I./ -DBUILDID=$(BUILDID) -fPIC
+CFLAGS+=-Wall -g -finline-functions -funroll-loops -Werror=format-security
+
+@ifndef@ CLANG
 @ifndef@ NOC99
 CFLAGS+=-std=c99
 @endif@
-CFLAGS+=-I./ -DBUILDID=$(BUILDID) -fPIC -export-dynamic
+CFLAGS+=-export-dynamic
+@endif@
+