1 # $NetBSD: Makefile,v 1.17 2006/06/06 15:41:50 christos Exp $
3 CPPFLAGS
= ${APMCPPFLAGS}
4 KSRC
=${.CURDIR
}/..
/..
/..
5 ARCHSRC
=${.CURDIR
}/..
/..
8 CPPFLAGS
+=-I
${ARCHSRC} -I
${KSRC} -I
${.CURDIR
} -I
${.OBJDIR
} -D_LKM
-D_KERNEL
14 TRAMP
= ${.CURDIR
}/biostramp.inc
18 ${TRAMP}: biostramp.bin Makefile
19 @
([ -f
${TRAMP} ] && mv
-f
${TRAMP} ${TRAMP}.bak
; exit
0)
20 ${HOST_SH} ${.CURDIR
}/bin2asm.sh biostramp.bin
> ${.TARGET
}
23 @
rm -f machine
&& ln
-s
${I386}/include machine
26 @
rm -f x86
&& ln
-s
${X86}/include x86
30 .if
${OBJECT_FMT} == "ELF"
31 biostramp.bin
: biostramp.obj
32 ${OBJCOPY} --output-target
=binary
$?
$@
34 biostramp.bin
: biostramp.obj
37 @
${HOST_SH} ${.CURDIR
}/rmaouthdr
$@
$@.tmp
38 @if
[ `ls -l $@.tmp | ${TOOL_AWK} '{print $$5}'` -gt
4096 ]; then \
45 biostramp.obj
: ${OBJS} ${DEPS}
46 ${LD} -Bstatic
-N
-Ttext
0 -e do_bios_call
-o
$@
$(OBJS
)
48 assym.h
: machine x86 genassym.cf
49 ${TOOL_GENASSYM} -- ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
50 < ${.CURDIR
}/genassym.cf
> assym.h.tmp
&& \
51 mv
-f assym.h.tmp assym.h
55 biostramp.o
: biostramp.S
56 ${CC} ${CPPFLAGS} -DASM
-D_LOCORE
-c
${.IMPSRC
}
59 rm -f
*.o biostramp.obj biostramp.bin biostramp.sym
${TRAMP} \
60 assym.h
${TRAMP}.bak machine
63 .
include <bsd.subdir.mk
>