diff options
author | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2006-12-09 17:09:01 +0000 |
---|---|---|
committer | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2006-12-09 17:09:01 +0000 |
commit | b84112eb4cb5e06b79fafd28f208af0417184f5e (patch) | |
tree | e8a4f73acdbf386274c08f645a5135a772af2675 /GNUmakefile | |
parent | 8e0165bbd04c41f0bf7127af551010c5e16de0bf (diff) | |
download | cryptopp-b84112eb4cb5e06b79fafd28f208af0417184f5e.tar.gz |
add -pthread and allow make install
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@242 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/GNUmakefile b/GNUmakefile index 569b32f..7e7358d 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -6,13 +6,20 @@ CXXFLAGS = -g # after turning on -O2. The GCC optimizer may have bugs that cause it to generate incorrect code. # Try removing -fdata-sections if you get "undefined external reference" errors. # CXXFLAGS = -O2 -DNDEBUG -ffunction-sections -fdata-sections -# LDFLAGS = -Wl,--gc-sections +# LDFLAGS += -Wl,--gc-sections ARFLAGS = -cr # ar needs the dash on OpenBSD RANLIB = ranlib +CP = cp +MKDIR = mkdir UNAME = $(shell uname) ISX86 = $(shell uname -m | grep -c "i.86\|x86_64") ISMINGW = $(shell uname | grep -c "MINGW32") +# Default prefix for make install +ifeq ($(PREFIX),) +PREFIX = /usr +endif + ifeq ($(CXX),gcc) # for some reason CXX is gcc on cygwin 1.1.4 CXX = g++ endif @@ -42,6 +49,10 @@ else CXXFLAGS += -pipe endif +ifeq ($(UNAME),Linux) +LDFLAGS += -pthread +endif + ifeq ($(UNAME),Darwin) AR = libtool ARFLAGS = -static -o @@ -80,6 +91,12 @@ all: cryptest.exe 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) +install: + $(MKDIR) -p $(PREFIX)/include/cryptopp $(PREFIX)/lib $(PREFIX)/bin + $(CP) *.h $(PREFIX)/include/cryptopp + $(CP) *.a $(PREFIX)/lib + $(CP) *.exe $(PREFIX)/bin + libcryptopp.a: $(LIBOBJS) $(AR) $(ARFLAGS) $@ $(LIBOBJS) $(RANLIB) $@ |