+# -*- 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 += -Dmips -g
-LD = ld
-LINKFLAGS = -v -g -O2
+LINKFLAGS += -v -O2 -Wl,--export-dynamic
NM = ./linux-nm
ASSEM_SRC = mips-assem.S ldso-stubs.S
ARCH_SRC = mips-arch.c
-OS_SRC = linux-os.c mips-linux-os.c os-common.c
-OS_LIBS= -ldl
+OS_SRC = linux-os.c mips-linux-os.c
+OS_LIBS = -ldl
+
+ifdef LISP_FEATURE_LARGEFILE
+ CFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
+endif
+
+ifdef LISP_FEATURE_SB_THREAD
+ OS_LIBS += -lpthread
+endif
+
+GC_SRC = cheneygc.c
-GC_SRC= cheneygc.c
+# Nothing to do for after-grovel-headers.
+.PHONY: after-grovel-headers
+after-grovel-headers: