source: trunk/source/lisp-kernel/linuxarm/Makefile @ 14786

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

Minor corrections to linuxarm makefile.

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