implemented Setup.hs to build boehm cpp libs and install them;
[hs-boehmgc.git] / gc-7.2 / NT_X64_STATIC_THREADS_MAKEFILE
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=AMD64
5 CPU=$(MY_CPU)
6 !include <ntwin32.mak>
7
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.
10 .SUFFIXES:
11 .SUFFIXES: .obj .cpp .c
12
13 # Atomic_ops installation directory.  For win32, the source directory
14 # should do, since we only need the headers.
15 # We assume this was manually unpacked, since I'm not sure there is
16 # a Windows standard command line tool to do this.
17 AO_SRC_DIR=libatomic_ops/src
18 AO_INCLUDE_DIR=$(AO_SRC_DIR)
19
20 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
21
22 all: gctest.exe cord\de.exe test_cpp.exe
23
24 .c.obj:
25         $(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
26 # Disable "may not be initialized" warnings.  They're too approximate.
27 # Disable crt security warnings, since unfortunately they warn about all sorts
28 # of safe uses of strncpy.  It would be nice to leave the rest enabled.
29
30 .cpp.obj:
31         $(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
32
33 $(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
34
35 gc.lib: $(OBJS)
36         lib /MACHINE:X64 /out:gc.lib $(OBJS)
37
38 gctest.exe: tests\test.obj gc.lib
39 #  This produces a "GUI" applications that opens no windows and writes to
40 # the log file "gctest.gc.log".
41         $(link) $(ldebug) $(guiflags) -out:$*.exe tests\test.obj $(guilibs) gc.lib
42
43 cord\de_win.rbj: cord\de_win.res
44         cvtres /MACHINE:$(MY_CPU) /OUT:cord\de_win.rbj cord\de_win.res
45
46 cord\de.obj cord\de_win.obj: include\cord.h include\private\cord_pos.h cord\de_win.h cord\de_cmds.h
47
48 cord\de_win.res: cord\de_win.rc cord\de_win.h cord\de_cmds.h
49         $(rc) $(rcvars) -r -fo cord\de_win.res cord\de_win.rc
50
51 # Cord/de is a real win32 gui application.
52 cord\de.exe: cord\cordbscs.obj cord\cordxtra.obj cord\de.obj cord\de_win.obj cord\de_win.rbj gc.lib
53         $(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)
54
55 gc_cpp.obj: include\gc_cpp.h include\gc.h
56
57 gc_cpp.cpp: gc_cpp.cc
58 #       copy gc_cpp.cc gc_cpp.cpp
59
60 test_cpp.cpp: tests\test_cpp.cc
61         copy tests\test_cpp.cc test_cpp.cpp
62
63 # This generates the C++ test executable.  The executable expects
64 # a single numeric argument, which is the number of iterations.
65 # The output appears in the file "test_cpp.gc.log".
66 test_cpp.exe: test_cpp.obj include\gc_cpp.h include\gc.h gc.lib
67         $(link) $(ldebug) $(guiflags) -stack:16384 -out:test_cpp.exe test_cpp.obj gc.lib $(guilibs)
68
69 AO_SCR_DIR:
70                 tar xvfz $(AO_SRC_DIR).tar.gz;