]> jfr.im git - irc/quakenet/newserv.git/blobdiff - build.mk.in
Parser help is now an sstring.
[irc/quakenet/newserv.git] / build.mk.in
index d2e335cc7de1173c42767d1b87baaa556ed33a09..7db103d4cf5bd59dc229196b8e46c91c9207e372 100644 (file)
@@ -1,16 +1,20 @@
-ifeq ($(INCPATH),)
+@ifndef@ INCPATH
 INCPATH=../
-endif
+@endif@
+
+CFLAGS=
 
-@include@ @includel@$(INCPATH)configure.mk@includel@
 @sinclude@ @includel@$(INCPATH)settings.mk@includel@
 
-ifeq ($(BUILDID),)
-BUILDID := \"$(shell (hg id || echo "unknown") | sed -e "s/ /-/;s/+-/-/")\"
-export BUILDID
-endif
+@ifndef@ BUILDID
+BUILDID @shell@ (hg id || echo "unknown") | sed -e "s/+ /-/;s/ /-/" @shellend@
+@endif@
 
-CC=gcc
-CFLAGS+=-Wall -g -fPIC -export-dynamic -finline-functions -funroll-loops -std=c99 -I./ -DBUILDID=${BUILDID}
+.SUFFIXES: .so
 
-export CC CFLAGS
+.o.so:
+       @-ldline-@ $(LDFLAGS)
+
+CC=gcc
+CFLAGS+=-Wall -g -finline-functions -funroll-loops -std=c99 -I./ -DBUILDID=$(BUILDID)
+CFLAGS+=-fPIC -export-dynamic