-SYSTEM=bsd-sockets
+# Set CFLAGS and LDFLAGS for sb-bsd-sockets.asd's invocation of gcc
-all:
- $(MAKE) -C ../asdf
- echo "(asdf:operate 'asdf:load-op :$(SYSTEM))" | \
- $(SBCL) --eval '(load "../asdf/asdf")'
+UNAME:=$(shell uname -m)
-test:
- true
+export CFLAGS=-fPIC
+ifeq (solaris,$(UNAME))
+ export LDFLAGS=-shared -lresolv -lsocket -lnsl
+else
+ ifeq (Darwin,$(UNAME))
+ export LDFLAGS=-bundle
+ else
+ ifeq (x86_64,$(UNAME))
+ export LDFLAGS=-m32 -shared
+ export CFLAGS+= -m32
+ else
+ export LDFLAGS=-shared
+ endif
+ endif
+endif
-install: all
- tar cf - . | ( cd $(INSTALL_DIR) && tar xpvf - )
- ( cd $(SBCL_HOME)/systems && ln -fs ../$(SYSTEM)/$(SYSTEM).asd . )
+SYSTEM=sb-bsd-sockets
+include ../asdf-module.mk