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

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

Add SVN_REVISION to linuxppc makefiles, too.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.3 KB
RevLine 
[2747]1#
2#   Copyright (C) 1994-2001 Digitool, Inc
[13066]3#   This file is part of Clozure CL. 
[2747]4#
[13066]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
[2747]7#   file "LICENSE".  The LLGPL consists of a preamble and the LGPL,
[13066]8#   which is distributed with Clozure CL as the file "LGPL".  Where these
[2747]9#   conflict, the preamble takes precedence. 
10#
[13066]11#   Clozure CL is referenced in the preamble as the "LIBRARY."
[2747]12#
13#   The LLGPL is also available online at
14#   http://opensource.franz.com/preamble.html
15
[14392]16SVN_REVISION=$(shell svnversion || echo "unknown")
[2747]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 = -mregnames -mppc32 -maltivec
[2750]25M4FLAGS = -DLINUX -DPPC
[14392]26CDEFINES = -DLINUX -DPPC -D_REENTRANT -D_GNU_SOURCE -DSVN_REVISION=$(SVN_REVISION)
[2747]27CDEBUG = -g
28COPT = -O2
[11580]29# Once in a while, -Wformat says something useful.  The odds are against that,
30# however.
31WFORMAT = -Wno-format
[13602]32PLATFORM_H = platform-linuxppc.h
[2747]33
[5997]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
[2747]44# The only version of GCC I have that supports both ppc32 and ppc64
45# compilation uses the -m32 option to target ppc32.  This may not be
46# definitive; there seem to be a bewildering array of similar options
47# in other GCC versions.  It's assumed here that if "-m32" is recognized,
48# it's required as well.
49
50PPC32 = $(shell ($(CC) --help -v 2>&1 | grep -q -e "-m32 ") && /bin/echo "-m32")
51
52# Likewise, some versions of GAS may need a "-a32" flag, to force the
53# output file to be 32-bit compatible.
54
55A32 = $(shell ($(AS) --help -v 2>&1 | grep -q -e "-a32") && /bin/echo "-a32")
56
57.s.o:
58        $(M4) $(M4FLAGS) -I../ $< | $(AS) $(A32) $(ASFLAGS) -o $@
59.c.o:
[13602]60        $(CC) -include ../$(PLATFORM_H) -c $< $(CDEFINES) $(CDEBUG) $(COPT) $(WFORMAT) $(PPC32) -o $@
[2747]61
[3352]62SPOBJ = pad.o ppc-spjump.o ppc-spentry.o ppc-subprims.o
[2784]63ASMOBJ = ppc-asmutils.o imports.o
[2747]64
[7671]65COBJ  = pmcl-kernel.o gc-common.o ppc-gc.o bits.o  ppc-exceptions.o \
[10737]66        image.o thread_manager.o lisp-debug.o memory.o unix-calls.o
[2747]67
68DEBUGOBJ = lispdcmd.o plprint.o plsym.o plbt.o ppc_print.o
[2786]69KERNELOBJ= $(COBJ) ppc-asmutils.o  imports.o
[2747]70
[2807]71SPINC = lisp.s m4macros.m4 ppc-constants.s ppc-macros.s errors.s ppc-uuo.s ppc-constants32.s
[2747]72
[2776]73CHEADERS = area.h bits.h ppc-constants.h lisp-errors.h gc.h lisp.h \
[2747]74        lisp-exceptions.h lisp_globals.h macros.h memprotect.h image.h \
[14197]75        threads.h ppc-constants32.h ppc-exceptions.h $(PLATFORM_H) \
[13638]76        constants.h os-linux.h
[2747]77
78# Subprims linked into the kernel ?
79# Yes:
80
81KSPOBJ = $(SPOBJ)
82all:    ../../ppccl
83
84
85# No:
86
87# KSPOBJ=
88# all:  ../../ppccl ../../subprims.so
89
90OSLIBS = -ldl -lm -lpthread
91
92
93../../ppccl:    $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ)
[5997]94        $(CC) $(PPC32) $(CDEBUG)  -Wl,--export-dynamic $(HASH_STYLE) -o $@ -T ./elf32ppclinux.x $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) $(OSLIBS)
[2747]95
96
97$(SPOBJ): $(SPINC)
98$(ASMOBJ): $(SPINC)
99$(COBJ): $(CHEADERS)
100$(DEBUGOBJ): $(CHEADERS) lispdcmd.h
101
102
103cclean:
104        $(RM) -f $(KERNELOBJ) $(DEBUGOBJ) ../../ppccl
105
106clean:  cclean
107        $(RM) -f $(SPOBJ)
108
109strip:  ../../ppccl
110        strip -g ../../ppccl
Note: See TracBrowser for help on using the repository browser.