1 # $NetBSD: Makefile,v 1.7 2000/07/09 13:47:34 jdolecek Exp $ 2 3 # 4 # sboot would like a newer GNU ld because it can generate S-Records. 5 # Until then, we convert. 6 # 7 8 S=${.CURDIR}/../../../.. 9 10 COMPILE.s= $(AS) $(ASFLAGS) -o $*.o 11 LDFLAGS=-x -N -Ttext 0x4000 -e start 12 MKMAN= no 13 SRCS= start.s clock.c console.c etherfun.c le_poll.c libc_sa.c \ 14 oc_cksum.s sboot.c 15 CLEANFILES+= srec sboot sboot.srec 16 17 BOOTS= sboot.srec 18 PROG=${BOOTS} 19 20 ${PROG}: ${OBJS} 21 ${MAKE} sboot 22 ${MAKE} srec 23 dd ibs=32 skip=1 if=sboot | ${.OBJDIR}/srec 4 0x4000 sboot > ${.TARGET} 24 25 sboot: ${OBJS} 26 ${LD} ${LDFLAGS} -o ${.TARGET} ${OBJS} 27 28 srec: ${.CURDIR}/srec.c 29 ${CC} ${CFLAGS} ${.CURDIR}/srec.c -o ${.TARGET} 30 31 install: 32 ${INSTALL} -c -m 444 -g bin -o bin sboot.srec \ 33 ${DESTDIR}${MDEC_DIR}/sboot 34 35 afterdepend: .depend 36 @(TMP=/tmp/_depend$$$$; \ 37 sed -e 's/^\([^\.]*\).o[ ]*:/\1.o g\1.o s\1.o:/' \ 38 < .depend > $$TMP; \ 39 mv $$TMP .depend) 40 41 .include <bsd.prog.mk> 42