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