X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2FGNUmakefile;h=c3e0a8ffc57ec8abcbab1602cba70c30cf827d5e;hb=ae47ad0774edd8cb376772ae7e615428295f979e;hp=99c0719c8775c3926cf05c022c0489279b504eaf;hpb=cab2c71bb1bb8a575d9eebdae335e731daa64183;p=sbcl.git diff --git a/src/runtime/GNUmakefile b/src/runtime/GNUmakefile index 99c0719..c3e0a8f 100644 --- a/src/runtime/GNUmakefile +++ b/src/runtime/GNUmakefile @@ -16,7 +16,6 @@ all: sbcl sbcl.nm # Config file CFLAGS = -g -Wall -O3 ASFLAGS = $(CFLAGS) -DEPEND_FLAGS = CPPFLAGS = -I. # Some of these things might be Config-dependent in future versions, @@ -26,6 +25,7 @@ CPP = cpp LD = ld LINKFLAGS = -g NM = nm -gp +DEPEND_FLAGS=-M # The Config file is the preferred place for tweaking options which # are appropriate for particular setups (OS, CPU, whatever). Make a @@ -34,30 +34,39 @@ NM = nm -gp include Config -SRCS = alloc.c backtrace.c breakpoint.c coreparse.c \ - dynbind.c globals.c interr.c interrupt.c \ +C_SRCS = alloc.c backtrace.c breakpoint.c coreparse.c \ + dynbind.c gc-common.c globals.c interr.c interrupt.c \ monitor.c parse.c print.c purify.c \ regnames.c run-program.c runtime.c save.c search.c \ - time.c util.c validate.c vars.c wrap.c \ - ${ARCH_SRC} ${ASSEM_SRC} ${OS_SRC} ${GC_SRC} + thread.c time.c util.c validate.c vars.c wrap.c -OBJS = $(patsubst %.c,%.o,$(patsubst %.S,%.o,$(patsubst %.s,%.o,$(SRCS)))) +SRCS = $(C_SRCS) ${ARCH_SRC} ${ASSEM_SRC} ${OS_SRC} ${GC_SRC} + +OBJS = $(patsubst %.c,%.o,$(patsubst %.S,%.o,$(patsubst %.s,%.o,$(SRCS)))) ${OS_OBJS} sbcl.nm: sbcl $(NM) sbcl | grep -v " F \| U " > ,$@ mv -f ,$@ $@ sbcl: ${OBJS} - $(CC) ${LINKFLAGS} ${OS_LINK_FLAGS} -o $@ ${OBJS} ${OS_LIBS} -lm + $(CC) ${LINKFLAGS} ${OS_LINK_FLAGS} -o $@ ${OBJS} ${OS_OBJS} ${OS_LIBS} -lm + .PHONY: clean all clean: - rm -f depend *.o sbcl sbcl.nm core *.tmp ; true + -rm -f depend *.o sbcl sbcl.nm core *.tmp $(CLEAN_FILES) + +TAGS: $(SRCS) + etags $(SRCS) + +sbcl.h: genesis/*.h + echo '#include "genesis/config.h"' >sbcl.h + echo '#include "genesis/constants.h"' >>sbcl.h -depend: ${SRCS} sbcl.h - $(CC) -MM -E ${DEPEND_FLAGS} ${CFLAGS} ${CPPFLAGS} $^ > depend.tmp +depend: ${C_SRCS} sbcl.h + $(CC) ${DEPEND_FLAGS} ${CFLAGS} ${CPPFLAGS} ${C_SRCS} > depend.tmp mv -f depend.tmp depend -# By including this file, we cause GNU to automatically make depend if -# it can't find it or it is out of date +# By including this file, we cause GNU make to automatically "make depend" +# if it can't find it or it is out of date. include depend