]> jfr.im git - irc/quakenet/newserv.git/commitdiff
Add ability to set osvars in configure.ini.local and split -fPIC out.
authorChris Porter <redacted>
Sat, 8 Feb 2014 00:31:56 +0000 (00:31 +0000)
committerChris Porter <redacted>
Sat, 8 Feb 2014 00:31:56 +0000 (00:31 +0000)
--HG--
branch : chanserv-live

Makefile
build.mk.in
configure
sqlite/Makefile

index 4bd32f3d297b6979c8e6ff33dfe9ac731adf2d2a..22e42e36dc651586190bb1380b184253e4be9121 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@ OBJS += lib/hmac.o lib/prng.o lib/stringbuf.o lib/cbc.o
 all: $(DIRS) newserv
 
 newserv: $(OBJS)
-       $(CC) $(CFLAGS) -Wl,--export-dynamic $(LDFLAGS) -o $@ $^ $(LIBDL) -lm
+       $(CC) $(CFLAGS) -Wl,--export-dynamic $(LDFLAGS) -o $@ $^ $(LIBDL) $(EXECFLAGS) -lm
 
 $(DIRS):
        cd $@ && $(MAKE) $(MFLAGS) all
index 06d39d2d0734e35208fcddfdff87443c3ccacd17..002885e5e2ad5ca0e5f97104f71567ed53f6a570 100644 (file)
@@ -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. -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
index 358fd4c334ec279406ca69e6dd95c24fad8fb5c1..6538c54e9eccf571cd0b6c15ec83900e46c55e83 100755 (executable)
--- a/configure
+++ b/configure
@@ -138,6 +138,10 @@ class MultiConfigureIniParser(ConfigureIniParser):
       if c2.has_key("options"):
         self.options.update(c2["options"])
 
+      if c2.has_key("osvars"):
+        for k, v in c2.keys("osvars"):
+          self.osflags.setdefault(k, []).append(v)
+
 def librarycheck(libraries, includes, libs):
   def findlibrarypaths(library, x, includes, libs):
     if x["alwayspresent"]:
index 1b1335dda55bc4a18ba0da4421fa1b9f56a927bb..f883dea5da1c9258aa59d12c4cfeedcb33a3520d 100644 (file)
@@ -6,7 +6,7 @@ LDFLAGS+=-lc
 all: sqlite.so sqlite-dbapi2.so
 
 libsqlite3.o: libsqlite3.c libsqlite3/sqlite3.c
-       $(CC) $(CFLAGS) -c libsqlite3.c -w
+       $(CC) $(CFLAGS) -c libsqlite3.c -fPIC -w
 
 sqlite.so: sqlite.o libsqlite3.o