another cute piece of software that forgets -fPIC

This commit is contained in:
pvalchev 2004-06-13 05:22:37 +00:00
parent b0683b9ccf
commit 6d951d635c

View File

@ -1,5 +1,5 @@
--- gtk/makefile.orig 2003-08-10 12:55:54.000000000 +0200
+++ gtk/makefile 2003-08-14 17:35:32.000000000 +0200
--- gtk/makefile.orig 2003-08-10 04:55:54.000000000 -0600
+++ gtk/makefile 2004-06-12 23:19:17.000000000 -0600
@@ -5,7 +5,7 @@
# GNU make does not like \r\n line endings so should be saved to CVS in binary form.
# To build for GTK+ 2, define GTK2 on the make command line.
@ -9,7 +9,7 @@
CC = g++
AR = ar
RANLIB = touch
@@ -16,13 +16,16 @@
@@ -16,13 +16,16 @@ AR = ar
RANLIB = ranlib
endif
@ -28,7 +28,7 @@
ifdef NOTHREADS
THREADFLAGS=-DG_THREADS_IMPL_NONE
@@ -33,7 +36,7 @@
@@ -33,7 +36,7 @@ endif
ifdef DEBUG
CXXFLAGS=-DDEBUG -g $(CXXBASEFLAGS) $(THREADFLAGS)
else
@ -37,18 +37,18 @@
endif
ifdef GTK2
@@ -43,7 +46,9 @@
@@ -43,7 +46,9 @@ CONFIGFLAGS=gtk-config --cflags
endif
.cxx.o:
- $(CC) `$(CONFIGFLAGS)` $(CXXFLAGS) -c $<
+ $(CXX) `$(CONFIGFLAGS)` $(CXXFLAGS) -c $<
+.cxx.so:
+ $(CXX) -fpic `$(CONFIGFLAGS)` $(CXXFLAGS) -o $@ -c $<
+ $(CXX) -fPIC `$(CONFIGFLAGS)` $(CXXFLAGS) -o $@ -c $<
#++Autogenerated -- run src/LexGen.py to regenerate
#**LEXOBJS=\\\n\(\*.o \)
@@ -57,20 +62,50 @@
@@ -57,20 +62,50 @@ LexSQL.o LexVB.o
# The LEXOBJS have to be treated specially as the functions in them are not called from external code
@ -96,9 +96,9 @@
$(RANLIB) $@
+$(SHAREDLIB): $(addsuffix .so,$(basename $(LIBOBJS)))
+ $(CC) -shared -o $@ -Wl,-soname,$(notdir $(SHAREDLIB)) $^
+ $(CC) -shared -fPIC -o $@ -Wl,-soname,$(notdir $(SHAREDLIB)) $^
+$(SHAREDLEXER): $(addsuffix .so,$(basename $(LEXOBJS)))
+ $(CC) -shared -o $@ -Wl,-soname,$(notdir $(SHAREDLEXER)) $^
+ $(CC) -shared -fPIC -o $@ -Wl,-soname,$(notdir $(SHAREDLEXER)) $^
+
# Automatically generate header dependencies with "make deps"
include deps.mak