integrated Raymond Wiker's patches to port RUN-PROGRAM from CMU CL and
[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 by values in the Config file
16 CC = gcc
17 DEPEND_FLAGS =
18
19 # The Config file is the preferred place for tweaking options which
20 # are appropriate for particular setups (OS, CPU, whatever). Make
21 # a Config-foo file for setup foo, then set Config to be a symlink
22 # to Config-foo.
23 include Config
24
25 SRCS =  alloc.c backtrace.c breakpoint.c coreparse.c \
26         dynbind.c globals.c interr.c interrupt.c \
27         monitor.c parse.c print.c purify.c \
28         regnames.c runprog.c runtime.c save.c search.c \
29         time.c validate.c vars.c \
30         ${ARCH_SRC} ${ASSEM_SRC} ${OS_SRC} ${GC_SRC}
31
32 OBJS = $(patsubst %.c,%.o,$(patsubst %.S,%.o,$(patsubst %.s,%.o,$(SRCS))))
33
34 sbcl.nm: sbcl
35         $(NM) sbcl | grep -v " F \| U " > ,$@
36         mv -f ,$@ $@
37
38 sbcl: ${OBJS} 
39         $(CC) ${LINKFLAGS} ${OS_LINK_FLAGS} -o $@ ${OBJS} ${OS_LIBS} -lm
40
41 .PHONY: clean all
42 clean:
43         rm -f depend *.o sbcl sbcl.nm core *.tmp ; true
44
45 depend: ${SRCS} sbcl.h
46         $(CC) -MM -E ${DEPEND_FLAGS} ${CFLAGS} ${CPPFLAGS} $? > depend.tmp
47         mv -f depend.tmp depend