X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2FGNUmakefile;h=8545e9e57da2b3fedb3a43309f3a5291c54b85ab;hb=e365f2f7a9c66d307b48fee70778f4eaa84bdcc0;hp=9f96cd5516a8f8cceefd5b7440149b1d460c8887;hpb=d4aacd80215d0376af6f866a922854f83797ff59;p=sbcl.git diff --git a/src/runtime/GNUmakefile b/src/runtime/GNUmakefile index 9f96cd5..8545e9e 100644 --- a/src/runtime/GNUmakefile +++ b/src/runtime/GNUmakefile @@ -12,22 +12,36 @@ all: sbcl sbcl.nm .PHONY: all -# defaults which might be overridden by values in the Config file -CC = gcc +# defaults which might be overridden or modified by values in the +# Config file +CFLAGS = -g -Wall -O3 +ASFLAGS = $(CFLAGS) DEPEND_FLAGS = +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 set Config to be a symlink -# to Config-foo. +# 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 -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 validate.c vars.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)))) @@ -38,10 +52,22 @@ sbcl.nm: sbcl sbcl: ${OBJS} $(CC) ${LINKFLAGS} ${OS_LINK_FLAGS} -o $@ ${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 -depend: ${SRCS} sbcl.h - $(CC) -MM -E ${DEPEND_FLAGS} ${CFLAGS} ${CPPFLAGS} $? > depend.tmp +TAGS: $(SRCS) + etags $(SRCS) + +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