NetBSD/sys/arch/i386/bioscall/Makefile

55 lines
1.2 KiB
Makefile
Raw Normal View History

2000-01-19 19:29:54 +03:00
# $NetBSD: Makefile,v 1.9 2000/01/19 16:29:57 tsutsui Exp $
1996-09-09 22:07:40 +04:00
CPPFLAGS= ${APMCPPFLAGS}
KSRC=${.CURDIR}/../../..
ARCHSRC=${.CURDIR}/../..
I386=${KSRC}/arch/i386
CFLAGS+= -I${ARCHSRC} -I${KSRC} -D_LKM
1996-09-09 22:07:40 +04:00
SRCS= biostramp.S
OBJS= biostramp.o
DEPS= ${APMDEPS}
2000-01-19 19:29:54 +03:00
STRIPPROG?= strip
all: biostramp.inc
1999-09-05 02:25:51 +04:00
biostramp.inc: biostramp.bin Makefile
-mv -f biostramp.inc biostramp.inc.bak
1999-09-05 02:25:51 +04:00
sh ${.CURDIR}/bin2asm.sh biostramp.bin > biostramp.inc
.include <bsd.own.mk>
.if ${OBJECT_FMT} == "ELF"
biostramp.bin: biostramp.obj
objcopy --output-target=binary $? $@
.else
biostramp.bin: biostramp.obj
cp $? $@
2000-01-19 19:29:54 +03:00
@${STRIPPROG} $@
1999-09-05 02:25:51 +04:00
@sh ${.CURDIR}/rmaouthdr $@ $@.tmp
@if [ `ls -l $@.tmp |awk '{print $$5}'` -gt 4096 ]; then \
echo "$@ too big"; \
exit 1; \
fi
1999-09-05 02:25:51 +04:00
@mv -f $@.tmp $@
.endif
biostramp.obj: ${OBJS} ${DEPS}
${LD} -Bstatic -N -Ttext 0 -o $@ $(OBJS)
assym.h: ${KSRC}/kern/genassym.sh genassym.cf
sh ${KSRC}/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
< genassym.cf > assym.h.tmp && \
mv -f assym.h.tmp assym.h
biostramp.S: assym.h
biostramp.o: biostramp.S
${CC} ${CFLAGS} -DASM -D_LOCORE -c biostramp.S
clean:
1999-09-05 02:25:51 +04:00
rm -f *.o biostramp.bin biostramp.sym biostramp.inc assym.h
1996-09-09 22:07:40 +04:00
.include <bsd.dep.mk>
.include <bsd.subdir.mk>
#.include <bsd.prog.mk>