aboutsummaryrefslogtreecommitdiffstats
path: root/src/build-data
diff options
context:
space:
mode:
Diffstat (limited to 'src/build-data')
-rw-r--r--src/build-data/makefile/gmake.in14
-rw-r--r--src/build-data/makefile/nmake.in22
2 files changed, 28 insertions, 8 deletions
diff --git a/src/build-data/makefile/gmake.in b/src/build-data/makefile/gmake.in
index b5d14a601..bcaa5b9a0 100644
--- a/src/build-data/makefile/gmake.in
+++ b/src/build-data/makefile/gmake.in
@@ -6,10 +6,12 @@ LANG_FLAGS = %{lang_flags}
WARN_FLAGS = %{warn_flags}
SO_OBJ_FLAGS = %{shared_flags}
LIB_LINKS_TO = %{link_to}
-APP_LINKS_TO = $(LIB_LINKS_TO) -lboost_regex -lboost_thread
+APP_LINKS_TO = $(LIB_LINKS_TO) -lboost_thread
+TEST_LINKS_TO = $(LIB_LINKS_TO) -lboost_filesystem
LIB_FLAGS = $(SO_OBJ_FLAGS) $(LANG_FLAGS) $(LIB_OPT) $(WARN_FLAGS)
APP_FLAGS = $(LANG_FLAGS) $(APP_OPT) $(WARN_FLAGS)
+TEST_FLAGS = $(LANG_FLAGS) $(APP_OPT) $(WARN_FLAGS)
# Version Numbers
VERSION = %{version}
@@ -44,6 +46,7 @@ RM_R = @rm -rf
# Targets
APP = %{app_prefix}botan
+TEST = %{app_prefix}botan-test
LIBRARIES = $(STATIC_LIB)
LIBNAME = %{lib_prefix}libbotan
@@ -51,7 +54,7 @@ STATIC_LIB = $(LIBNAME)-$(BRANCH).a
LIBPATH = botan-$(BRANCH)
-all: $(APP)
+all: $(APP) $(TEST)
# File Lists
INCLUDE_DIR = %{botan_include_dir}
@@ -60,17 +63,24 @@ LIBOBJS = %{lib_objs}
APPOBJS = %{app_objs}
+TESTOBJS = %{test_objs}
+
# Build Commands
%{lib_build_cmds}
%{app_build_cmds}
+%{test_build_cmds}
+
# Link Commands
%{shared_makefile}
$(APP): $(LIBRARIES) $(APPOBJS)
$(CXX) $(LDFLAGS) $(APPOBJS) -L. -l$(LIBPATH) $(APP_LINKS_TO) -o $(APP)
+$(TEST): $(LIBRARIES) $(TESTOBJS)
+ $(CXX) $(LDFLAGS) $(TESTOBJS) -L. -l$(LIBPATH) $(TEST_LINKS_TO) -o $(TEST)
+
$(STATIC_LIB): $(LIBOBJS)
$(RM) $(STATIC_LIB)
$(AR) $(STATIC_LIB) $(LIBOBJS)
diff --git a/src/build-data/makefile/nmake.in b/src/build-data/makefile/nmake.in
index 392684214..413428803 100644
--- a/src/build-data/makefile/nmake.in
+++ b/src/build-data/makefile/nmake.in
@@ -1,15 +1,17 @@
### Compiler Options
CXX = %{cc}
LIB_OPT = %{lib_opt}
-APP_OPT = %{app_opt}
+APP_OPT = %{app_opt}
LANG_FLAGS = %{lang_flags}
WARN_FLAGS = %{warn_flags}
SO_OBJ_FLAGS = %{shared_flags}
LIB_LINK_CMD = %{so_link}
-LINK_TO = %{link_to}
+APP_LINKS_TO = $(LIB_LINKS_TO) -lboost_thread
+TEST_LINKS_TO = $(LIB_LINKS_TO) -lboost_filesystem
LIB_FLAGS = $(LIB_OPT) $(LANG_FLAGS) $(WARN_FLAGS) $(SO_OBJ_FLAGS)
-APP_FLAGS = $(APP_OPT) $(LANG_FLAGS) $(WARN_FLAGS)
+APP_FLAGS = $(APP_OPT) $(LANG_FLAGS) $(WARN_FLAGS)
+TEST_FLAGS = $(APP_OPT) $(LANG_FLAGS) $(WARN_FLAGS)
### Version Numbers
VERSION = %{version}
@@ -31,11 +33,14 @@ RM_R = $(RM) /S
RMDIR = @rmdir
### File Lists
-APP = botan
+APP = botan
+TEST = botan-test
LIBOBJS = %{lib_objs}
-APPOBJS = %{app_objs}
+APPOBJS = %{app_objs}
+
+TESTOBJS = %{test_objs}
LIBNAME = botan
@@ -44,17 +49,22 @@ LIBRARIES = $(BOTAN_LIB)
# This will be either a static lib or the DLL import lib
BOTAN_LIB = $(LIBNAME).%{static_suffix}
-all: $(APP)
+all: $(APP) $(TEST)
### Build Commands
%{lib_build_cmds}
%{app_build_cmds}
+%{test_build_cmds}
+
### Link Commands
$(APP): $(LIBRARIES) $(APPOBJS)
$(CXX) /Fe$@ $(APPOBJS) $(BOTAN_LIB) $(LINK_TO)
+$(TEST): $(LIBRARIES) $(TESTOBJS)
+ $(CXX) /Fe$@ $(TESTOBJS) $(BOTAN_LIB) $(LINK_TO)
+
$(BOTAN_LIB): $(LIBOBJS)
!If "$(SO_OBJ_FLAGS)" == ""
$(AR) /OUT:$(BOTAN_LIB) $(LIBOBJS)