~ubuntu-branches/ubuntu/quantal/libgc/quantal

« back to all changes in this revision

Viewing changes to NT_X64_THREADS_MAKEFILE

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Egger
  • Date: 2011-03-02 13:43:18 UTC
  • mfrom: (1.2.5 upstream) (3.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20110302134318-82ful0us5ce82qe8
Tags: 1:7.1-7
* Add ppc64 symbol file (Closes: #615469)
* Add sh4 symbol file (Closes: #614744)
* Add armhf symbol file
* Add powerpcspe symbol file
* Handle sparc64 the same as sparc
* Clear non-arch symbol file to support building on not yet captured
  architectures
* add -pthread to fix build with --no-add-needed

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Makefile for Windows NT.  Assumes Microsoft compiler.
 
2
# modified 2007 August by Friedrich Dominicus:
 
3
#                       - copied from NT_X64_STATIC_THREADS_MAKEFILES
 
4
#                       - checked agaist NT_THREADS_MAKEFILE
 
5
#                       - added changes to integrate the tools
 
6
#                       - currently just with debug information
 
7
# problems can be sent to
 
8
#                     frido at q-software-solutions.de
 
9
#
 
10
# or the mailing list
 
11
 
 
12
 
 
13
MY_CPU=AMD64
 
14
CPU=$(MY_CPU)
 
15
!include <ntwin32.mak>
 
16
 
 
17
# Make sure that .cc is not viewed as a suffix.  It is for VC++2005, but # not earlier versions.  We can deal with either, but not inconsistency.
 
18
.SUFFIXES:
 
19
.SUFFIXES: .obj .cpp .c
 
20
 
 
21
# Atomic_ops installation directory.  For win32, the source directory
 
22
# should do, since we only need the headers.
 
23
# We assume this was manually unpacked, since I'm not sure there is
 
24
# a Windows standard command line tool to do this.
 
25
AO_VERSION=1.2
 
26
AO_SRC_DIR=libatomic_ops-$(AO_VERSION)/src
 
27
AO_INCLUDE_DIR=$(AO_SRC_DIR)
 
28
 
 
29
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 msvc_dbg.obj thread_local_alloc.obj
 
30
 
 
31
all: gc64_dll.dll gctest.exe cord\de.exe test_cpp.exe
 
32
 
 
33
.c.obj:
 
34
        $(cc) $(cdebug) $(cflags) $(cvarsmt) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -DGC_DLL -D__STDC__ -DGC_BUILD -DGC_WIN32_THREADS  $*.c /Fo$*.obj /wd4701 -D_CRT_SECURE_NO_DEPRECATE
 
35
# Disable "may not be initialized" warnings.  They're too approximate.
 
36
# Disable crt security warnings, since unfortunately they warn about all sorts # of safe uses of strncpy.  It would be nice to leave the rest enabled.
 
37
 
 
38
.cpp.obj:
 
39
        $(cc) $(cdebug) $(cflags) $(cvarsmt) -Iinclude -I$(AO_INCLUDE_DIR) -DALL_INTERIOR_POINTERS -DGC_NOT_DLL-DALL_INTERIOR_POINTERS -DGC_DLL -D__STDC__ -DGC_BUILD -DGC_WIN32_THREADS $*.CPP /Fo$*.obj -D_CRT_SECURE_NO_DEPRECATE
 
40
 
 
41
$(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
 
42
 
 
43
 
 
44
LINK64=link.exe
 
45
LINK64_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib \
 
46
shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo \
 
47
/subsystem:windows /dll /incremental:no /pdb:"gc.pdb" /machine:X64 /out:"gc64_dll.dll" \
 
48
/implib:"gc64_dll.lib"
 
49
 
 
50
gc64_dll.dll : $(OBJS)
 
51
        $(LINK64)  $(ldebug) $(LINK64_FLAGS) $(OBJS)
 
52
 
 
53
 
 
54
 
 
55
gctest.exe: tests\test.obj gc64_dll.lib
 
56
#  This produces a "GUI" applications that opens no windows and writes to the log file
 
57
#  "gc.log".  This was done to make the result runnable under win32s and
 
58
#  should be fixed.
 
59
        $(link) $(ldebug) $(guiflags) -stack:131072 -out:$*.exe tests\test.obj $(guilibs) gc64_dll.lib
 
60
 
 
61
cord\de_win.rbj: cord\de_win.res
 
62
        cvtres /MACHINE:$(MY_CPU) /OUT:cord\de_win.rbj cord\de_win.res
 
63
 
 
64
cord\de.obj cord\de_win.obj: include\cord.h include\private\cord_pos.h cord\de_win.h cord\de_cmds.h
 
65
 
 
66
cord\de_win.res: cord\de_win.rc cord\de_win.h cord\de_cmds.h
 
67
        $(rc) $(rcvars) -r -fo cord\de_win.res cord\de_win.rc
 
68
 
 
69
# Cord/de is a real win32 gui application.
 
70
cord\de.exe: cord\cordbscs.obj cord\cordxtra.obj cord\de.obj cord\de_win.obj cord\de_win.rbj gc64_dll.lib
 
71
        $(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 gc64_dll.lib $(guilibs)
 
72
 
 
73
gc_cpp.obj: include\gc_cpp.h include\gc.h
 
74
 
 
75
gc_cpp.cpp: gc_cpp.cc
 
76
        copy gc_cpp.cc gc_cpp.cpp
 
77
 
 
78
test_cpp.cpp: tests\test_cpp.cc
 
79
        copy tests\test_cpp.cc test_cpp.cpp
 
80
 
 
81
# This generates the C++ test executable.  The executable expects # a single numeric argument, which is the number of iterations.
 
82
# The output appears in the file "gc.log".
 
83
test_cpp.exe: test_cpp.obj include\gc_cpp.h include\gc.h gc64_dll.lib
 
84
        $(link) $(ldebug) $(guiflags) -stack:16384 -out:test_cpp.exe test_cpp.obj gc64_dll.lib $(guilibs)
 
85
 
 
86
AO_SCR_DIR:
 
87
        tar xvfz $(AO_SRC_DIR).tar.gz;
 
88
 
 
89
clean:
 
90
        del *.obj gc64_dll.lib gc64_dll.dll