diff options
author | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2011-09-19 01:37:29 +0000 |
---|---|---|
committer | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2011-09-19 01:37:29 +0000 |
commit | ce53d49e61043b2bf2b6b96cfc5ed1fe70797348 (patch) | |
tree | 9fa3c06d045a4ac0648fabe41338782570659960 /GNUmakefile | |
parent | 7842a8fa333f5cdc62daaaa06e57a80850cd9f4b (diff) | |
download | cryptopp-ce53d49e61043b2bf2b6b96cfc5ed1fe70797348.tar.gz |
From Jeff Walton:
* added 'static' and 'dynamic' targets
* added libcryptopp.so to cleanup
* continue install/cleanup on error
* force cryptest.exe to link with static library
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@530 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/GNUmakefile b/GNUmakefile index e664084..93e3d89 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -132,19 +132,27 @@ TESTIMPORTOBJS = $(TESTOBJS:.o=.import.o) DLLTESTOBJS = dlltest.dllonly.o all: cryptest.exe +static: libcryptopp.a +dynamic: libcryptopp.so test: cryptest.exe ./cryptest.exe v clean: - $(RM) cryptest.exe libcryptopp.a $(LIBOBJS) $(TESTOBJS) cryptopp.dll libcryptopp.dll.a libcryptopp.import.a cryptest.import.exe dlltest.exe $(DLLOBJS) $(LIBIMPORTOBJS) $(TESTIMPORTOBJS) $(DLLTESTOBJS) + -$(RM) cryptest.exe libcryptopp.a libcryptopp.so $(LIBOBJS) $(TESTOBJS) cryptopp.dll libcryptopp.dll.a libcryptopp.import.a cryptest.import.exe dlltest.exe $(DLLOBJS) $(LIBIMPORTOBJS) $(TESTI MPORTOBJS) $(DLLTESTOBJS) -install: +install: static dynamic cryptest.exe $(MKDIR) -p $(PREFIX)/include/cryptopp $(PREFIX)/lib $(PREFIX)/bin - $(CP) *.h $(PREFIX)/include/cryptopp - $(CP) *.a $(PREFIX)/lib - $(CP) *.so $(PREFIX)/lib - $(CP) *.exe $(PREFIX)/bin + -$(CP) *.h $(PREFIX)/include/cryptopp + -$(CP) *.a $(PREFIX)/lib + -$(CP) *.so $(PREFIX)/lib + -$(CP) *.exe $(PREFIX)/bin + +remove: + -$(RM) -rf $(PREFIX)/include/cryptopp + -$(RM) $(PREFIX)/lib/libcryptopp.a + -$(RM) $(PREFIX)/lib/libcryptopp.so + -$(RM) $(PREFIX)/bin/cryptest.exe libcryptopp.a: $(LIBOBJS) $(AR) $(ARFLAGS) $@ $(LIBOBJS) @@ -154,7 +162,7 @@ libcryptopp.so: $(LIBOBJS) $(CXX) -shared -o $@ $(LIBOBJS) cryptest.exe: libcryptopp.a $(TESTOBJS) - $(CXX) -o $@ $(CXXFLAGS) $(TESTOBJS) -L. -lcryptopp $(LDFLAGS) $(LDLIBS) + $(CXX) -o $@ $(CXXFLAGS) $(TESTOBJS) ./libcryptopp.a $(LDFLAGS) $(LDLIBS) nolib: $(OBJS) # makes it faster to test changes $(CXX) -o ct $(CXXFLAGS) $(OBJS) $(LDFLAGS) $(LDLIBS) |