-@include@ @includel@configure.mk@includel@
-@sinclude@ @includel@settings.mk@includel@
+@ifndef@ INCPATH
+INCPATH=../
+@endif@
-BUILDID := \"$(shell (hg id || echo "unknown") | sed -e "s/ /-/;s/+-/-/")\"
+CFLAGS=
-CC=gcc
-CFLAGS+=-Wall -g -fPIC -export-dynamic -finline-functions -funroll-loops -std=c99 -I./ -DBUILDID=${BUILDID}
+@sinclude@ @includel@$(INCPATH)settings.mk@includel@
+
+@ifndef@ BUILDID
+BUILDID @shell@ (hg id || echo "unknown") | sed -e "s/+ /-/;s/ /-/" @shellend@
+@endif@
+
+.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