2 CFLAGS = -Dppc -g -Wall -O2 -no-cpp-precomp
3 OS_SRC = bsd-os.c os-common.c ppc-darwin-os.c ppc-darwin-dlshim.c ppc-darwin-langinfo.c
4 OS_LIBS = -lSystem -lc -lm
8 ASSEM_SRC = ppc-assem.S ldso-stubs.S
11 CPP = cpp -no-cpp-precomp
13 # KLUDGE: in OS X 10.3, Apple started putting the heap right where we
14 # expect our read-only space mapped. This hack causes the linker to
15 # place a zero-fill-on-demand segment in the same place and size as
16 # read-only-space, which is the only thing capable of keeping malloc
19 # FIXME: "-Wl,-segaddr,SBCLRO,0x1000000" is output from
20 # ppc-darwin-mkrospace (it depends on READ_ONLY_SPACE I believe) but it
22 OS_LINK_FLAGS = -dynamic -Wl,-segaddr,SBCLRO,0x1000000 -Wl,-seg1addr,0x5000000 $(if $(AFTER_GROVEL_HEADERS),ppc-darwin-rospace.o)
26 CLEAN_FILES += ppc-darwin-mkrospace
28 ppc-darwin-mkrospace: ppc-darwin-mkrospace.c
31 ppc-darwin-rospace.o: ppc-darwin-mkrospace
32 ./ppc-darwin-mkrospace
34 .PHONY: after-grovel-headers
36 # Rebuild the sbcl runtime to avoid Panther placing the heap where
37 # it wants read only space (in the first 32 megabytes, where it
38 # can be absolute-branched to with BA.) Must be done after
39 # grovel-headers, because Apple's nm is broken.
40 after-grovel-headers: ppc-darwin-rospace.o
42 $(GNUMAKE) sbcl AFTER_GROVEL_HEADERS=1
44 # Fortunatly make-target-1.sh does a make clean all the time.
45 # Otherwise we would have to make sure that sbcl gets rebuilt without
46 # the readonlyspace hack before groveling headers again.