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

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

Closer to real.

File size: 3.1 KB
Line 
1#
2#   Copyright (C) 1994-2001 Digitool, Inc
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# Versions of GNU as >= 2.9.1 all seem to work
20# AS = gas-2.9.1
21AS = as
22M4 = m4
23ASFLAGS =
24M4FLAGS = -DLINUX -DARM
25CDEFINES = -DLINUX -DARM -D_REENTRANT -D_GNU_SOURCE
26CDEBUG = -g
27COPT = -O2
28# Once in a while, -Wformat says something useful.  The odds are against that,
29# however.
30WFORMAT = -Wno-format
31PLATFORM_H = platform-linuxarm.h
32
33# If the linker supports a "--hash-style=" option, use traditional
34# Sysv hash tables.  (If it doesn't support that option, assume
35# that traditional hash tables will be used by default.)
36ld_has_hash_style = $(shell $(LD) --help | grep "hash-style=")
37ifeq ($(ld_has_hash_style),)
38HASH_STYLE=
39else
40HASH_STYLE="-Wl,--hash-style=sysv"
41endif
42
43# The only version of GCC I have that supports both ppc32 and ppc64
44# compilation uses the -m32 option to target ppc32.  This may not be
45# definitive; there seem to be a bewildering array of similar options
46# in other GCC versions.  It's assumed here that if "-m32" is recognized,
47# it's required as well.
48
49PPC32 = $(shell ($(CC) --help -v 2>&1 | grep -q -e "-m32 ") && /bin/echo "-m32")
50
51# Likewise, some versions of GAS may need a "-a32" flag, to force the
52# output file to be 32-bit compatible.
53
54A32 = $(shell ($(AS) --help -v 2>&1 | grep -q -e "-a32") && /bin/echo "-a32")
55
56.s.o:
57        $(M4) $(M4FLAGS) -I../ $< | $(AS) $(A32) $(ASFLAGS) -o $@
58.c.o:
59        $(CC) -include ../$(PLATFORM_H) -c $< $(CDEFINES) $(CDEBUG) $(COPT) $(WFORMAT) $(PPC32) -o $@
60
61SPOBJ = pad.o  arm-spentry.o arm-subprims.o
62ASMOBJ = arm-asmutils.o imports.o
63
64COBJ  = pmcl-kernel.o gc-common.o arm-gc.o bits.o  arm-exceptions.o \
65        image.o thread_manager.o lisp-debug.o memory.o unix-calls.o
66
67DEBUGOBJ = lispdcmd.o plprint.o plsym.o albt.o arm_print.o
68KERNELOBJ= $(COBJ) arm-asmutils.o  imports.o
69
70SPINC = lisp.s m4macros.m4 arm-constants.s arm-macros.s errors.s arm-uuo.s
71
72CHEADERS = area.h bits.h arm-constants.h lisp-errors.h gc.h lisp.h \
73        lisp-exceptions.h lisp_globals.h macros.h memprotect.h image.h \
74        Threads.h arm-exceptions.h $(PLATFORM_H)
75
76# Subprims linked into the kernel ?
77# Yes:
78
79KSPOBJ = $(SPOBJ)
80all:    ../../armcl
81
82
83# No:
84
85# KSPOBJ=
86# all:  ../../ppccl ../../subprims.so
87
88OSLIBS = -ldl -lm -lpthread
89
90
91../../armcl:    $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ)
92        $(CC) $(PPC32) $(CDEBUG)  -Wl,--export-dynamic $(HASH_STYLE) -o $@ -T ./elf32ppclinux.x $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) $(OSLIBS)
93
94
95$(SPOBJ): $(SPINC)
96$(ASMOBJ): $(SPINC)
97$(COBJ): $(CHEADERS)
98$(DEBUGOBJ): $(CHEADERS) lispdcmd.h
99
100
101cclean:
102        $(RM) -f $(KERNELOBJ) $(DEBUGOBJ) ../../ppccl
103
104clean:  cclean
105        $(RM) -f $(SPOBJ)
106
107strip:  ../../ppccl
108        strip -g ../../ppccl
Note: See TracBrowser for help on using the repository browser.