summaryrefslogtreecommitdiff
path: root/WCC_MAKEFILE
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2019-07-20 00:44:38 +0300
committerIvan Maidanski <ivmai@mail.ru>2019-07-20 00:44:38 +0300
commit04bf5f44d27884914c40fe033adeaee5ea644863 (patch)
tree99f76200c2f5031f29ecd40e8392038afb1f3728 /WCC_MAKEFILE
parent04afa25bcbef482ada54c883e56c7661c7445625 (diff)
downloadbdwgc-04bf5f44d27884914c40fe033adeaee5ea644863.tar.gz
Rename make_as_lib option to enable_static in NT_MAKEFILE and WCC_MAKEFILE
This is to match the behavior of CMake script. * NT_MAKEFILE: Update header comment (rename make_as_lib to enable_static). * NT_MAKEFILE (MAKE_AS_LIB): Rename to ENABLE_STATIC. * WCC_MAKEFILE (MAKE_AS_DLL): Remove (check "ndef ENABLE_STATIC" instead). * WCC_MAKEFILE (MAKE_AS_LIB): Rename to ENABLE_STATIC; update comment. * doc/README.win32 (Microsoft Tools): Rename make_as_lib to enable_static. * doc/README.win64: Likewise.
Diffstat (limited to 'WCC_MAKEFILE')
-rw-r--r--WCC_MAKEFILE43
1 files changed, 20 insertions, 23 deletions
diff --git a/WCC_MAKEFILE b/WCC_MAKEFILE
index dd7777b4..a106d306 100644
--- a/WCC_MAKEFILE
+++ b/WCC_MAKEFILE
@@ -6,10 +6,9 @@ SYSTEM=MSWIN32
#SYSTEM=DOS4GW
#SYSTEM=OS2
-# The collector can be built either as dynamic or as static library.
-# Select the library type you need.
-MAKE_AS_DLL=1
-#MAKE_AS_LIB=1
+# The collector can be built either as dynamic (the default) or as static
+# library. The latter is selected by setting ENABLE_STATIC variable.
+#ENABLE_STATIC=1
# Select calling conventions.
# Possible choices are r and s.
@@ -54,14 +53,13 @@ SYSFLAG=-DOS2 -bt=os2
!else
!error undefined or unsupported target platform: $(SYSTEM)
!endif
-!ifdef MAKE_AS_DLL
-DLLFLAG=-bd -DGC_DLL
-TEST_DLLFLAG=-DGC_DLL
-!else ifdef MAKE_AS_LIB
+
+!ifdef ENABLE_STATIC
DLLFLAG=
TEST_DLLFLAG=-DGC_NOT_DLL
!else
-!error Either MAKE_AS_LIB or MAKE_AS_DLL should be defined
+DLLFLAG=-bd -DGC_DLL
+TEST_DLLFLAG=-DGC_DLL
!endif
CC=wcc386
@@ -84,7 +82,19 @@ check: gctest.exe test_cpp.exe .SYMBOLIC
*gctest.exe
*test_cpp.exe
-!ifdef MAKE_AS_DLL
+!ifdef ENABLE_STATIC
+
+gc.lib: $(OBJS)
+ @%create $*.lb1
+ @for %i in ($(OBJS)) do @%append $*.lb1 +'%i'
+ *wlib -b -c -n -p=512 $@ @$*.lb1
+
+gccpp.lib: gc_cpp.obj
+ @%create $*.lb1
+ @%append $*.lb1 +'gc_cpp.obj'
+ *wlib -b -c -n -p=512 $@ @$*.lb1
+
+!else
gc.lib: gc.dll
*wlib -b -c -n -p=512 $@ +gc.dll
@@ -122,21 +132,8 @@ gccpp.dll: gc_cpp.obj gc.lib .AUTODEPEND
@%append $*.lnk library wr7$(CALLING)dll.lib
*wlink @$*.lnk
-!else
-
-gc.lib: $(OBJS)
- @%create $*.lb1
- @for %i in ($(OBJS)) do @%append $*.lb1 +'%i'
- *wlib -b -c -n -p=512 $@ @$*.lb1
-
-gccpp.lib: gc_cpp.obj
- @%create $*.lb1
- @%append $*.lb1 +'gc_cpp.obj'
- *wlib -b -c -n -p=512 $@ @$*.lb1
-
!endif
-
gctest.exe: test.obj gc.lib
%create $*.lnk
!ifdef DOS4GW