+CLEAN_FILES += ppc-darwin-mkrospace ppc-darwin-fix-rospace ppc-darwin-link-flags
+
+ppc-darwin-mkrospace: ppc-darwin-mkrospace.c
+ $(CC) -g -Wall -pedantic -o $@ $<
+
+ppc-darwin-fix-rospace: ppc-darwin-fix-rospace.c
+ $(CC) -g -Wall -pedantic -o $@ $<
+
+ppc-darwin-rospace.o ppc-darwin-link-flags: ppc-darwin-mkrospace
+ ./ppc-darwin-mkrospace > ppc-darwin-link-flags
+
+.PHONY: after-grovel-headers
+
+# Fix the sbcl runtime to avoid Panther placing the heap where
+# it wants read only space (in the first 32 megabytes, where it
+# can be absolute-branched to with BA.) Must be done after
+# grovel-headers, because Apple's nm is broken.
+after-grovel-headers: ppc-darwin-fix-rospace
+ ./ppc-darwin-fix-rospace
+
+# Fortunatly make-target-1.sh does a make clean all the time.
+# Otherwise we would have to make sure that sbcl gets rebuilt without
+# the readonlyspace hack before groveling headers again.