source: trunk/source/lisp-kernel/win64/Makefile @ 8551

Last change on this file since 8551 was 8551, checked in by andreas, 13 years ago

Better debuggability.

File size: 2.5 KB
Line 
1#
2#   Copyright (C) 2007 Clozure Associates
3#   This file is part of OpenMCL. 
4#
5#   OpenMCL is licensed under the terms of the Lisp Lesser GNU Public
6#   License , known as the LLGPL and distributed with OpenMCL as the
7#   file "LICENSE".  The LLGPL consists of a preamble and the LGPL,
8#   which is distributed with OpenMCL as the file "LGPL".  Where these
9#   conflict, the preamble takes precedence. 
10#
11#   OpenMCL is referenced in the preamble as the "LIBRARY."
12#
13#   The LLGPL is also available online at
14#   http://opensource.franz.com/preamble.html
15
16
17VPATH = ../
18RM = /bin/rm
19# gcc64, as64: until there's a real win64 gcc, assume that gcc and gas
20# are installed under these names
21CC = x86_64-pc-mingw32-gcc
22AS = x86_64-pc-mingw32-as
23M4 = m4
24LD = x86_64-pc-mingw32-ld
25ASFLAGS = -g --64
26M4FLAGS = -DWIN64 -DWINDOWS -DX86 -DX8664 -DHAVE_TLS -DEMUTLS
27CDEFINES = -DWIN64 -DWINDOWS -D_REENTRANT -DX86 -DX8664 -D_GNU_SOURCE -DHAVE_TLS -DEMUTLS #-DDISABLE_EGC
28CDEBUG = -g
29COPT = -O0
30
31# If the linker supports a "--hash-style=" option, use traditional
32# SysV hash tables.  (If it doesn't support that option, assume
33# that traditional hash tables will be used by default.)
34ld_has_hash_style = $(shell $(LD) --help | grep "hash-style=")
35ifeq ($(ld_has_hash_style),)
36HASH_STYLE=
37else
38HASH_STYLE="-Wl,--hash-style=sysv"
39endif
40
41
42.s.o:
43        $(M4) $(M4FLAGS) -I../ $< | $(AS)  $(ASFLAGS) -o $@
44.c.o:
45        $(CC) -c $< $(CDEFINES) $(CDEBUG) $(COPT) -fno-leading-underscore -m64 -o $@
46
47SPOBJ = pad.o x86-spjump64.o x86-spentry64.o x86-subprims64.o
48ASMOBJ = x86-asmutils64.o imports.o
49
50COBJ  = pmcl-kernel.o gc-common.o x86-gc.o bits.o  x86-exceptions.o \
51        image.o thread_manager.o lisp-debug.o memory.o
52
53DEBUGOBJ = lispdcmd.o plprint.o plsym.o xlbt.o x86_print.o
54KERNELOBJ= $(COBJ) x86-asmutils64.o  imports.o
55
56SPINC = lisp.s m4macros.m4 x86-constants.s x86-macros.s errors.s x86-uuo.s \
57        x86-constants64.s
58
59CHEADERS = area.h bits.h x86-constants.h lisp-errors.h gc.h lisp.h \
60        lisp-exceptions.h lisp_globals.h macros.h memprotect.h image.h \
61        Threads.h x86-constants64.h x86-exceptions.h lisptypes.h
62
63
64KSPOBJ = $(SPOBJ)
65all:    ../../wx86cl64.exe
66
67
68OSLIBS = 
69
70
71../../wx86cl64.exe:     $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) Makefile
72        $(CC)  -m64 $(CDEBUG)  -Wl,--export-dynamic $(HASH_STYLE) -o $@ $(USE_LINK_MAP) $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) $(OSLIBS)
73
74
75$(SPOBJ): $(SPINC)
76$(ASMOBJ): $(SPINC)
77$(COBJ): $(CHEADERS)
78$(DEBUGOBJ): $(CHEADERS) lispdcmd.h
79
80
81cclean:
82        $(RM) -f $(KERNELOBJ) $(DEBUGOBJ) ../../wx86cl64.exe
83
84clean:  cclean
85        $(RM) -f $(SPOBJ)
86
87strip:  ../../wx86cl64.exe
88        strip -g ../../wx86cl64.exe
Note: See TracBrowser for help on using the repository browser.