summaryrefslogtreecommitdiff
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
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.
-rw-r--r--NT_MAKEFILE6
-rw-r--r--WCC_MAKEFILE43
-rw-r--r--doc/README.win322
-rw-r--r--doc/README.win642
4 files changed, 25 insertions, 28 deletions
diff --git a/NT_MAKEFILE b/NT_MAKEFILE
index 89c266d2..571822d0 100644
--- a/NT_MAKEFILE
+++ b/NT_MAKEFILE
@@ -1,7 +1,7 @@
# Makefile for Windows NT. Assumes Microsoft compiler.
# Should be invoked as "nmake -f NT_MAKEFILE [<args>]"; the optional arguments
# are: "cpu=AMD64" - to target x64, "cpu=i386" - to target x86,
-# "make_as_lib=1" - to build it as a static library, "nodebug=1" - to produce
+# "enable_static=1" - to build it as a static library, "nodebug=1" - to produce
# the release variant of the library, "disable_threads=1" - to build the
# library and the tests without threads support.
@@ -56,7 +56,7 @@ CFLAGS_DEBUG=-DGC_ASSERTIONS
CFLAGS_MT=$(cvarsmt) -DGC_THREADS -DTHREAD_LOCAL_ALLOC -DPARALLEL_MARK
!ENDIF
-!IFDEF MAKE_AS_LIB
+!IFDEF ENABLE_STATIC
CFLAGS_GCDLL=-DGC_NOT_DLL
!ELSE
CFLAGS_GCDLL=-DGC_DLL
@@ -95,7 +95,7 @@ check: gctest.exe test_cpp.exe de.exe
$(OBJS) tests\test.obj: include\private\gc_priv.h include\private\gc_hdrs.h include\gc.h include\private\gcconfig.h include\private\gc_locks.h include\private\gc_pmark.h include\gc_mark.h include\gc_disclaim.h include\private\msvc_dbg.h
-!IFDEF MAKE_AS_LIB
+!IFDEF ENABLE_STATIC
gc.lib: $(OBJS)
lib /out:gc.lib /MACHINE:$(CPU) $(OBJS)
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
diff --git a/doc/README.win32 b/doc/README.win32
index 3cb17c09..64ed22eb 100644
--- a/doc/README.win32
+++ b/doc/README.win32
@@ -41,7 +41,7 @@ Microsoft Tools
---------------
For Microsoft development tools, type
-"nmake -f NT_MAKEFILE cpu=i386 make_as_lib=1 disable_threads=1 nodebug=1"
+"nmake -f NT_MAKEFILE cpu=i386 disable_threads=1 enable_static=1 nodebug=1"
to build the release variant of the collector as a static library without
threads support.
diff --git a/doc/README.win64 b/doc/README.win64
index 22900df2..c2270c5b 100644
--- a/doc/README.win64
+++ b/doc/README.win64
@@ -16,7 +16,7 @@ This process is completely analogous to NT_MAKEFILE usage
for the 32-bit library version.
A similar procedure using NT_MAKEFILE is applicable to build the static
-library - just pass "make_as_lib=1" as an extra argument to nmake.
+library - just pass "enable_static=1" as an extra argument to nmake.
If needed, it is also possible to build the library without threads
support - this could be done by passing "disable_threads=1" argument to nmake.