aboutsummaryrefslogtreecommitdiffstats
path: root/src/build-data
diff options
context:
space:
mode:
authorSimon Warta <[email protected]>2015-07-17 10:28:02 +0200
committerSimon Warta <[email protected]>2015-07-21 20:06:36 +0200
commit2dae041a9b8299fe185c65b227433018f6622a17 (patch)
treef7f53a8f2c935a1140edd4309fe298e3ba7a03c3 /src/build-data
parentb2cda0952925ca491b6e63b3af755f9b2ff16a60 (diff)
Update Windows linking
Diffstat (limited to 'src/build-data')
-rw-r--r--src/build-data/makefile/nmake.in19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/build-data/makefile/nmake.in b/src/build-data/makefile/nmake.in
index 3060b674d..88188071b 100644
--- a/src/build-data/makefile/nmake.in
+++ b/src/build-data/makefile/nmake.in
@@ -18,15 +18,19 @@ APP = %{out_dir}\botan%{program_suffix}
TEST = %{out_dir}\botan-test%{program_suffix}
# Library targets
-# LIB_FILENAME is either a static lib or the DLL
+#
+# LIB_FILENAME is always the .lib file, that is either a static lib or a
+# by-product of the DLL creation used to link the DLL into applications
LIB_BASENAME = %{libname}
LIB_FILENAME = %{out_dir}\$(LIB_BASENAME).lib
!If "$(SO_OBJ_FLAGS)" == ""
+# static lib
LIBRARIES = $(LIB_FILENAME)
!Else
-SHARED_LIB = %{out_dir}\$(LIB_BASENAME).dll
-LIBRARIES = $(LIB_FILENAME) $(SHARED_LIB)
+# shared lib
+SO_FILENAME = %{out_dir}\$(LIB_BASENAME).dll
+LIBRARIES = $(SO_FILENAME)
!Endif
@@ -57,11 +61,14 @@ $(TEST): $(LIBRARIES) $(TESTOBJS)
$(TEST_POST_LINK_CMD)
!If "$(SO_OBJ_FLAGS)" == ""
+# static lib
$(LIB_FILENAME): $(LIBOBJS)
- $(AR) /OUT:$(LIB_FILENAME) $(LIBOBJS)
+ $(AR) /OUT:$@ $(LIBOBJS)
!Else
-$(SHARED_LIB): $(LIBOBJS)
- $(LIB_LINK_CMD) /OUT:$(LIB_FILENAME) $(LIBOBJS) $(LIB_LINKS_TO)
+# shared lib
+# Creates the DLL $(SO_FILENAME) and the .lib $(LIB_FILENAME)
+$(SO_FILENAME): $(LIBOBJS)
+ $(LIB_LINK_CMD) /OUT:$@ $(LIBOBJS) $(LIB_LINKS_TO)
!Endif
# Fake Targets