Warn about bad arguments to ~r at compile time.
[sbcl.git] / contrib / asdf-module.mk
blob07f687ca845f7b54b92649a2510562a96396c89b
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
14 ifeq (SunOS,$(UNAME))
15 EXTRA_CFLAGS+=-D_XOPEN_SOURCE=500 -D__EXTENSIONS__
16 PATH:=/usr/xpg4/bin:${PATH}
17 endif
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
21 # paths, either.
22 CC:=$(shell cygpath -m $(shell readlink -fn $(shell which $(CC))))
23 endif
24 ifeq (Linux,$(UNAME))
25 EXTRA_CFLAGS+=-D_GNU_SOURCE
26 endif
28 export CC SBCL EXTRA_CFLAGS
30 all: $(FASL)
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) \
40 ../sb-grovel/*.lisp
41 $(SBCL) --load ../make-contrib.lisp "$(SYSTEM)" $(MODULE_REQUIRES) </dev/null