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

Last change on this file since 13594 was 13594, checked in by gb, 10 years ago

Use "-I./" in .c.o rule in all Makefiles.
Include "ccl-platform.h" in lisp.h.
(These files are still empty; the idea is to try to replace long sequences
of conditional definitions in other headers/sources with platform-specific
definitions in "ccl-platform.h", which in turn may make it a little easier
to define new platforms.

File size: 3.3 KB
Line 
1#
2#   Copyright (C) 2007 Clozure Associates
3#   This file is part of Clozure CL. 
4#
5#   Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
6#   License , known as the LLGPL and distributed with Clozure CL as the
7#   file "LICENSE".  The LLGPL consists of a preamble and the LGPL,
8#   which is distributed with Clozure CL as the file "LGPL".  Where these
9#   conflict, the preamble takes precedence. 
10#
11#   Clozure CL 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-w64-mingw32-gcc
22AS = x86_64-w64-mingw32-as
23M4 = m4
24LD = x86_64-w64-mingw32-ld
25ASFLAGS = -g --64
26M4FLAGS = -DWIN_64 -DWINDOWS -DX86 -DX8664 -DHAVE_TLS -DEMUTLS -DTCR_IN_GPR
27CDEFINES = -DWIN_64 -DWINDOWS -D_REENTRANT -DX86 -DX8664 -D_GNU_SOURCE -DHAVE_TLS -DEMUTLS -DTCR_IN_GPR
28CDEBUG = -g
29COPT = -O2
30# Once in a while, -Wformat says something useful.  The odds are against that,
31# however.
32WFORMAT = -Wno-format
33
34
35# If the linker supports a "--hash-style=" option, use traditional
36# SysV hash tables.  (If it doesn't support that option, assume
37# that traditional hash tables will be used by default.)
38ld_has_hash_style = $(shell $(LD) --help | grep "hash-style=")
39ifeq ($(ld_has_hash_style),)
40HASH_STYLE=
41else
42HASH_STYLE="-Wl,--hash-style=sysv"
43endif
44
45# There may be some confusion about whether or not C symbols have
46# leading underscores or not.  The assembler sources seem to
47# expect them to and mingw import libs seem to use them, but
48# it's not clear whether or not native win64 libraries use this
49# convention (and I'm not sure whether the Cygwin-hosted win64
50# toolchain behaves the same was as when hosted on Linux ...
51# The compiler default seems to be to use them; if we want to
52# suppress their use, uncomment the following:
53
54SUPPRESS_UNDERSCORES=#-fno-leading-underscore
55
56.s.o:
57        $(M4) $(M4FLAGS) -I../ $< | $(AS)  $(ASFLAGS) -o $@
58.c.o:
59        $(CC) -I./ -c $< $(CDEFINES) $(CDEBUG) $(COPT) $(WFORMAT) ${SUPPRESS_UNDERSCORES} -m64 -o $@
60
61SPOBJ = pad.o x86-spjump64.o x86-spentry64.o x86-subprims64.o
62ASMOBJ = x86-asmutils64.o imports.o
63
64COBJ  = pmcl-kernel.o gc-common.o x86-gc.o bits.o  x86-exceptions.o \
65        image.o thread_manager.o lisp-debug.o memory.o windows-calls.o
66
67DEBUGOBJ = lispdcmd.o plprint.o plsym.o xlbt.o x86_print.o
68KERNELOBJ= $(COBJ) x86-asmutils64.o  imports.o
69
70SPINC = lisp.s m4macros.m4 x86-constants.s x86-macros.s errors.s x86-uuo.s \
71        x86-constants64.s
72
73CHEADERS = area.h bits.h x86-constants.h lisp-errors.h gc.h lisp.h \
74        lisp-exceptions.h lisp_globals.h macros.h memprotect.h image.h \
75        Threads.h x86-constants64.h x86-exceptions.h lisptypes.h
76
77
78KSPOBJ = $(SPOBJ)
79all:    ../../wx86cl64.exe
80
81
82OSLIBS = -lpsapi -lws2_32
83
84
85../../wx86cl64.exe:     $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) Makefile pei-x86-64.x
86        $(CC) -Wl,--image-base=0x10000 -Wl,-script=pei-x86-64.x -m64 $(CDEBUG)  -Wl,--export-dynamic $(HASH_STYLE) -o $@ $(USE_LINK_MAP) $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) $(OSLIBS)
87
88
89$(SPOBJ): $(SPINC)
90$(ASMOBJ): $(SPINC)
91$(COBJ): $(CHEADERS)
92$(DEBUGOBJ): $(CHEADERS) lispdcmd.h
93
94
95cclean:
96        $(RM) -f $(KERNELOBJ) $(DEBUGOBJ) ../../wx86cl64.exe
97
98clean:  cclean
99        $(RM) -f $(SPOBJ)
100
101strip:  ../../wx86cl64.exe
102        strip -g ../../wx86cl64.exe
Note: See TracBrowser for help on using the repository browser.