source: branches/arm/lisp-kernel/linuxarm/Makefile @ 13803

Last change on this file since 13803 was 13803, checked in by gb, 9 years ago

Use -gstabs, which has some limitations but seems to calm GDB down.

File size: 2.7 KB
Line 
1
2#
3#   Copyright (C) 1994-2001 Digitool, Inc
4#   This file is part of Clozure CL. 
5#
6#   Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
7#   License , known as the LLGPL and distributed with Clozure CL as the
8#   file "LICENSE".  The LLGPL consists of a preamble and the LGPL,
9#   which is distributed with Clozure CL as the file "LGPL".  Where these
10#   conflict, the preamble takes precedence. 
11#
12#   Clozure CL is referenced in the preamble as the "LIBRARY."
13#
14#   The LLGPL is also available online at
15#   http://opensource.franz.com/preamble.html
16
17
18VPATH = ../
19RM = /bin/rm
20# Versions of GNU as >= 2.9.1 all seem to work
21# AS = gas-2.9.1
22AS = as
23M4 = m4
24ASFLAGS =
25M4FLAGS = -DLINUX -DARM
26CDEFINES = -DLINUX -DARM -D_REENTRANT -D_GNU_SOURCE
27CDEBUG = -gstabs
28COPT = #-O2
29# Once in a while, -Wformat says something useful.  The odds are against that,
30# however.
31WFORMAT = -Wno-format
32PLATFORM_H = platform-linuxarm.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
44
45# Likewise, some versions of GAS may need a "-a32" flag, to force the
46# output file to be 32-bit compatible.
47
48A32 = $(shell ($(AS) --help -v 2>&1 | grep -q -e "-a32") && /bin/echo "-a32")
49
50.s.o:
51        $(M4) $(M4FLAGS) -I../ $< | $(AS) $(A32) $(ASFLAGS) -o $@
52.c.o:
53        $(CC) -include ../$(PLATFORM_H) -c $< $(CDEFINES) $(CDEBUG) $(COPT) -marm $(WFORMAT)  -o $@
54
55SPOBJ = pad.o  arm-spentry.o arm-subprims.o
56ASMOBJ = arm-asmutils.o imports.o
57
58COBJ  = pmcl-kernel.o gc-common.o arm-gc.o bits.o  arm-exceptions.o \
59        image.o thread_manager.o lisp-debug.o memory.o unix-calls.o
60
61DEBUGOBJ = lispdcmd.o plprint.o plsym.o albt.o arm_print.o
62KERNELOBJ= $(COBJ) arm-asmutils.o  imports.o
63
64SPINC = lisp.s m4macros.m4 arm-constants.s arm-macros.s errors.s arm-uuo.s
65
66CHEADERS = area.h bits.h arm-constants.h lisp-errors.h gc.h lisp.h \
67        lisp-exceptions.h lisp_globals.h macros.h memprotect.h image.h \
68        Threads.h arm-exceptions.h $(PLATFORM_H)
69
70# Subprims linked into the kernel ?
71# Yes:
72
73KSPOBJ = $(SPOBJ)
74all:    ../../armcl
75
76
77# No:
78
79# KSPOBJ=
80# all:  ../../ppccl ../../subprims.so
81
82OSLIBS = -ldl -lm -lpthread
83
84
85../../armcl:    $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ)
86        $(CC)  $(CDEBUG)  -Wl,--export-dynamic $(HASH_STYLE) -o $@ -T ./armlinux.x $(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) ../../ppccl
97
98clean:  cclean
99        $(RM) -f $(SPOBJ)
100
101strip:  ../../ppccl
102        strip -g ../../ppccl
Note: See TracBrowser for help on using the repository browser.