Upgrade Boehm GC to 7.2alpha4.
[cacao.git] / src / mm / boehm-gc / NT_X64_STATIC_THREADS_MAKEFILE
1 # Makefile for Windows NT.  Assumes Microsoft compiler.
2 # DLLs are included in the root set.
3 # Use "nmake nodebug=1 all" for optimized versions of library, gctest and editor.
4
5 MY_CPU=AMD64
6 CPU=$(MY_CPU)
7 !include <ntwin32.mak>
8
9 # Make sure that .cc is not viewed as a suffix.  It is for VC++2005, but
10 # not earlier versions.  We can deal with either, but not inconsistency.
11 .SUFFIXES:
12 .SUFFIXES: .obj .cpp .c
13
14 # Atomic_ops installation directory.  For win32, the source directory
15 # should do, since we only need the headers.
16 # We assume this was manually unpacked, since I'm not sure there is
17 # a Windows standard command line tool to do this.
18 AO_SRC_DIR=libatomic_ops/src
19 AO_INCLUDE_DIR=$(AO_SRC_DIR)
20
21 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
22
23 all: gctest.exe cord\de.exe test_cpp.exe
24
25 .c.obj:
26         $(cc) $(cdebug) $(cflags) $(cvarsmt) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -DGC_NOT_DLL -DGC_THREADS -DTHREAD_LOCAL_ALLOC -D_CRT_SECURE_NO_DEPRECATE $*.c /Fo$*.obj /wd4701
27 # Disable "may not be initialized" warnings.  They're too approximate.
28 # Disable crt security warnings, since unfortunately they warn about all sorts
29 # of safe uses of strncpy.  It would be nice to leave the rest enabled.
30
31 .cpp.obj:
32         $(cc) $(cdebug) $(cflags) $(cvarsmt) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -DGC_NOT_DLL -DGC_THREADS -DTHREAD_LOCAL_ALLOC -D_CRT_SECURE_NO_DEPRECATE $*.CPP /Fo$*.obj
33
34 $(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
35
36 gc.lib: $(OBJS)
37         lib /MACHINE:X64 /out:gc.lib $(OBJS)
38
39 gctest.exe: tests\test.obj gc.lib
40 #  This produces a "GUI" applications that opens no windows and writes to the log file
41 #  "gc.log".  This was done to make the result runnable under win32s and
42 #  should be fixed.
43         $(link) $(ldebug) $(guiflags) -stack:131072 -out:$*.exe tests\test.obj $(guilibs) gc.lib
44
45 cord\de_win.rbj: cord\de_win.res
46         cvtres /MACHINE:$(MY_CPU) /OUT:cord\de_win.rbj cord\de_win.res
47
48 cord\de.obj cord\de_win.obj: include\cord.h include\private\cord_pos.h cord\de_win.h cord\de_cmds.h
49
50 cord\de_win.res: cord\de_win.rc cord\de_win.h cord\de_cmds.h
51         $(rc) $(rcvars) -r -fo cord\de_win.res cord\de_win.rc
52
53 # Cord/de is a real win32 gui application.
54 cord\de.exe: cord\cordbscs.obj cord\cordxtra.obj cord\de.obj cord\de_win.obj cord\de_win.rbj gc.lib
55         $(link) $(ldebug) $(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)
56
57 gc_cpp.obj: include\gc_cpp.h include\gc.h
58
59 gc_cpp.cpp: gc_cpp.cc
60         copy gc_cpp.cc gc_cpp.cpp
61
62 test_cpp.cpp: tests\test_cpp.cc
63         copy tests\test_cpp.cc test_cpp.cpp
64
65 # This generates the C++ test executable.  The executable expects
66 # a single numeric argument, which is the number of iterations.
67 # The output appears in the file "gc.log".
68 test_cpp.exe: test_cpp.obj include\gc_cpp.h include\gc.h gc.lib
69         $(link) $(ldebug) $(guiflags) -stack:16384 -out:test_cpp.exe test_cpp.obj gc.lib $(guilibs)
70
71 AO_SCR_DIR:
72                 tar xvfz $(AO_SRC_DIR).tar.gz;
73