aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-11-07 01:06:36 +0000
committerlloyd <[email protected]>2008-11-07 01:06:36 +0000
commit5be539461d4b491bb387b5444ebfc9b60b4cddda (patch)
treecf1480ee1a2b155f670d5b64b6f589cb000968c4 /doc
parent08ab0ca8887785231d4203a294a6499e9968cd8d (diff)
Make the examples Makefile a bit smarter
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/GNUmakefile18
1 files changed, 8 insertions, 10 deletions
diff --git a/doc/examples/GNUmakefile b/doc/examples/GNUmakefile
index 0318e3016..655b9b0f0 100644
--- a/doc/examples/GNUmakefile
+++ b/doc/examples/GNUmakefile
@@ -1,14 +1,12 @@
-# Assumes Botan was compiled with GCC
-BOTAN_DIR = ../..
+# You must modify generated botan-17-config for workspace builds
+# (see that file for details), or else install Botan and direct
+# this to the installed system version.
+BOTAN_CONFIG = ../../build/botan-17-config --prefix=../..
CXX = g++
-CFLAGS = -O2 -ansi -W -Wall
-
-INCLUDES = $(shell $(BOTAN_DIR)/botan-17-config --cflags)
-
-LIBS = $(shell $(BOTAN_DIR)/botan-17-config --libs)
-FLAGS = $(INCLUDES) $(CFLAGS) -I$(BOTAN_DIR)/build/include -L$(BOTAN_DIR)
+CFLAGS = -O2 -ansi -W -Wall $(shell $(BOTAN_CONFIG) --cflags)
+LIBS = $(shell $(BOTAN_CONFIG) --libs)
SRCS=$(wildcard *.cpp)
@@ -20,7 +18,7 @@ clean:
@rm -f $(PROGS)
%: %.cpp
- $(CXX) $(FLAGS) $? $(LIBS) -o $@
+ $(CXX) $(CFLAGS) $? $(LIBS) -o $@
eax_test: eax_test.cpp
- $(CXX) $(FLAGS) $? $(LIBS) -lboost_regex -o $@
+ $(CXX) $(CFLAGS) $? $(LIBS) -lboost_regex -o $@