.PHONY: all clean TAGS tags targets
-all: targets
+all: targets tags
TARGET=sbcl
# Defaults which might be overridden or modified by values in the
DEPEND_FLAGS = -MM
GREP = grep
-CFLAGS = -g -Wall -O3
+include ../../output/prefix.def
+
+CFLAGS = -g -Wall -Wsign-compare -O3
ASFLAGS = $(CFLAGS)
-CPPFLAGS = -I.
+CPPFLAGS = -I. -DSBCL_PREFIX=\"$(SBCL_PREFIX)\"
# Give make access to the target Lisp features.
include genesis/Makefile.features
include Config
COMMON_SRC = alloc.c backtrace.c breakpoint.c coreparse.c \
- dynbind.c gc-common.c globals.c interr.c interrupt.c largefile.c \
- monitor.c os-common.c parse.c print.c purify.c pthread-lutex.c \
- regnames.c run-program.c runtime.c save.c search.c \
- thread.c time.c util.c validate.c vars.c wrap.c
+ dynbind.c funcall.c gc-common.c globals.c interr.c interrupt.c \
+ largefile.c monitor.c os-common.c parse.c print.c purify.c \
+ pthread-futex.c \
+ regnames.c run-program.c runtime.c safepoint.c save.c search.c \
+ thread.c time.c util.c validate.c vars.c wrap.c
C_SRC = $(COMMON_SRC) ${ARCH_SRC} ${OS_SRC} ${GC_SRC}
$(CC) ${LINKFLAGS} -o $@ $^ $(LIBS)
sbcl.nm: $(TARGET)
- $(NM) $(TARGET) | $(GREP) -v " F \| U " > ,$@
+ $(NM) $(TARGET) | $(GREP) -v " [FUw] " > ,$@
mv -f ,$@ $@
sbcl.h: $(wildcard genesis/*.h)
echo '#include "genesis/config.h"' >sbcl.h
echo '#include "genesis/constants.h"' >>sbcl.h
+# || true because we don't want the build to break if etags isn't there.
+# ...but it's still nice to have it done by default.
TAGS tags: $(SRCS)
- etags $(SRCS)
+ etags $(SRCS) || true
clean:
-rm -f *.[do] $(TARGET) sbcl.nm sbcl.h core *.tmp $(OS_CLEAN_FILES)
- # the depend file is obsolete
- -rm -f depend
-
-# depend target for backward compatibility
-.PHONY: depend
-depend:
%.d: %.c sbcl.h
@$(CC) $(DEPEND_FLAGS) $(CPPFLAGS) $< > $@.tmp; \