X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2FGNUmakefile;h=c3e0a8ffc57ec8abcbab1602cba70c30cf827d5e;hb=ae47ad0774edd8cb376772ae7e615428295f979e;hp=91f08163dff498930aa3cfa4d4cdd1bbc70c1b6b;hpb=a18f0a95bc9a457e4d2d00c702b746f29c2662b1;p=sbcl.git diff --git a/src/runtime/GNUmakefile b/src/runtime/GNUmakefile index 91f0816..c3e0a8f 100644 --- a/src/runtime/GNUmakefile +++ b/src/runtime/GNUmakefile @@ -14,52 +14,59 @@ all: sbcl sbcl.nm # defaults which might be overridden or modified by values in the # Config file -# -# FIXME: The -fno-strength-reduce flag comes from before the fork -# from CMU CL. It's presumably to work around some optimizer bug in gcc, -# but the fork was a long time ago, and the optimizer could easily -# have been fixed since then. Try doing without it. -# CFLAGS = -g -Wall -O2 -fno-strength-reduce -DGENCGC -CFLAGS = -g -Wall -O3 -DGENCGC -ASFLAGS = -g -DGENCGC -DEPEND_FLAGS = +CFLAGS = -g -Wall -O3 +ASFLAGS = $(CFLAGS) CPPFLAGS = -I. +# Some of these things might be Config-dependent in future versions, +# but they're the same on most systems right now. If you need to +# override one of these, do it in Config +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 # Config-foo file for setup foo, then arrange for Config to be a # symlink to Config-foo. include Config -# Some of these things might be Config-dependent in future versions, -# but they're not right now, i.e., they happen to be the same for -# all supported systems. -CPP = cpp -GC_SRC = gencgc.c -LD = ld -LINKFLAGS = -g -NM = nm -gp -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 + +SRCS = $(C_SRCS) ${ARCH_SRC} ${ASSEM_SRC} ${OS_SRC} ${GC_SRC} -OBJS = $(patsubst %.c,%.o,$(patsubst %.S,%.o,$(patsubst %.s,%.o,$(SRCS)))) +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) -depend: ${SRCS} sbcl.h - $(CC) -MM -E ${DEPEND_FLAGS} ${CFLAGS} ${CPPFLAGS} $? > depend.tmp +sbcl.h: genesis/*.h + echo '#include "genesis/config.h"' >sbcl.h + echo '#include "genesis/constants.h"' >>sbcl.h + +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 make to automatically "make depend" +# if it can't find it or it is out of date. +include depend