-# -*- makefile -*-
-CFLAGS = -Dppc -g -Wall -O2 -no-cpp-precomp
-OS_SRC = bsd-os.c os-common.c ppc-darwin-os.c ppc-darwin-dlshim.c ppc-darwin-langinfo.c
-OS_LIBS = -lSystem -lc -lm
+# -*- makefile -*- for the C-level run-time support for SBCL
+
+# This software is part of the SBCL system. See the README file for
+# more information.
+#
+# This software is derived from the CMU CL system, which was
+# written at Carnegie Mellon University and released into the
+# public domain. The software is in the public domain and is
+# provided with absolutely no warranty. See the COPYING and CREDITS
+# files for more information.
+
+CFLAGS = -g -Wall -O2 -fdollars-in-identifiers
+OS_SRC = bsd-os.c darwin-os.c ppc-darwin-os.c ppc-darwin-dlshim.c ppc-darwin-langinfo.c
+OS_LIBS = -lSystem -lc
OS_OBJS = ppc-darwin-rospace.o
CC = gcc
ASSEM_SRC = ppc-assem.S ldso-stubs.S
ARCH_SRC = ppc-arch.c
-CPP = cpp -no-cpp-precomp
+CPPFLAGS += -no-cpp-precomp
# KLUDGE: in OS X 10.3, Apple started putting the heap right where we
# expect our read-only space mapped. This hack causes the linker to
# place a zero-fill-on-demand segment in the same place and size as
# read-only-space, which is the only thing capable of keeping malloc
# out of this range.
-OS_LINK_FLAGS = -dynamic `cat ppc-darwin-link-flags`
+LINKFLAGS += -dynamic `cat ppc-darwin-link-flags` -twolevel_namespace -bind_at_load
-GC_SRC= cheneygc.c
+GC_SRC = $(shell if grep LISP_FEATURE_GENCGC genesis/config.h \
+ > /dev/null 2>&1; \
+ then echo "gencgc.c"; \
+ else echo "cheneygc.c" ; fi)
-CLEAN_FILES += ppc-darwin-mkrospace ppc-darwin-fix-rospace ppc-darwin-link-flags
+OS_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 $@ $<