summaryrefslogtreecommitdiff
path: root/GNUmakefile
diff options
context:
space:
mode:
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: