2012-02-06 00:02:57 +00:00
|
|
|
---
|
|
|
|
|
GNUmakefile | 19 ++++++++++---------
|
|
|
|
|
1 file changed, 10 insertions(+), 9 deletions(-)
|
|
|
|
|
|
|
|
|
|
Index: GNUmakefile
|
|
|
|
|
===================================================================
|
|
|
|
|
--- GNUmakefile.orig
|
|
|
|
|
+++ GNUmakefile
|
2010-12-16 23:45:58 +00:00
|
|
|
@@ -1,7 +1,7 @@
|
|
|
|
|
CXXFLAGS = -DNDEBUG -g -O2
|
2010-08-09 22:30:27 +00:00
|
|
|
#CXXFLAGS = -g
|
|
|
|
|
# -fPIC is supported. Please report any breakage of -fPIC as a bug.
|
2010-12-16 23:45:58 +00:00
|
|
|
-# CXXFLAGS += -fPIC
|
|
|
|
|
+CXXFLAGS += -fPIC
|
|
|
|
|
# the following options reduce code size, but breaks link or makes link very slow on some systems
|
|
|
|
|
# CXXFLAGS += -ffunction-sections -fdata-sections
|
|
|
|
|
# LDFLAGS += -Wl,--gc-sections
|
2012-02-06 00:02:57 +00:00
|
|
|
@@ -134,26 +134,27 @@ DLLTESTOBJS = dlltest.dllonly.o
|
2010-12-16 23:45:58 +00:00
|
|
|
all: cryptest.exe
|
2010-08-09 22:30:27 +00:00
|
|
|
|
|
|
|
|
test: cryptest.exe
|
2010-12-16 23:45:58 +00:00
|
|
|
- ./cryptest.exe v
|
|
|
|
|
+ LD_LIBRARY_PATH=. ./cryptest.exe v
|
|
|
|
|
|
|
|
|
|
clean:
|
2010-08-09 22:30:27 +00:00
|
|
|
$(RM) cryptest.exe libcryptopp.a $(LIBOBJS) $(TESTOBJS) cryptopp.dll libcryptopp.dll.a libcryptopp.import.a cryptest.import.exe dlltest.exe $(DLLOBJS) $(LIBIMPORTOBJS) $(TESTIMPORTOBJS) $(DLLTESTOBJS)
|
|
|
|
|
|
|
|
|
|
install:
|
|
|
|
|
- $(MKDIR) -p $(PREFIX)/include/cryptopp $(PREFIX)/lib $(PREFIX)/bin
|
|
|
|
|
- $(CP) *.h $(PREFIX)/include/cryptopp
|
|
|
|
|
- $(CP) *.a $(PREFIX)/lib
|
2010-12-16 23:45:58 +00:00
|
|
|
- $(CP) *.so $(PREFIX)/lib
|
2010-08-09 22:30:27 +00:00
|
|
|
- $(CP) *.exe $(PREFIX)/bin
|
|
|
|
|
+ $(MKDIR) -p $(DESTDIR)$(PREFIX)/include/cryptopp $(DESTDIR)$(PREFIX)/$(LIB) $(DESTDIR)$(PREFIX)/bin
|
|
|
|
|
+ $(CP) *.h $(DESTDIR)$(PREFIX)/include/cryptopp
|
2012-02-06 00:02:57 +00:00
|
|
|
+ $(CP) libcryptopp${LIBSUFFIX}.so.0 $(DESTDIR)$(PREFIX)/$(LIB)
|
|
|
|
|
+ ln -s libcryptopp${LIBSUFFIX}.so.0 $(DESTDIR)$(PREFIX)/$(LIB)/libcryptopp.so
|
2010-08-09 22:30:27 +00:00
|
|
|
+ $(CP) *.exe $(DESTDIR)$(PREFIX)/bin
|
|
|
|
|
|
|
|
|
|
libcryptopp.a: $(LIBOBJS)
|
|
|
|
|
$(AR) $(ARFLAGS) $@ $(LIBOBJS)
|
|
|
|
|
$(RANLIB) $@
|
|
|
|
|
|
2010-12-16 23:45:58 +00:00
|
|
|
libcryptopp.so: $(LIBOBJS)
|
|
|
|
|
- $(CXX) -shared -o $@ $(LIBOBJS)
|
2012-02-06 00:02:57 +00:00
|
|
|
+ $(CXX) -shared -Wl,-soname,libcryptopp${LIBSUFFIX}.so.0 -o libcryptopp${LIBSUFFIX}.so.0 $(LIBOBJS) $(LDFLAGS) $(LDLIBS)
|
|
|
|
|
+ ln -s libcryptopp${LIBSUFFIX}.so.0 $@
|
2010-12-16 23:45:58 +00:00
|
|
|
|
|
|
|
|
-cryptest.exe: libcryptopp.a $(TESTOBJS)
|
|
|
|
|
+cryptest.exe: libcryptopp.so $(TESTOBJS)
|
|
|
|
|
$(CXX) -o $@ $(CXXFLAGS) $(TESTOBJS) -L. -lcryptopp $(LDFLAGS) $(LDLIBS)
|
2010-08-09 22:30:27 +00:00
|
|
|
|
|
|
|
|
nolib: $(OBJS) # makes it faster to test changes
|