]> granicus.if.org Git - gc/commitdiff
Rename make_as_lib option to enable_static in NT_MAKEFILE and WCC_MAKEFILE
authorIvan Maidanski <ivmai@mail.ru>
Fri, 19 Jul 2019 21:44:38 +0000 (00:44 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 19 Jul 2019 21:44:38 +0000 (00:44 +0300)
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.

NT_MAKEFILE
WCC_MAKEFILE
doc/README.win32
doc/README.win64

index 89c266d2ac89e46adcbe5e1090ad85ff6b83510a..571822d0075c794f05cacbab7fb68299642dbd5b 100644 (file)
@@ -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)
index dd7777b4e8c50592bc9be7813fef51d6fa6c9683..a106d306d41c3981cc22d248f64ff6b7c2f6b3f2 100644 (file)
@@ -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
index 3cb17c0902d21433db21c9026e028ef0264b8af2..64ed22ebf968ca5f41cf7abcee56a3ad13ddfab1 100644 (file)
@@ -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.
 
index 22900df214d70d92a4f7a5edcf4cbec20bb2aeaf..c2270c5b8934d6cbcb42462a785f80f36faa6901 100644 (file)
@@ -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.