source: branches/arm/lisp-kernel/darwinarm/Makefile @ 13923

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

Gotta start somewhere.

File size: 2.8 KB
RevLine 
[13923]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
16
17VPATH = ../
18RM = /bin/rm
19AS = /Developer/Platforms/iPhoneOS.platform/Developer/usr/libexec/gcc/darwin/arm/as
20M4 = m4
21ASFLAGS = -arch arm -force_cpusubtype_ALL
22M4FLAGS = -DDARWIN -DARM
23CDEFINES = -DDARWIN -DARM -D_REENTRANT -D_GNU_SOURCE -DDISABLE_EGC -DGC_INTEGRITY_CHECKING
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-darwinarm.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# Likewise, some versions of GAS may need a "-a32" flag, to force the
43# output file to be 32-bit compatible.
44
45A32 = $(shell ($(AS) --help -v 2>&1 | grep -q -e "-a32") && /bin/echo "-a32")
46
47.s.o:
48        $(M4) $(M4FLAGS) -I../ $< | $(AS) $(A32) $(ASFLAGS) -o $@
49.c.o:
50        $(CC) -include ../$(PLATFORM_H) -c $< $(CDEFINES) $(CDEBUG) $(COPT) -marm $(WFORMAT)  -o $@
51
52SPOBJ = pad.o  arm-spentry.o arm-subprims.o
53ASMOBJ = arm-asmutils.o imports.o
54
55COBJ  = pmcl-kernel.o gc-common.o arm-gc.o bits.o  arm-exceptions.o \
56        image.o thread_manager.o lisp-debug.o memory.o unix-calls.o
57
58DEBUGOBJ = lispdcmd.o plprint.o plsym.o albt.o arm_print.o
59KERNELOBJ= $(COBJ) arm-asmutils.o  imports.o
60
61SPINC = lisp.s m4macros.m4 arm-constants.s arm-macros.s errors.s arm-uuo.s
62
63CHEADERS = area.h bits.h arm-constants.h lisp-errors.h gc.h lisp.h \
64        lisp-exceptions.h lisp_globals.h macros.h memprotect.h image.h \
65        Threads.h arm-exceptions.h $(PLATFORM_H)
66
67# Subprims linked into the kernel ?
68# Yes:
69
70KSPOBJ = $(SPOBJ)
71all:    ../../armcl
72
73
74# No:
75
76# KSPOBJ=
77# all:  ../../ppccl ../../subprims.so
78
79OSLIBS = -ldl -lm -lpthread
80
81
82../../armcl:    $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ)
83        $(CC)  $(CDEBUG)  -Wl,--export-dynamic $(HASH_STYLE) -o $@ -T ./armdarwin.x $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) $(OSLIBS)
84
85
86$(SPOBJ): $(SPINC)
87$(ASMOBJ): $(SPINC)
88$(COBJ): $(CHEADERS)
89$(DEBUGOBJ): $(CHEADERS) lispdcmd.h
90
91
92cclean:
93        $(RM) -f $(KERNELOBJ) $(DEBUGOBJ) ../../ppccl
94
95clean:  cclean
96        $(RM) -f $(SPOBJ)
97
98strip:  ../../ppccl
99        strip -g ../../ppccl
Note: See TracBrowser for help on using the repository browser.