[SCM] Development fot GoFind! branch, makelib, updated. 145e64f592bd7c8cfeecf9199ea9ea2fdbb277cb

Miriam Ruiz miriam at debian.org
Thu Dec 11 12:12:18 UTC 2008


The following commit has been merged in the makelib branch:
commit 145e64f592bd7c8cfeecf9199ea9ea2fdbb277cb
Author: Miriam Ruiz <miriam at debian.org>
Date:   Thu Dec 11 13:17:31 2008 +0100

    Create a proper static library without PIC

diff --git a/Makefile b/Makefile
index 7a200ef..408b210 100644
--- a/Makefile
+++ b/Makefile
@@ -21,7 +21,9 @@
 MAJOR=0
 MINOR=0
 
-CFLAGS= -O2 -g `pkg-config libtagcoll2 boolstuff-0.1 --cflags` -Wall -fPIC
+PKGCONFIG_CFLAGS= `pkg-config libtagcoll2 boolstuff-0.1 --cflags`
+STATIC_CFLAGS= -O2 -g -Wall
+CFLAGS= $(STATIC_CFLAGS) -fPIC
 LDFLAGS= -Wl,-z,defs -Wl,--as-needed -Wl,--no-undefined
 PLUGINS_LDFLAGS= 
 LIBS= -lept -lept-core -lapt-pkg -lxapian -ldl `pkg-config libtagcoll2 boolstuff-0.1 --libs`
@@ -57,7 +59,7 @@ libgofind.so: libgofind.so.$(MAJOR).$(MINOR)
 	rm -f $@
 	ln -s $@.$(MAJOR) $@
 
-libgofind.a: $(LIB_OBJS)
+libgofind.a: $(LIB_OBJS:.o=.static.o)
 	ar cru $@ $+
 
 gui_cli.so: gui_cli.o
@@ -78,20 +80,26 @@ gui_luagtk.so : gui_lua.o gui_luagtk.o
 	g++ $(PLUGINS_LDFLAGS) -shared $^ -o $@ `pkg-config lua5.1 --libs` $(LIBS) -llua5.1-gtk
 
 gui_lua.o: gui_lua.cpp
-	g++ -o $@ -c $+ $(CFLAGS) `pkg-config lua5.1 --cflags`
+	g++ -o $@ -c $+ $(CFLAGS) $(PKGCONFIG_CFLAGS) `pkg-config lua5.1 --cflags`
 
 gui_luagtk.o: gui_luagtk.cpp
-	g++ -o $@ -c $+ $(CFLAGS) `pkg-config lua5.1 --cflags`
+	g++ -o $@ -c $+ $(CFLAGS) $(PKGCONFIG_CFLAGS) `pkg-config lua5.1 --cflags`
 
 %.o: %.cpp
-	g++ -o $@ -c $+ $(CFLAGS)
+	g++ -o $@ -c $+ $(CFLAGS) $(PKGCONFIG_CFLAGS)
 
 %.o: %.c
-	gcc -o $@ -c $+ $(CFLAGS)
+	gcc -o $@ -c $+ $(CFLAGS) $(PKGCONFIG_CFLAGS)
 
 %.so : %.o
 	g++ $(LDFLAGS) -shared $^ -o $@
 
+%.static.o: %.cpp
+	g++ -o $@ -c $+ $(STATIC_CFLAGS) $(PKGCONFIG_CFLAGS)
+
+%.static.o: %.c
+	gcc -o $@ -c $+ $(STATIC_CFLAGS) $(PKGCONFIG_CFLAGS)
+
 TEST_OBJS=  filter.test.o taghandler.test.o cfgmanager.test.o boolparser.test.o slre.test.o utf8.test.o CuTest.o dll.test.o test.o
 TEST_PLUGINS= testplugin.test.so
 
@@ -102,16 +110,16 @@ test.c:
 	sh CuTest.sh > $@
 
 test.o: test.c
-	gcc -o $@ -DUNIT_TEST -c $+ $(CFLAGS)
+	gcc -o $@ -DUNIT_TEST -c $+ $(CFLAGS) $(PKGCONFIG_CFLAGS)
 
 %.test.o: %.cpp
-	g++ -o $@ -DUNIT_TEST -c $+ $(CFLAGS)
+	g++ -o $@ -DUNIT_TEST -c $+ $(CFLAGS) $(PKGCONFIG_CFLAGS)
 
 %.test.o: %.c
-	gcc -o $@ -DUNIT_TEST -c $+ $(CFLAGS)
+	gcc -o $@ -DUNIT_TEST -c $+ $(CFLAGS) $(PKGCONFIG_CFLAGS)
 
 %.test.so : %.test.o
-	g++ $(CFLAGS)  -DUNIT_TEST -shared $^ -o $@
+	g++ $(CFLAGS) $(PKGCONFIG_CFLAGS) -DUNIT_TEST -shared $^ -o $@
 
 clean:
 	rm -f gofind test test.c cli/*.o fltk/*.o *.o *.so *.so* *.a

-- 
Development fot GoFind!



More information about the Pkg-games-commits mailing list