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 DEST
=$(SBCL_PWD
)/obj
/sbcl-home
/contrib
/
10 FASL
=$(DEST
)/$(SYSTEM
).fasl
11 ASD
=$(DEST
)/$(SYSTEM
).asd
14 EXTRA_CFLAGS
=-D_XOPEN_SOURCE
=500 -D__EXTENSIONS__
15 PATH
:=/usr
/xpg4
/bin
:${PATH}
17 ifeq (CYGWIN
,$(findstring CYGWIN
,$(UNAME
)))
18 # SBCL can't read cygwin symlinks, and cygwin likes to symlink
19 # gcc. To further complicate things, SBCL can't handle cygwin
21 CC
:=$(shell cygpath
-m
$(shell readlink
-fn
$(shell which
$(CC
))))
24 EXTRA_CFLAGS
=-D_GNU_SOURCE
27 export CC SBCL EXTRA_CFLAGS
33 $(SBCL
) --load ..
/asdf-stub.lisp \
34 --eval
'(asdf::build-asdf-contrib "$(SYSTEM)")'
37 echo
"(defsystem :$(SYSTEM) :class require-system)" > $@
40 $(SBCL
) --load ..
/asdf-stub.lisp \
41 --eval
'(asdf::test-asdf-contrib "$(SYSTEM)")'
43 # KLUDGE: There seems to be no portable way to tell tar to not to
44 # preserve owner, so chown after installing for the current user.
46 cp
$(FASL
) $(ASD
) "$(BUILD_ROOT)$(INSTALL_DIR)"