source: trunk/source/lisp-kernel/linuxx8632/Makefile @ 13638

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

Move more PPC exception stuff, x86 exception stuff to platform heeaders.
Introduce OS headers; so far, just signal constants. Include the applicable
os-*.h in platform-*.h.
Ensure that Makefiles have constants.h, os*.h in CHEADERS.
Will try to smoke-test & fix typos before sleeping.

File size: 2.7 KB
Line 
1#
2#   Copyright (C) 2008 Clozure Associates and contributors
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
19AS = as
20M4 = m4
21ASFLAGS = --32
22M4FLAGS = -DLINUX -DX86 -DX8632 -DHAVE_TLS
23CDEFINES = -DLINUX -D_REENTRANT -DX86 -DX8632 -D_GNU_SOURCE -DHAVE_TLS -DUSE_FUTEX #-DGC_INTEGRITY_CHECKING -DDISABLE_EGC
24CDEBUG = -g
25COPT = -O2
26# Once in a while, -Wformat says something useful.  The odds are against that,
27# however.
28WFORMAT = -Wno-format
29PLATFORM_H = platform-darwinx8632.h
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) -include ../$(PLATFORM_H) -c $< $(CDEFINES) $(CDEBUG) $(COPT) $(WFORMAT) -m32 -o $@
46
47SPOBJ = pad.o x86-spjump32.o x86-spentry32.o x86-subprims32.o
48ASMOBJ = x86-asmutils32.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 unix-calls.o
52
53DEBUGOBJ = lispdcmd.o plprint.o plsym.o xlbt.o x86_print.o
54KERNELOBJ= $(COBJ) x86-asmutils32.o  imports.o
55
56SPINC = lisp.s m4macros.m4 x86-constants.s x86-macros.s errors.s x86-uuo.s \
57        x86-constants32.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-constants32.h x86-exceptions.h lisptypes.h \
62        $(PLATFORM_H) constants.h os-linux.h
63
64
65KSPOBJ = $(SPOBJ)
66all:    ../../lx86cl
67
68
69OSLIBS = -ldl -lm -lpthread
70LINK_SCRIPT = # ./elf_x86_32.x
71USE_LINK_SCRIPT = # -T $(LINK_SCRIPT)
72
73../../lx86cl:   $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) Makefile  $(LINK_SCRIPT)
74        $(CC)  -m32 $(CDEBUG)  -Wl,--export-dynamic $(HASH_STYLE) -o $@ $(USE_LINK_SCRIPT) $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) $(OSLIBS)
75
76
77$(SPOBJ): $(SPINC)
78$(ASMOBJ): $(SPINC)
79$(COBJ): $(CHEADERS)
80$(DEBUGOBJ): $(CHEADERS) lispdcmd.h
81
82
83cclean:
84        $(RM) -f $(KERNELOBJ) $(DEBUGOBJ) ../../lx86cl
85
86clean:  cclean
87        $(RM) -f $(SPOBJ)
88
89strip:  ../../lx86cl
90        strip -g ../../lx86cl
Note: See TracBrowser for help on using the repository browser.