source: trunk/source/lisp-kernel/darwinppc64/Makefile @ 13607

Last change on this file since 13607 was 13607, checked in by gb, 11 years ago

Define, -include PLATFORM_H.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.9 KB
Line 
1#
2#   Copyright (C) 2005 Clozure Associates and contributors.
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
17MDYNAMIC_NO_PIC = $(shell ($(CC) --help -v 2>&1 | grep -q -e "-mdynamic-no-pic") && /bin/echo "-mdynamic-no-pic")
18
19VPATH = ..
20RM = /bin/rm
21LD = ld64
22
23### The -pagezero_size/-seg1addr args are an attempt to work around a
24### bug (#4057702) in ld64.
25
26### The -seg1addr and -pagezero_size arguments below are nonsense;
27### early versions of ld64 were/are broken.
28LDFLAGS = -macosx_version_min 10.5 -M -arch ppc64 -dynamic  -o $@ -e start -pagezero_size 0x1000 -seg1addr 0x1000 -sectalign __TEXT __text 0x1000
29AS = as
30M4 = gm4
31M4FLAGS = -DDARWIN -DPPC -DPPC64
32ASFLAGS = -arch ppc64
33CDEFINES = -DDARWIN -DPPC -DPPC64
34CDEBUG = -g
35COPT = -O2
36# Once in a while, -Wformat says something useful.  The odds are against that,
37# however.
38WFORMAT = -Wno-format
39CC=gcc-4.0
40PLATFORM_H = platform-darwinppc64.h
41
42.s.o:
43        $(M4) $(M4FLAGS) -I../ $< | $(AS) $(ASFLAGS) -o $@
44.c.o:
45        $(CC) -include ../$(PLATFORM_H) -c $< -arch ppc64 $(CDEFINES) $(CDEBUG) $(COPT) $(MDYNAMIC_NO_PIC) $(WFORMAT) -mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk -o $@
46
47SPOBJ = ppc-spjump.o ppc-spentry.o ppc-subprims.o
48ASMOBJ = ppc-asmutils.o imports.o
49
50COBJ  = pmcl-kernel.o gc-common.o ppc-gc.o bits.o  ppc-exceptions.o \
51        thread_manager.o lisp-debug.o image.o memory.o unix-calls.o
52
53DEBUGOBJ = lispdcmd.o plprint.o plsym.o plbt.o ppc_print.o
54KERNELOBJ= imports.o $(COBJ) ppc-asmutils.o
55
56SPINC = lisp.s m4macros.m4 ppc-constants.s ppc-macros.s errors.s ppc-uuo.s \
57        ppc-constants64.s
58
59CHEADERS = area.h bits.h ppc-constants.h lisp-errors.h gc.h lisp.h \
60        lisp-exceptions.h lisp_globals.h macros.h memprotect.h image.h \
61        Threads.h lisptypes.h ppc-constants64.h ppc-exceptions.h $(PLATFORM_H)
62
63# Subprims linked into the kernel ?
64# Yes:
65
66KSPOBJ= $(SPOBJ)
67all:    ../../dppccl64
68
69
70# No:
71
72# KSPOBJ=
73
74OSEARLYLIBS = -lcrt1.o
75OSLATELIBS = -lSystem -lmx
76
77OSLIBS = $(OSEARLYLIBS) $(OSMIDDLELIBS) $(OSLATELIBS)
78
79../../dppccl64:  $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ) Makefile
80        $(LD)  $(LDFLAGS) $(KSPOBJ) $(KERNELOBJ) $(DEBUGOBJ)   $(OSLIBS)
81
82
83$(SPOBJ): $(SPINC)
84$(ASMOBJ): $(SPINC)
85$(COBJ): $(CHEADERS)
86$(DEBUGOBJ): $(CHEADERS) lispdcmd.h
87
88
89thread_manager.o: thread_manager.c
90
91cclean:
92        $(RM) -f $(KERNELOBJ) $(DEBUGOBJ) ../../dppccl64
93
94# Some earlier versions of this Makefile built "subprims_r.o". 
95# (That file is now defunct.)
96clean:  cclean
97        $(RM) -f $(SPOBJ) $(KSPOBJ) subprims_r.o
98
99strip:  ../../dppccl64
100        strip -s retain ../../dppccl64
Note: See TracBrowser for help on using the repository browser.