[Gc] NT_MAKEFILE patch for Visual Studio 2005

Jack Andrews effbiae at gmail.com
Sun Oct 26 06:32:00 PST 2008


hi guys,

i've got the latest source from anonymous cvs.

for my environment, "Visual Studio 2005.."

>nmake /?
Microsoft (R) Program Maintenance Utility Version 8.00.50727.762

i needed to create the patch below.  without the patch, i get a couple
of errors that i can post if you like.

i guess there should be a test for the nmake version in the patch.
but i have a build system working using the cmake system -- cmake is
not the prettiest tool, but it does let you write short makefiles and
it generates nmake and project files for all versions of microsoft
tools.

test_cpp.exe produces test_cpp.exe.log which is:

usage: test_cpp number-of-iterations
Assuming 10 iters
Starting iteration 1
Starting iteration 2
Starting iteration 3
Starting iteration 4
Starting iteration 5
Starting iteration 6
Starting iteration 7
Starting iteration 8
Starting iteration 9
Starting iteration 10
The test appears to have succeeded.

ta, jack.

Index: bdwgc/NT_MAKEFILE
===================================================================
--- bdwgc.orig/NT_MAKEFILE
+++ bdwgc/NT_MAKEFILE
@@ -13,8 +13,8 @@ all: gctest.exe cord\de.exe test_cpp.exe
 .c.obj:
 	$(cc) $(cdebug) $(cflags) $(cvars) -Iinclude -DALL_INTERIOR_POINTERS
-D__STDC__ -DGC_NOT_DLL -DGC_BUILD $*.c /Fo$*.obj

-.cpp.obj:
-	$(cc) $(cdebug) $(cflags) $(cvars) -Iinclude -DALL_INTERIOR_POINTERS
-DGC_NOT_DLL -DGC_BUILD $*.CPP /Fo$*.obj
+.cc.obj:
+	$(cc) $(cdebug) $(cflags) $(cvars) -Iinclude -DALL_INTERIOR_POINTERS
-DGC_NOT_DLL -DGC_BUILD $*.cc /Fo$*.obj

 $(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\private\msvc_dbg.h

@@ -44,11 +44,8 @@ cord\de.exe: cord\cordbscs.obj cord\cord

 gc_cpp.obj: include\gc_cpp.h include\gc.h

-gc_cpp.cpp: gc_cpp.cc
-	copy gc_cpp.cc gc_cpp.cpp
-
-test_cpp.cpp: tests\test_cpp.cc
-	copy tests\test_cpp.cc test_cpp.cpp
+test_cpp.cc: tests\test_cpp.cc
+	copy tests\test_cpp.cc .

 # This generates the C++ test executable.  The executable expects
 # a single numeric argument, which is the number of iterations.


More information about the Gc mailing list