1 # Makefile for Windows NT. Assumes Microsoft compiler, and a single thread.
2 # Use "nmake nodebug=1 all" for optimized versions of library, gctest and editor.
8 # Make sure that .cc is not viewed as a suffix. It is for VC++2005, but
9 # not earlier versions. We can deal with either, but not inconsistency.
11 .SUFFIXES: .obj .cpp .c
13 OBJS= alloc.obj reclaim.obj allchblk.obj misc.obj mach_dep.obj os_dep.obj mark_rts.obj headers.obj mark.obj obj_map.obj blacklst.obj finalize.obj new_hblk.obj dbg_mlc.obj malloc.obj stubborn.obj dyn_load.obj typd_mlc.obj ptr_chck.obj gc_cpp.obj mallocx.obj extra\msvc_dbg.obj
15 all: gctest.exe cord\de.exe test_cpp.exe
18 $(cc) $(cdebug) $(cflags) $(cvars) -Iinclude -DALL_INTERIOR_POINTERS -DGC_NOT_DLL -D_CRT_SECURE_NO_DEPRECATE $*.c /Fo$*.obj
21 $(cc) $(cdebug) $(cflags) $(cvars) -Iinclude -DALL_INTERIOR_POINTERS -DGC_NOT_DLL -D_CRT_SECURE_NO_DEPRECATE $*.cpp /Fo$*.obj
23 $(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
26 lib /MACHINE:i386 /out:gc.lib $(OBJS)
27 # The original NT SDK used lib32 instead of lib
29 gctest.exe: tests\test.obj gc.lib
30 # The following works for win32 debugging. For win32s debugging use debugtype:coff
31 # and add mapsympe line.
32 # This produces a "GUI" applications that opens no windows and writes to the log file
33 # "gctest.gc.log". This is done to make the result runnable under win32s.
34 $(link) -debug -debugtype:cv $(guiflags) -stack:131072 -out:$*.exe tests\test.obj $(guilibs) gc.lib
35 # mapsympe -n -o gctest.sym gctest.exe
37 cord\de_win.rbj: cord\de_win.res
38 cvtres /MACHINE:$(MY_CPU) /OUT:cord\de_win.rbj cord\de_win.res
40 cord\de.obj cord\de_win.obj: include\cord.h include\private\cord_pos.h cord\de_win.h cord\de_cmds.h
42 cord\de_win.res: cord\de_win.rc cord\de_win.h cord\de_cmds.h
43 $(rc) $(rcvars) -r -fo cord\de_win.res cord\de_win.rc
45 # Cord/de is a real win32 gui application.
46 cord\de.exe: cord\cordbscs.obj cord\cordxtra.obj cord\de.obj cord\de_win.obj cord\de_win.rbj gc.lib
47 $(link) -debug -debugtype:cv $(guiflags) -stack:16384 -out:cord\de.exe cord\cordbscs.obj cord\cordxtra.obj cord\de.obj cord\de_win.obj cord\de_win.rbj gc.lib $(guilibs)
49 gc_cpp.obj: include\gc_cpp.h include\gc.h
52 # copy gc_cpp.cc gc_cpp.cpp
54 test_cpp.cpp: tests\test_cpp.cc
55 copy tests\test_cpp.cc test_cpp.cpp
57 # This generates the C++ test executable. The executable expects
58 # a single numeric argument, which is the number of iterations.
59 # The output appears in the file "test_cpp.gc.log".
60 test_cpp.exe: test_cpp.obj include\gc_cpp.h include\gc.h gc.lib
61 $(link) -debug -debugtype:cv $(guiflags) -stack:16384 -out:test_cpp.exe test_cpp.obj gc.lib $(guilibs)