2 # We need to extend flags to the C compiler and the linker
3 # here. sb-posix, sb-grovel, and sb-bsd-sockets depends upon these
4 # being set on x86_64. Setting these in their Makefiles is not
5 # adequate since, while we're building contrib, they can be compiled
6 # directly via ASDF from a non-C-aware module which has these tricky
7 # ones as dependencies.
9 UNAME:=$(shell uname -s)
12 EXTRA_CFLAGS=-D_XOPEN_SOURCE=500 -D__EXTENSIONS__
13 PATH:=/usr/xpg4/bin:${PATH}
15 ifeq (CYGWIN,$(findstring CYGWIN,$(UNAME)))
16 EXTRA_CFLAGS=-mno-cygwin
17 # GCC 4.x doesn't accept -mno-cygwin.
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 export CC SBCL EXTRA_CFLAGS EXTRA_LDFLAGS
27 all: $(EXTRA_ALL_TARGETS)
29 $(SBCL) --eval '(defvar *system* "$(SYSTEM)")' --load ../asdf-stub.lisp --eval '(exit)'
32 echo "(asdf:operate (quote asdf:load-op) :$(SYSTEM))" \
33 "(asdf:operate (quote asdf:test-op) :$(SYSTEM))" | \
34 $(SBCL) --eval '(load "../asdf/asdf")'
36 # KLUDGE: There seems to be no portable way to tell tar to not to
37 # preserve owner, so chown after installing for the current user.
38 install: $(EXTRA_INSTALL_TARGETS)
39 tar cf - . | ( cd "$(BUILD_ROOT)$(INSTALL_DIR)" && tar xpvf - )
40 find "$(BUILD_ROOT)$(INSTALL_DIR)" -exec chown `id -u`:`id -g` {} \;