1 # $NetBSD: Makefile,v 1.6 2000/06/25 16:39:07 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 8 COMPILE.s= $(AS) $(ASFLAGS) -o $*.o 9 LDFLAGS=-x -N -Ttext 0x4000 -e start 10 MKMAN= no 11 SRCS= start.s clock.c console.c etherfun.c le_poll.c libc_sa.c \ 12 oc_cksum.s sboot.c 13 OBJS= ${SRCS:N*.h:R:S/$/.o/g} 14 CLEANFILES+= srec sboot sboot.srec 15 16 BOOTS= sboot.srec 17 18 realall: ${BOOTS} 19 20 sboot.srec: sboot srec 21 dd ibs=32 skip=1 if=sboot | ${.OBJDIR}/srec 4 0x4000 sboot > ${.TARGET} 22 23 sboot: ${OBJS} 24 ${LD} ${LDFLAGS} -o ${.TARGET} ${OBJS} 25 26 srec: ${.CURDIR}/srec.c 27 ${CC} ${CFLAGS} ${.CURDIR}/srec.c -o ${.TARGET} 28 29 install: 30 ${INSTALL} -c -m 444 -g bin -o bin sboot.srec \ 31 ${DESTDIR}${MDEC_DIR}/sboot 32 33 afterdepend: .depend 34 @(TMP=/tmp/_depend$$$$; \ 35 sed -e 's/^\([^\.]*\).o[ ]*:/\1.o g\1.o s\1.o:/' \ 36 < .depend > $$TMP; \ 37 mv $$TMP .depend) 38 39 .include <bsd.prog.mk> 40