2010-12-16 23:45:58 +00:00
|
|
|
--- GNUmakefile.orig 2010-08-09 14:22:42.000000000 +0200
|
|
|
|
|
+++ GNUmakefile 2010-12-16 15:58:54.174167505 +0100
|
|
|
|
|
@@ -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
|
|
|
|
|
@@ -134,26 +134,29 @@
|
|
|
|
|
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
|
2010-12-16 23:45:58 +00:00
|
|
|
+ $(CP) libcryptopp.so.$(VERSION) $(DESTDIR)$(PREFIX)/$(LIB)
|
|
|
|
|
+ ln -s libcryptopp.so.$(VERSION) $(DESTDIR)$(PREFIX)/$(LIB)/libcryptopp.so.$(MAJOR)
|
|
|
|
|
+ ln -s libcryptopp.so.$(MAJOR) $(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)
|
|
|
|
|
+ $(CXX) -shared -Wl,-soname,libcryptopp.so.$(MAJOR) -o libcryptopp.so.$(VERSION) $(LIBOBJS) $(LDFLAGS) $(LDLIBS)
|
2010-08-09 22:30:27 +00:00
|
|
|
+ ln -s libcryptopp.so.$(VERSION) libcryptopp.so.$(MAJOR)
|
2010-12-16 23:45:58 +00:00
|
|
|
+ ln -s libcryptopp.so.$(MAJOR) $@
|
|
|
|
|
|
|
|
|
|
-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
|