0.6.12.3:
[sbcl.git] / src / runtime / GNUmakefile
1 # makefile for the C-level run-time support for SBCL
2
3 # This software is part of the SBCL system. See the README file for
4 # more information.
5 #
6 # This software is derived from the CMU CL system, which was
7 # written at Carnegie Mellon University and released into the
8 # public domain. The software is in the public domain and is
9 # provided with absolutely no warranty. See the COPYING and CREDITS
10 # files for more information.
11
12 all: sbcl sbcl.nm
13 .PHONY: all
14
15 # defaults which might be overridden or modified by values in the
16 # Config file
17 #
18
19 CFLAGS =  -g -Wall -O3
20 ASFLAGS = $(CFLAGS)
21 DEPEND_FLAGS =
22 CPPFLAGS = -I.
23
24 # Some of these things might be Config-dependent in future versions,
25 # but they're the same on most systems right now.  If you need to
26 # override one of these, do it in Config
27 CPP = cpp
28 LD = ld
29 LINKFLAGS = -g
30 NM = nm -gp
31
32 # The Config file is the preferred place for tweaking options which
33 # are appropriate for particular setups (OS, CPU, whatever). Make a
34 # Config-foo file for setup foo, then arrange for Config to be a
35 # symlink to Config-foo.
36 include Config
37
38
39 SRCS =  alloc.c backtrace.c breakpoint.c coreparse.c \
40         dynbind.c globals.c interr.c interrupt.c \
41         monitor.c parse.c print.c purify.c \
42         regnames.c run-program.c runtime.c save.c search.c \
43         time.c util.c validate.c vars.c wrap.c \
44         ${ARCH_SRC} ${ASSEM_SRC} ${OS_SRC} ${GC_SRC}
45
46 OBJS = $(patsubst %.c,%.o,$(patsubst %.S,%.o,$(patsubst %.s,%.o,$(SRCS))))
47
48 sbcl.nm: sbcl
49         $(NM) sbcl | grep -v " F \| U " > ,$@
50         mv -f ,$@ $@
51
52 sbcl: ${OBJS} 
53         $(CC) ${LINKFLAGS} ${OS_LINK_FLAGS} -o $@ ${OBJS} ${OS_LIBS} -lm
54
55 undefineds.o: undefineds.h  undefineds.c
56
57 .PHONY: clean all
58 clean:
59         rm -f depend *.o sbcl sbcl.nm core *.tmp ; true
60
61 depend: ${SRCS} sbcl.h
62         $(CC) -MM -E ${DEPEND_FLAGS} ${CFLAGS} ${CPPFLAGS} $? > depend.tmp
63         mv -f depend.tmp depend