]> jfr.im git - irc/quakenet/newserv.git/commitdiff
Fix static linking and buildid.
authorChris Porter <redacted>
Mon, 17 Mar 2008 20:09:04 +0000 (20:09 +0000)
committerChris Porter <redacted>
Mon, 17 Mar 2008 20:09:04 +0000 (20:09 +0000)
build.mk.in
lib/version.h

index 6b5917bf4a76fb36f4e0292f56cd942946c9d4d8..ab0cf3752e2b9cf5fa9b123ebb7a64ed7cf14841 100644 (file)
@@ -13,7 +13,7 @@ BUILDID @shell@ (hg id || echo "unknown") | sed -e "s/+ /-/;s/ /-/" @shellend@
 .SUFFIXES: .so
 
 .o.so:
-       ld -shared -Bdynamic $(LDFLAGS) -o $@ @srcs@
+       ld -shared -Bdynamic -o $@ @srcs@ $(LDFLAGS)
 
 CC=gcc
 CFLAGS+=-Wall -g -finline-functions -funroll-loops -std=c99 -I./ -DBUILDID=$(BUILDID)
index 582ec971fc12c13e4d38a2013c38c64c68f1f8a1..38f9214715d4a5307c0cc967bb7f80e26521d4a3 100644 (file)
@@ -5,7 +5,9 @@
 #ifndef BUILDID
 #define _BUILDID "unknown"
 #else
-#define _BUILDID "BUILDID"
+#define XStringify(x) Stringify(x)
+#define Stringify(x) #x
+#define _BUILDID "" XStringify(BUILDID) ""
 #endif
 
 #define MODULE_VERSION(id) const char *_version(void) { return (id[0]=='\0')?_BUILDID:(id "/" _BUILDID); };