+# -*- 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.
#
# provided with absolutely no warranty. See the COPYING and CREDITS
# files for more information.
-CFLAGS = -g -Dppc
-LD = ld
-LINKFLAGS = -v -g
-NM = nm -p
+CFLAGS = -g -m32
+LINKFLAGS += -v -rdynamic -m32
+NM = ./linux-nm
ASSEM_SRC = ppc-assem.S ldso-stubs.S
ARCH_SRC = ppc-arch.c
-OS_SRC = linux-os.c ppc-linux-os.c os-common.c
-LINKFLAGS+=-rdynamic
-OS_LIBS= -ldl
+OS_SRC = linux-os.c ppc-linux-os.c
+OS_LIBS = -ldl
+
+ifdef LISP_FEATURE_GENCGC
+ GC_SRC = gencgc.c
+else
+ GC_SRC = cheneygc.c
+endif
+
+ifdef LISP_FEATURE_SB_THREAD
+ OS_LIBS += -lpthread
+endif
+ifdef LISP_FEATURE_SB_CORE_COMPRESSION
+ OS_LIBS += -lz
+endif
-GC_SRC= cheneygc.c
+# Nothing to do for after-grovel-headers.
+.PHONY: after-grovel-headers
+after-grovel-headers: