source: trunk/ccl/lisp-kernel/darwinppc/Makefile @ 5649

Last change on this file since 5649 was 5649, checked in by gb, 14 years ago

Static area (including NIL) now one page higher on ppc32, as well.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.8 KB
Line 
1#
2#   Copyright (C) 1994-2001 Digitool, Inc
3#   This file is part of OpenMCL. 
4#
5#   OpenMCL is licensed under the terms of the Lisp Lesser GNU Public
6#   License , known as the LLGPL and distributed with OpenMCL as the
7#   file "LICENSE".  The LLGPL consists of a preamble and the LGPL,
8#   which is distributed with OpenMCL as the file "LGPL".  Where these
9#   conflict, the preamble takes precedence. 
10#
11#   OpenMCL 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
17# For versions of GCC prior to 3.3, the option "-traditional-cpp" meant
18# "don't use precompiled headers", which was good advice since they didn't
19# work too well.  Beginning with GCC 3.3, the "-traditional-cpp" means
20# "use a broken preprocessor", which is (in a sense) the opposite of what
21# it used to mean.
22
23# Try to determine the version of GCC in use.  Invoke gcc with the
24# -v flag, and look for a line containing the phrase "specs from" in
25# the output.  Use sed to extract the full pathname of ths specs file
26# printed in that line, then strip off the trailing "/specs".
27gccdir = $(shell $(CC) -v 2>&1 | grep "specs from" | sed -e 's/.*from //' -e 's|/specs||')
28# $(gccdir) is set to the directory containing the specs file, without the
29# trailing slash.  The make intrinsic 'notdir' will strip a leading directory
30# prefix from that pathname, leaving us with a string that should match
31# the gcc version number
32ifneq ($(gccdir),)
33gccversion:=$(notdir $(gccdir))
34oldgcc:=$(shell expr $(gccversion) "<" "3.3")
35pregcc4:=$(shell expr $(gccversion) "<" "4.0")
36ifeq ($(oldgcc),1)
37BROKEN_PREPROCESSOR_WORKAROUND = -traditional-cpp
38endif
39endif
40
41MDYNAMIC_NO_PIC = $(shell ($(CC) --help -v 2>&1 | grep -q -e "-mdynamic-no-pic") && /bin/echo "-mdynamic-no-pic")
42
43OPENMCL_MAJOR_VERSION=0
44OPENMCL_MINOR_VERSION=14
45
46VPATH = ..
47RM = /bin/rm
48LD = ld
49LDFLAGS = -arch ppc -dynamic  -o $@ -e start -pagezero_size 0x1000 -seg1addr 0x00001000 -sectalign __TEXT __text 0x1000
50AS = as
51M4 = gm4
52M4FLAGS = -DDARWIN -DPPC
53ASFLAGS = -arch ppc -force_cpusubtype_ALL
54CDEFINES = -DDARWIN -DPPC  $(BROKEN_PREPROCESSOR_WORKAROUND) #-DDEBUG -DGC_INTEGRITY_CHECKING
55CDEBUG = -g
56COPT = -O2
57
58.s.o:
59        $(M4) $(M4FLAGS) -I../ $< | $(AS) $(ASFLAGS) -o $@
60.c.o:
61        $(CC) -c -arch ppc $< $(CDEFINES) $(CDEBUG) $(COPT) $(MDYNAMIC_NO_PIC) -o $@
62
63SPOBJ = ppc-spjump.o ppc-spentry.o  ppc-subprims.o
64ASMOBJ = ppc-asmutils.o imports.o
65
66COBJ  = pmcl-kernel.o ppc-gc.o bits.o  ppc-exceptions.o \
67        thread_manager.o lisp-debug.o image.o memory.o
68
69DEBUGOBJ = lispdcmd.o plprint.o plsym.o plbt.o ppc_print.o
70KERNELOBJ= imports.o $(COBJ) ppc-asmutils.o
71
72SPINC = lisp.s m4macros.m4 ppc-constants.s ppc-macros.s errors.s ppc-uuo.s ppc-constants32.s
73
74CHEADERS = area.h bits.h ppc-constants.h lisp-errors.h gc.h lisp.h \
75        lisp-exceptions.h lisp_globals.h macros.h memprotect.h image.h \
76        Threads.h lisptypes.h ppc-constants32.h ppc-exceptions.h
77
78# Subprims linked into the kernel ?
79# Yes:
80
81KSPOBJ= $(SPOBJ)
82all:    ../../dppccl
83
84
85# No:
86
87# KSPOBJ=
88
89OSEARLYLIBS = -lcrt1.o
90OSLATELIBS = -lSystem
91
92# gcc 4.0 and later want to use -lSystemStubs for many of the
93# runtime support functions that were in -lgcc in previous
94# versions.  'pregcc4' may have been set above.
95ifeq ($(pregcc4),1)
96OSMIDDLELIBS = -lgcc
97else
98OSMIDDLELIBS = -lSystemStubs
99endif
100
101OSLIBS = $(OSEARLYLIBS) $(OSMIDDLELIBS) $(OSLATELIBS)
102
103../../dppccl:    $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ)
104        $(LD)  $(LDFLAGS) $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ)   $(OSLIBS)
105
106
107$(SPOBJ): $(SPINC)
108$(ASMOBJ): $(SPINC)
109$(COBJ): $(CHEADERS)
110$(DEBUGOBJ): $(CHEADERS) lispdcmd.h
111
112
113
114thread_manager.o: thread_manager.c
115
116cclean:
117        $(RM) -f $(KERNELOBJ) $(DEBUGOBJ) ../../dppccl
118
119# Some earlier versions of this Makefile built "subprims_r.o". 
120# (That file is now defunct.)
121clean:  cclean
122        $(RM) -f $(SPOBJ) $(KSPOBJ) subprims_r.o
123
124strip:  ../../dppccl
125        strip -s retain ../../dppccl
Note: See TracBrowser for help on using the repository browser.