source: trunk/source/lisp-kernel/linuxppc/Makefile @ 14197

Last change on this file since 14197 was 14197, checked in by rme, 9 years ago

Rename Threads.h to threads.h (with no capital letter).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.2 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 = -mregnames -mppc32 -maltivec
24M4FLAGS = -DLINUX -DPPC
25CDEFINES = -DLINUX -DPPC -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-linuxppc.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 ppc-spjump.o ppc-spentry.o ppc-subprims.o
62ASMOBJ = ppc-asmutils.o imports.o
63
64COBJ  = pmcl-kernel.o gc-common.o ppc-gc.o bits.o  ppc-exceptions.o \
65        image.o thread_manager.o lisp-debug.o memory.o unix-calls.o
66
67DEBUGOBJ = lispdcmd.o plprint.o plsym.o plbt.o ppc_print.o
68KERNELOBJ= $(COBJ) ppc-asmutils.o  imports.o
69
70SPINC = lisp.s m4macros.m4 ppc-constants.s ppc-macros.s errors.s ppc-uuo.s ppc-constants32.s
71
72CHEADERS = area.h bits.h ppc-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 ppc-constants32.h ppc-exceptions.h $(PLATFORM_H) \
75        constants.h os-linux.h
76
77# Subprims linked into the kernel ?
78# Yes:
79
80KSPOBJ = $(SPOBJ)
81all:    ../../ppccl
82
83
84# No:
85
86# KSPOBJ=
87# all:  ../../ppccl ../../subprims.so
88
89OSLIBS = -ldl -lm -lpthread
90
91
92../../ppccl:    $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ)
93        $(CC) $(PPC32) $(CDEBUG)  -Wl,--export-dynamic $(HASH_STYLE) -o $@ -T ./elf32ppclinux.x $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) $(OSLIBS)
94
95
96$(SPOBJ): $(SPINC)
97$(ASMOBJ): $(SPINC)
98$(COBJ): $(CHEADERS)
99$(DEBUGOBJ): $(CHEADERS) lispdcmd.h
100
101
102cclean:
103        $(RM) -f $(KERNELOBJ) $(DEBUGOBJ) ../../ppccl
104
105clean:  cclean
106        $(RM) -f $(SPOBJ)
107
108strip:  ../../ppccl
109        strip -g ../../ppccl
Note: See TracBrowser for help on using the repository browser.