Skip to content
Snippets Groups Projects
GNUmakefile 1.35 KiB
Newer Older
pw's avatar
pw committed
# $Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/lisp/GNUmakefile,v 1.13 1997/06/07 15:25:37 pw Exp $
wlott's avatar
wlott committed

all: lisp.nm

CC = gcc
ram's avatar
ram committed

wlott's avatar
wlott committed

include Config

ram's avatar
ram committed
ifndef GC_SRC
GC_SRC = gc.c
endif

SRCS = lisp.c coreparse.c alloc.c monitor.c print.c interr.c \
ram's avatar
ram committed
	vars.c parse.c interrupt.c search.c validate.c globals.c \
wlott's avatar
wlott committed
	dynbind.c breakpoint.c regnames.c backtrace.c save.c purify.c \
pw's avatar
pw committed
	socket.c runprog.c time.c \
ram's avatar
ram committed
	${ARCH_SRC} ${ASSEM_SRC} ${OS_SRC} ${GC_SRC}
OBJS = $(patsubst %.c,%.o,$(patsubst %.S,%.o,$(patsubst %.s,%.o,$(SRCS))))
wlott's avatar
wlott committed

### Don't look in RCS for the files, because we might not want the latest.
%: RCS/%,v

lisp.nm: lisp
	echo 'Map file for lisp version ' `cat version` > ,lisp.nm
ram's avatar
ram committed
	$(NM) lisp | grep -v " F \| U " >> ,lisp.nm
wlott's avatar
wlott committed
	mv ,lisp.nm lisp.nm

lisp: version.c ${OBJS} version
	echo '1 + ' `cat version` | bc > ,version
wlott's avatar
wlott committed
	mv ,version version
	$(CC) ${CFLAGS} -DVERSION=`cat version` -c $<
	$(CC) -g ${OS_LINK_FLAGS} -o ,lisp \
wlott's avatar
wlott committed
		${OBJS} version.o \
		${OS_LIBS} -lm
	mv -f ,lisp lisp

version:
	echo 0 > version

### Socket.c needs to be compiled with UNIXCONN defined.
socket.o: socket.c
	$(COMPILE.c) -DUNIXCONN $<
wlott's avatar
wlott committed

internals.h:
	@echo "You must run genesis to create internals.h!"
	@false

clean:
	rm -f Depends *.o lisp lisp.nm core
wlott's avatar
wlott committed

	$(CC) -MM -E ${DEPEND_FLAGS} ${CFLAGS} ${CPPFLAGS} $? > ,depends
wlott's avatar
wlott committed
	mv ,depends Depends

include Depends