Makefile revision 1.4
1#	$NetBSD: Makefile,v 1.4 1998/08/01 11:22:53 scw Exp $
2
3#
4# sboot would like a newer GNU ld because it can generate S-Records.
5# Until then, we convert.
6#
7
8COMPILE.s= $(AS) $(ASFLAGS) -o $*.o
9LDFLAGS=-x -N -Ttext 0x4000 -e start
10NOMAN=
11SRCS=	start.s clock.c console.c etherfun.c le_poll.c libc_sa.c \
12		oc_cksum.s sboot.c
13OBJS=	${SRCS:N*.h:R:S/$/.o/g}
14CLEANFILES+= srec sboot sboot.srec
15
16BOOTS=	sboot.srec
17
18all: ${BOOTS}
19
20sboot.srec: sboot srec
21	dd ibs=32 skip=1 if=sboot | ${.OBJDIR}/srec 4 0x4000 sboot > ${.TARGET}
22
23sboot: ${OBJS}
24	${LD} ${LDFLAGS} -o ${.TARGET} ${OBJS}
25
26srec: ${.CURDIR}/srec.c
27	${CC} ${CFLAGS} ${.CURDIR}/srec.c -o ${.TARGET}
28
29install:
30	${INSTALL} -c -m 444 -g bin -o bin sboot.srec \
31	    ${DESTDIR}${MDEC_DIR}/sboot
32
33.include <bsd.prog.mk>
34