source: release/1.7/source/lisp-kernel/win32/Makefile @ 15026

Last change on this file since 15026 was 15026, checked in by rme, 8 years ago

From trunk: Lisp kernel backtrace printer improvments; alter
the way create_exception_callback_frame() passes an absolute pc
to lisp.

File size: 3.8 KB
Line 
1#
2#   Copyright (C) 2008 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
16SVN_REVISION=$(shell svnversion || echo "unknown")
17
18VPATH = ../
19RM = /bin/rm
20CC = gcc
21AS = as
22M4 = m4
23LD = ld
24ASFLAGS = -g --32
25M4FLAGS = -DWIN_32 -DWINDOWS -DX86 -DX8632
26CDEFINES = -DWIN_32 -DWINDOWS -D_REENTRANT -DX86 -DX8632 -D_GNU_SOURCE  -D__MSVCRT__ -D__MSVCRT_VERSION__=0x700 -D_WIN32_WINNT=0x0502 -DSVN_REVISION=$(SVN_REVISION)
27CDEBUG = -g
28COPT = -O
29# Once in a while, -Wformat says something useful.  The odds are against that,
30# however.
31WFORMAT = -Wno-format
32PLATFORM_H = platform-win32.h
33
34# If the linker supports a "--hash-style=" option, use traditional
35# SysV hash tables.  (If it doesn't support that option, assume
36# that traditional hash tables will be used by default.)
37ld_has_hash_style = $(shell $(LD) --help | grep "hash-style=")
38ifeq ($(ld_has_hash_style),)
39HASH_STYLE=
40else
41HASH_STYLE="-Wl,--hash-style=sysv"
42endif
43
44CRT2 = $(shell $(CC) -mno-cygwin -print-file-name=crt2.o)
45
46# There may be some confusion about whether or not C symbols have
47# leading underscores or not.  The assembler sources seem to
48# expect them to and mingw import libs seem to use them, but
49# it's not clear whether or not native win64 libraries use this
50# convention (and I'm not sure whether the Cygwin-hosted win64
51# toolchain behaves the same way as when hosted on Linux ...
52# The compiler default seems to be to use them; if we want to
53# suppress their use, uncomment the following:
54
55SUPPRESS_UNDERSCORES=#-fno-leading-underscore
56
57.s.o:
58        $(M4) $(M4FLAGS) -I../ $< | $(AS)  $(ASFLAGS) -o $@
59.c.o:
60        $(CC) -include ../$(PLATFORM_H) -c $< $(CDEFINES) $(CDEBUG) $(COPT) $(WFORMAT) ${SUPPRESS_UNDERSCORES} -mno-cygwin -o $@
61
62# order matters: x86-spjump32.o must be first.
63SPOBJ = x86-spjump32.o x86-spentry32.o x86-subprims32.o
64ASMOBJ = x86-asmutils32.o imports.o
65
66COBJ  = pmcl-kernel.o gc-common.o x86-gc.o bits.o  x86-exceptions.o \
67        x86-utils.o \
68        image.o thread_manager.o lisp-debug.o memory.o windows-calls.o
69
70DEBUGOBJ = lispdcmd.o plprint.o plsym.o xlbt.o x86_print.o
71KERNELOBJ= $(COBJ) x86-asmutils32.o  imports.o
72
73SPINC = lisp.s m4macros.m4 x86-constants.s x86-macros.s errors.s x86-uuo.s \
74        x86-constants32.s
75
76CHEADERS = area.h bits.h x86-constants.h lisp-errors.h gc.h lisp.h \
77        lisp-exceptions.h lisp_globals.h macros.h memprotect.h image.h \
78        threads.h x86-constants32.h x86-exceptions.h lisptypes.h \
79        x86-utils.h \
80        $(PLATFORM_H) constants.h os-windows.h
81
82
83KSPOBJ = $(SPOBJ)
84all:    ../../wx86cl.exe
85
86# Order matters: libs that provide definitions must follow libs that
87# reference them.  (It's legal to use -lfoo multiple times to try to
88# work around this.)
89LIBGCC = $(shell $(CC) -mno-cygwin -print-libgcc-file-name)
90OSLIBS =  -L/usr/lib/w32api -L/mingw/lib -L/usr/lib/mingw\
91        -lm -lpsapi -lws2_32 -lmingw32 $(LIBGCC) -lmoldname -lmingwex \
92        -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32  $(GCCLIB) \
93        -lmoldname -lmingwex -lmsvcrt
94
95
96
97IMAGE_BASE =--image-base=0x10000
98
99../../wx86cl.exe: $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) Makefile
100        ld -o ../../wx86cl.exe  $(IMAGE_BASE) --enable-auto-import \
101        $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) $(CRT2) $(OSLIBS) $(LIBGCC) $(LATELIBS)
102
103
104$(SPOBJ): $(SPINC)
105$(ASMOBJ): $(SPINC)
106$(COBJ): $(CHEADERS)
107$(DEBUGOBJ): $(CHEADERS) lispdcmd.h
108
109
110cclean:
111        $(RM) -f $(KERNELOBJ) $(DEBUGOBJ) ../../wx86cl.exe
112
113clean:  cclean
114        $(RM) -f $(SPOBJ)
115
116strip:  ../../wx86cl.exe
117        strip -g ../../wx86cl.exe
Note: See TracBrowser for help on using the repository browser.