X-Git-Url: https://jfr.im/git/irc/quakenet/newserv.git/blobdiff_plain/3148e566b53ef314f7b5ceab2749c8946013675a..f28b61f26dec986fb87602b5c75ad812b8297d85:/build.mk.in diff --git a/build.mk.in b/build.mk.in index d2fb54b4..efd26ce8 100644 --- a/build.mk.in +++ b/build.mk.in @@ -14,9 +14,9 @@ HOOK_ENGINE=old endif ifndef BUILDID -BUILDID = $(shell (hg id || echo "unknown") | sed -e "s/[()]//g;s/+ /+/g;s/ /-/g" ) +BUILDID := "$(shell (git describe --long --dirty --all --abbrev=10 || echo "unknown"))" endif -MFLAGS+=BUILDID=$(BUILDID) +MFLAGS+=BUILDID='${BUILDID}' default: all @@ -26,7 +26,7 @@ default: all .c.o: @if [ ! -d .deps ]; then mkdir .deps || true; fi - $(CC) $(CFLAGS) -MMD -MF .deps/$(subst .o,.d,$@) -c -o $@ $< + $(CC) $(CFLAGS) -MMD -MF .deps/$(subst .o,.d,$@) -fPIC -c -o $@ $< .o.so: $(CC) -nostartfiles -Wl,--export-dynamic -shared -o $@ $^ $(LDFLAGS) @@ -35,8 +35,9 @@ default: all .l.c: ; -CFLAGS+=-I./ -DBUILDID=$(BUILDID) -fPIC +CFLAGS+=-I. -I.. -DBUILDID='${BUILDID}' CFLAGS+=-Wall -g -finline-functions -funroll-loops -Werror=format-security +EXECFLAGS= ifndef NOC99 CFLAGS+=-std=c99