bf32c7a324f7a6be0a37aa165f149c83a3e88dfb
[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 CFLAGS =  -g -Wall -O3
18 ASFLAGS = $(CFLAGS)
19 DEPEND_FLAGS =
20 CPPFLAGS = -I.
21
22 # Some of these things might be Config-dependent in future versions,
23 # but they're the same on most systems right now.  If you need to
24 # override one of these, do it in Config
25 CPP = cpp
26 LD = ld
27 LINKFLAGS = -g
28 NM = nm -gp
29 DEPEND_FLAGS=-M
30
31 # The Config file is the preferred place for tweaking options which
32 # are appropriate for particular setups (OS, CPU, whatever). Make a
33 # Config-foo file for setup foo, then arrange for Config to be a
34 # symlink to Config-foo.
35 include Config
36
37
38 C_SRCS =alloc.c backtrace.c breakpoint.c coreparse.c \
39         dynbind.c globals.c interr.c interrupt.c \
40         monitor.c parse.c print.c purify.c \
41         regnames.c run-program.c runtime.c save.c search.c \
42         time.c util.c validate.c vars.c wrap.c 
43
44 SRCS=   $(C_SRCS) ${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
56 .PHONY: clean all
57 clean:
58         -rm -f depend *.o sbcl sbcl.nm core *.tmp
59
60
61 depend: ${C_SRCS} sbcl.h
62         $(CC) ${DEPEND_FLAGS} ${CFLAGS} ${CPPFLAGS}  ${C_SRCS} > depend.tmp
63         mv -f depend.tmp depend
64
65 # By including this file, we cause GNU to automatically make depend if
66 # it can't find it or it is out of date
67 include depend