summaryrefslogtreecommitdiff
path: root/GNUmakefile
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2002-12-06 22:02:46 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2002-12-06 22:02:46 +0000
commita3f0af934e387ba259919f0b72b42120eef3bc5c (patch)
treedf9cff822523331cad30742ddb34056544c7a80d /GNUmakefile
parentf8840dc745d13414205c944b2ffc0796837340f5 (diff)
downloadcryptopp-a3f0af934e387ba259919f0b72b42120eef3bc5c.tar.gz
add script-driven testing
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@24 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile15
1 files changed, 12 insertions, 3 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 4308679..375e531 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -1,6 +1,9 @@
# can't use -fno-rtti yet because it causes problems with exception handling in GCC 2.95.2
CXXFLAGS = -g
-# uncomment the next two lines to do a release build
+# Uncomment the next two lines to do a release build.
+# Note that you must define NDEBUG for your own application if you define it for Crypto++.
+# Also, make sure you run the validation tests and test your own program thoroughly
+# after turning on -O2. The GCC optimizer may have bugs that cause it to generate incorrect code.
# CXXFLAGS = -O2 -DNDEBUG -ffunction-sections -fdata-sections
# LDFLAGS = -Wl,--gc-sections
ARFLAGS = -cr # ar needs the dash on OpenBSD
@@ -29,14 +32,13 @@ CXX = g++
endif
SRCS = $(wildcard *.cpp)
-
ifeq ($(SRCS),) # workaround wildcard function bug in GNU Make 3.77
SRCS = $(shell ls *.cpp)
endif
OBJS = $(SRCS:.cpp=.o)
# test.o needs to be after bench.o for cygwin 1.1.4 (possible ld bug?)
-TESTOBJS = bench.o test.o validat1.o validat2.o validat3.o
+TESTOBJS = bench.o test.o validat1.o validat2.o validat3.o adhoc.o datatest.o regtest.o
LIBOBJS = $(filter-out $(TESTOBJS),$(OBJS))
all: cryptest.exe
@@ -54,6 +56,13 @@ cryptest.exe: libcryptopp.a $(TESTOBJS)
nolib: $(OBJS) # makes it faster to test changes
$(CXX) -o ct $(CXXFLAGS) $(OBJS) $(LDFLAGS) $(LDLIBS)
+adhoc.cpp: adhoc.cpp.proto
+ifeq ($(wildcard adhoc.cpp),)
+ cp adhoc.cpp.proto adhoc.cpp
+else
+ touch adhoc.cpp
+endif
+
.SUFFIXES: .cpp
.cpp.o: