2009-08-11 11:52:29 +04:00
|
|
|
Build position-independent code, for shared libraries. Fix $(DLLSRCS)
|
|
|
|
while we're at it (it lacks `pssr.cpp', for instance).
|
2009-08-11 03:50:07 +04:00
|
|
|
|
|
|
|
--- a/GNUmakefile 2009-03-15 02:48:02.000000000 +0100
|
|
|
|
+++ b/GNUmakefile 2009-08-11 00:13:43.000000000 +0200
|
2009-08-11 11:52:29 +04:00
|
|
|
@@ -104,6 +104,7 @@ TESTOBJS = bench.o bench2.o test.o valid
|
|
|
|
LIBOBJS = $(filter-out $(TESTOBJS),$(OBJS))
|
|
|
|
|
|
|
|
DLLSRCS = algebra.cpp algparam.cpp asn.cpp basecode.cpp cbcmac.cpp channels.cpp cryptlib.cpp des.cpp dessp.cpp dh.cpp dll.cpp dsa.cpp ec2n.cpp eccrypto.cpp ecp.cpp eprecomp.cpp files.cpp filters.cpp fips140.cpp fipstest.cpp gf2n.cpp gfpcrypt.cpp hex.cpp hmac.cpp integer.cpp iterhash.cpp misc.cpp modes.cpp modexppc.cpp mqueue.cpp nbtheory.cpp oaep.cpp osrng.cpp pch.cpp pkcspad.cpp pubkey.cpp queue.cpp randpool.cpp rdtables.cpp rijndael.cpp rng.cpp rsa.cpp sha.cpp simple.cpp skipjack.cpp strciphr.cpp trdlocal.cpp
|
|
|
|
+DLLSRCS = $(SRCS)
|
|
|
|
DLLOBJS = $(DLLSRCS:.cpp=.export.o)
|
|
|
|
LIBIMPORTOBJS = $(LIBOBJS:.o=.import.o)
|
|
|
|
TESTIMPORTOBJS = $(TESTOBJS:.o=.import.o)
|
2009-08-11 03:50:07 +04:00
|
|
|
@@ -162,7 +162,7 @@ endif
|
|
|
|
$(CXX) $(CXXFLAGS) -DCRYPTOPP_IMPORTS -c $< -o $@
|
|
|
|
|
|
|
|
%.export.o : %.cpp
|
|
|
|
- $(CXX) $(CXXFLAGS) -DCRYPTOPP_EXPORTS -c $< -o $@
|
|
|
|
+ $(CXX) $(CXXFLAGS) -fPIC -DCRYPTOPP_EXPORTS -c $< -o $@
|
|
|
|
|
|
|
|
%.o : %.cpp
|
|
|
|
$(CXX) $(CXXFLAGS) -c $<
|