Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: GNUmakefile
- ===================================================================
- --- GNUmakefile (revision 541)
- +++ GNUmakefile (working copy)
- @@ -1,7 +1,7 @@
- -CXXFLAGS = -DNDEBUG -g -O2
- +CXXFLAGS = -DNDEBUG -g3 -Os
- # -O3 fails to link on Cygwin GCC version 4.5.3
- # -fPIC is supported. Please report any breakage of -fPIC as a bug.
- -# 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
- @@ -15,7 +15,8 @@
- IS_SUN_CC = $(shell $(CXX) -V 2>&1 | $(EGREP) -c "CC: Sun")
- IS_LINUX = $(shell $(CXX) -dumpmachine 2>&1 | $(EGREP) -c "linux")
- IS_MINGW = $(shell $(CXX) -dumpmachine 2>&1 | $(EGREP) -c "mingw")
- -CLANG_COMPILER = $(shell $(CXX) --version 2>&1 | $(EGREP) -i -c "clang version")
- +GCC_COMPILER = $(shell $(CXX) --version 2>&1 | $(EGREP) -i -c "gcc")
- +CLANG_COMPILER = $(shell $(CXX) --version 2>&1 | $(EGREP) -i -c "clang")
- # Default prefix for make install
- ifeq ($(PREFIX),)
- @@ -26,15 +27,36 @@
- CXX = g++
- endif
- +ifneq ($(GCC_COMPILER),0)
- + CXXFLAGS += -Wall -Wno-unused-value -Wno-unused-function
- +endif
- +
- +ifneq ($(CLANG_COMPILER),0)
- + CLANG_35_OR_36 = $(shell $(CXX) -v 2>&1 | $(EGREP) -c "version (3\.[5-6]\.)")
- +endif
- +
- +ifneq ($(CLANG_COMPILER),0)
- + CXXFLAGS += -stdlib=libc++ -fsanitize=address -fsanitize=undefined -Wall -Wno-tautological-compare -Wno-unused-value -Wno-unused-variable -Wno-unused-parameter -Wno-unused-function
- +endif
- +
- +ifneq ($(CLANG_35_OR_36),0)
- + CXXFLAGS += -I/usr/lib/c++/v1
- + LDLIBS += -lc++abi
- +endif
- +
- +CXXFLAGS += -I/usr/lib/c++/v1
- +
- ifeq ($(ISX86),1)
- -GCC42_OR_LATER = $(shell $(CXX) -v 2>&1 | $(EGREP) -c "^gcc version (4.[2-9]|[5-9])")
- +GCC42_OR_LATER = $(shell $(CXX) -v 2>&1 | $(EGREP) -c "^gcc version (4\.[2-9]|[5-9])")
- INTEL_COMPILER = $(shell $(CXX) --version 2>&1 | $(EGREP) -c "\(ICC\)")
- ICC111_OR_LATER = $(shell $(CXX) --version 2>&1 | $(EGREP) -c "\(ICC\) ([2-9][0-9]|1[2-9]|11\.[1-9])")
- GAS210_OR_LATER = $(shell $(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1 | $(EGREP) -c "GNU assembler version (2\.[1-9][0-9]|[3-9])")
- GAS217_OR_LATER = $(shell $(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1 | $(EGREP) -c "GNU assembler version (2\.1[7-9]|2\.[2-9]|[3-9])")
- GAS219_OR_LATER = $(shell $(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1 | $(EGREP) -c "GNU assembler version (2\.19|2\.[2-9]|[3-9])")
- +
- +
- ifneq ($(GCC42_OR_LATER),0)
- ifeq ($(UNAME),Darwin)
- CXXFLAGS += -arch x86_64 -arch i386
- @@ -89,11 +111,9 @@
- ifeq ($(UNAME),Darwin)
- AR = libtool
- ARFLAGS = -static -o
- -CXX = c++
- IS_GCC2 = $(shell $(CXX) -v 2>&1 | $(EGREP) -c gcc-932)
- ifeq ($(IS_GCC2),1)
- CXXFLAGS += -fno-coalesce-templates -fno-coalesce-static-vtables
- -LDLIBS += -lstdc++
- LDFLAGS += -flat_namespace -undefined suppress -m
- endif
- endif
- @@ -103,10 +123,6 @@
- M32OR64 = -m$(shell isainfo -b)
- endif
- -ifneq ($(CLANG_COMPILER),0)
- -CXXFLAGS += -Wno-tautological-compare
- -endif
- -
- ifneq ($(IS_SUN_CC),0) # override flags for CC Sun C++ compiler
- CXXFLAGS = -DNDEBUG -O -g0 -native -template=no%extdef $(M32OR64)
- LDFLAGS =
- @@ -165,29 +181,11 @@
- $(RANLIB) $@
- libcryptopp.so: $(LIBOBJS)
- - $(CXX) -shared -o $@ $(LIBOBJS)
- + $(CXX) $(CXXFLAGS) -shared -o $@ $(LIBOBJS)
- cryptest.exe: libcryptopp.a $(TESTOBJS)
- $(CXX) -o $@ $(CXXFLAGS) $(TESTOBJS) ./libcryptopp.a $(LDFLAGS) $(LDLIBS)
- -nolib: $(OBJS) # makes it faster to test changes
- - $(CXX) -o ct $(CXXFLAGS) $(OBJS) $(LDFLAGS) $(LDLIBS)
- -
- -dll: cryptest.import.exe dlltest.exe
- -
- -cryptopp.dll: $(DLLOBJS)
- - $(CXX) -shared -o $@ $(CXXFLAGS) $(DLLOBJS) $(LDFLAGS) $(LDLIBS) -Wl,--out-implib=libcryptopp.dll.a
- -
- -libcryptopp.import.a: $(LIBIMPORTOBJS)
- - $(AR) $(ARFLAGS) $@ $(LIBIMPORTOBJS)
- - $(RANLIB) $@
- -
- -cryptest.import.exe: cryptopp.dll libcryptopp.import.a $(TESTIMPORTOBJS)
- - $(CXX) -o $@ $(CXXFLAGS) $(TESTIMPORTOBJS) -L. -lcryptopp.dll -lcryptopp.import $(LDFLAGS) $(LDLIBS)
- -
- -dlltest.exe: cryptopp.dll $(DLLTESTOBJS)
- - $(CXX) -o $@ $(CXXFLAGS) $(DLLTESTOBJS) -L. -lcryptopp.dll $(LDFLAGS) $(LDLIBS)
- -
- adhoc.cpp: adhoc.cpp.proto
- ifeq ($(wildcard adhoc.cpp),)
- cp adhoc.cpp.proto adhoc.cpp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement