1 # We need to extend flags to the C compiler and the linker
2 # here. sb-posix, sb-grovel, and sb-bsd-sockets depends upon these
3 # being set on x86_64. Setting these in their Makefiles is not
4 # adequate since, while we're building contrib, they can be compiled
5 # directly via ASDF from a non-C-aware module which has these tricky
6 # ones as dependencies.
8 UNAME
:=$(shell uname
-s
)
9 # no trailing slash on DEST. Don't want a "//" in FASL and ASD
10 DEST
=$(SBCL_TOP
)/obj
/sbcl-home
/contrib
11 FASL
=$(DEST
)/$(SYSTEM
).fasl
12 ASD
=$(DEST
)/$(SYSTEM
).asd
15 EXTRA_CFLAGS
+=-D_XOPEN_SOURCE
=500 -D__EXTENSIONS__
16 PATH
:=/usr
/xpg4
/bin
:${PATH}
18 ifeq (CYGWIN
,$(findstring CYGWIN
,$(UNAME
)))
19 # SBCL can't read cygwin symlinks, and cygwin likes to symlink
20 # gcc. To further complicate things, SBCL can't handle cygwin
22 CC
:=$(shell cygpath
-m
$(shell readlink
-fn
$(shell which
$(CC
))))
25 EXTRA_CFLAGS
+=-D_GNU_SOURCE
28 export CC SBCL EXTRA_CFLAGS
32 # The explicit use of $wildcard is necessary here. While rules do expand
33 # wildcards implicitly (so that just "$(FASL): *.lisp" mostly works),
34 # that specification would fail on the contribs which have no .lisp file
35 # in the current directory.
36 # The prerequisite of sb-grovel might be spurious, but I don't want to detect
37 # whether sb-grovel is actually needed.
38 # This produces $(ASD) as a side-effect.
39 $(FASL
): $(SBCL_TOP
)/output
/sbcl.core
$(wildcard *.lisp
) $(wildcard */*.lisp
) \
41 $(SBCL
) --load ..
/make-contrib.lisp
"$(SYSTEM)" $(MODULE_REQUIRES
) </dev
/null