1 # -*- makefile -*- for the C-level run-time support for SBCL
3 # This software is part of the SBCL system. See the README file for
6 # This software is derived from the CMU CL system, which was
7 # written at Carnegie Mellon University and released into the
8 # public domain. The software is in the public domain and is
9 # provided with absolutely no warranty. See the COPYING and CREDITS
10 # files for more information.
12 CFLAGS = -g -Wall -O2 -fdollars-in-identifiers
14 ifdef SBCL_MACOSX_VERSION_MIN
15 CFLAGS += -mmacosx-version-min=$(SBCL_MACOSX_VERSION_MIN)
16 LINKFLAGS += -mmacosx-version-min=$(SBCL_MACOSX_VERSION_MIN)
18 # This file is included both for compiling of host tools (in tools-for-build)
19 # as well as the target objects. In the former case we haven't yet written
20 # the "Makefile.features" file wherein the DARWIN9 flag is set.
21 # That's fine because the host should be able to compile files for itself
22 # without requiring any extra magic in the compiler invocation.
23 ifdef LISP_FEATURE_DARWIN9_OR_BETTER
24 CFLAGS += -mmacosx-version-min=10.6
25 LINKFLAGS += -mmacosx-version-min=10.6
27 CFLAGS += -mmacosx-version-min=10.4
28 LINKFLAGS += -mmacosx-version-min=10.4
31 ifdef LISP_FEATURE_INODE64
32 CFLAGS += -D_DARWIN_USE_64_BIT_INODE
35 OS_SRC = bsd-os.c x86-64-bsd-os.c darwin-os.c x86-64-darwin-os.c
37 OS_LIBS = -lSystem -lc -ldl
38 ifdef LISP_FEATURE_SB_THREAD
41 ifdef LISP_FEATURE_SB_CORE_COMPRESSION
44 ifndef LISP_FEATURE_SB_DYNAMIC_CORE
45 LINKFLAGS +=-Wl,-no_pie
47 ifdef LISP_FEATURE_SB_LINKABLE_RUNTIME
49 USE_LIBSBCL = -Wl,-force_load libsbcl.a
52 ASSEM_SRC = x86-64-assem.S ldso-stubs.S
53 ARCH_SRC = x86-64-arch.c
55 LINKFLAGS += -arch x86_64 -dynamic -twolevel_namespace -bind_at_load -pagezero_size 0x100000
57 CFLAGS += -arch x86_64 -fno-omit-frame-pointer
59 ifdef LISP_FEATURE_IMMOBILE_SPACE
60 GC_SRC = fullcgc.c gencgc.c traceroot.c immobile-space.c
62 GC_SRC = fullcgc.c gencgc.c traceroot.c
65 # Nothing to do for after-grovel-headers.
66 .PHONY: after-grovel-headers