8f8cc2e81cd0dd04c8617d24e0826a927e0f4ad5
[sbcl.git] / src / runtime / Config.ppc-darwin
1 # -*- makefile -*-
2 CFLAGS = -Dppc -g -Wall -O3 -no-cpp-precomp
3 OS_SRC = bsd-os.c os-common.c ppc-darwin-os.c ppc-darwin-dlshim.c
4 OS_LIBS = -lSystem -lc -lm
5
6 # Avoid the gcc 3.3 prerelease tarpit of death!
7 CC = gcc3
8
9 ASSEM_SRC = ppc-assem.S ldso-stubs.S
10 ARCH_SRC = ppc-arch.c
11
12 CPP = cpp -no-cpp-precomp
13
14 # FIXME - "-Wl,-segaddr,SBCLRO,0x1000000" is output from
15 # ppc-darwin-mkrospace (it depends on READ_ONLY_SPACE I believe) but it
16 # is hard-coded here!
17 OS_LINK_FLAGS = -dynamic -L$(HOME)/local/lib -L/sw/lib -L/opt/local/lib -L/usr/local/lib -Wl,-segaddr,SBCLRO,0x1000000 -Wl,-seg1addr,0x5000000 $(if $(AFTER_GROVEL_HEADERS),ppc-darwin-rospace.o)
18
19 GC_SRC= cheneygc.c
20
21 CLEAN_FILES += ppc-darwin-mkrospace
22
23 ppc-darwin-mkrospace: ppc-darwin-mkrospace.c
24         $(CC) -o $@ $<
25
26 ppc-darwin-rospace.o: ppc-darwin-mkrospace
27         ./ppc-darwin-mkrospace
28
29 .PHONY: after-grovel-headers
30
31 # Rebuild the sbcl runtime to avoid Panther placing the heap where
32 # it wants read only space (in the first 32 megabytes, where it
33 # can be absolute-branched to with BA.)  Must be done after 
34 # grovel-headers, because Apple's nm is broken.
35 after-grovel-headers: ppc-darwin-rospace.o
36         rm -f sbcl
37         $(GNUMAKE) sbcl AFTER_GROVEL_HEADERS=1
38
39 # Fortunatly make-target-1.sh does a make clean all the time.
40 # Otherwise we would have to make sure that sbcl gets rebuilt without
41 # the readonlyspace hack before groveling headers again.