Annotation of win32/gc/NT_STATIC_THREADS_MAKEFILE, revision 1.1
1.1 ! moko 1: # Makefile for Windows NT. Assumes Microsoft compiler.
! 2: # Use "nmake nodebug=1 all" for optimized versions of library, gctest and editor.
! 3:
! 4: MY_CPU=X86
! 5: CPU=$(MY_CPU)
! 6: !include <ntwin32.mak>
! 7:
! 8: !IF "$(nodebug)" == "1"
! 9: CFLAGS= /nologo /MD /W3 /GX /O2
! 10: !ELSE
! 11: CFLAGS= /nologo /MDd /W3 /Gm /GX /Zi /Od /D "GC_ASSERTIONS"
! 12: !ENDIF
! 13:
! 14:
! 15: # Make sure that .cc is not viewed as a suffix. It is for VC++2005, but
! 16: # not earlier versions. We can deal with either, but not inconsistency.
! 17: .SUFFIXES:
! 18: .SUFFIXES: .obj .cpp .c
! 19:
! 20: # Atomic_ops installation directory. For win32, the source directory
! 21: # should do, since we only need the headers.
! 22: # We assume this was manually unpacked, since I'm not sure there is
! 23: # a Windows standard command line tool to do this.
! 24: AO_SRC_DIR=libatomic_ops/src
! 25: AO_INCLUDE_DIR=$(AO_SRC_DIR)
! 26:
! 27: 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 win32_threads.obj extra\msvc_dbg.obj thread_local_alloc.obj
! 28:
! 29: all: gctest.exe cord\de.exe test_cpp.exe
! 30:
! 31: .c.obj:
! 32: $(cc) $(cdebug) -c $(CFLAGS) /D "WIN32" /D "_WINDOWS" /D "__STDC__" -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -DDONT_ADD_BYTE_AT_END -DGC_NOT_DLL -DGC_THREADS -DTHREAD_LOCAL_ALLOC -DPARALLEL_MARK -D_CRT_SECURE_NO_DEPRECATE $*.c /Fo$*.obj
! 33:
! 34: .cpp.obj:
! 35: $(cc) $(cdebug) -c $(CFLAGS) /D "WIN32" /D "_WINDOWS" /D "__STDC__" -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -DDONT_ADD_BYTE_AT_END -DGC_NOT_DLL -DGC_THREADS -DTHREAD_LOCAL_ALLOC -D_CRT_SECURE_NO_DEPRECATE $*.cpp /Fo$*.obj
! 36:
! 37: $(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
! 38:
! 39: gc.lib: $(OBJS)
! 40: lib /MACHINE:i386 /out:gc.lib $(OBJS)
! 41: # The original NT SDK used lib32 instead of lib
! 42:
! 43: gctest.exe: tests\test.obj gc.lib
! 44: # The following works for win32 debugging. For win32s debugging use debugtype:coff
! 45: # and add mapsympe line.
! 46: # This produces a "GUI" applications that opens no windows and writes to the log file
! 47: # "gctest.gc.log". This is done to make the result runnable under win32s.
! 48: $(link) -debug -debugtype:cv $(guiflags) -stack:262144 -out:$*.exe tests\test.obj $(guilibs) gc.lib
! 49: # mapsympe -n -o gctest.sym gctest.exe
! 50:
! 51: cord\de_win.rbj: cord\de_win.res
! 52: cvtres /MACHINE:$(MY_CPU) /OUT:cord\de_win.rbj cord\de_win.res
! 53:
! 54: cord\de.obj cord\de_win.obj: include\cord.h include\private\cord_pos.h cord\de_win.h cord\de_cmds.h
! 55:
! 56: cord\de_win.res: cord\de_win.rc cord\de_win.h cord\de_cmds.h
! 57: $(rc) $(rcvars) -r -fo cord\de_win.res cord\de_win.rc
! 58:
! 59: # Cord/de is a real win32 gui application.
! 60: cord\de.exe: cord\cordbscs.obj cord\cordxtra.obj cord\de.obj cord\de_win.obj cord\de_win.rbj gc.lib
! 61: $(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)
! 62:
! 63: gc_cpp.obj: include\gc_cpp.h include\gc.h
! 64:
! 65: gc_cpp.cpp: gc_cpp.cc
! 66: # copy gc_cpp.cc gc_cpp.cpp
! 67:
! 68: test_cpp.cpp: tests\test_cpp.cc
! 69: copy tests\test_cpp.cc test_cpp.cpp
! 70:
! 71: # This generates the C++ test executable. The executable expects
! 72: # a single numeric argument, which is the number of iterations.
! 73: # The output appears in the file "test_cpp.gc.log".
! 74: test_cpp.exe: test_cpp.obj include\gc_cpp.h include\gc.h gc.lib
! 75: $(link) -debug -debugtype:cv $(guiflags) -stack:16384 -out:test_cpp.exe test_cpp.obj gc.lib $(guilibs)
! 76:
! 77: AO_SCR_DIR:
! 78: tar xvfz $(AO_SRC_DIR).tar.gz;
E-mail: