1 # $NetBSD: Makefile,v 1.16 2009/01/12 07:56:31 tsutsui Exp $
8 VERSIONFILE
= ${.CURDIR
}/version
9 VERSION
!= ${TOOL_AWK} -F
: '$$1 ~ /^[0-9.]*$$/ { it = $$1; } \
10 END { print it }' ${VERSIONFILE}
11 NEWVERSWHAT
= "${BOOT}"
21 BFDNAME
= a.out-m68k-netbsd
22 STRIP?
= /usr
/bin
/strip
23 OBJCOPY?
= /usr
/bin
/objcopy
25 SRCS
= srt0.S boot.c conf.c exec_image.S
26 S
= ${.CURDIR
}/..
/..
/..
/..
28 COMMONDIR
= $M/stand
/common
33 vers.c
: ${VERSIONFILE}
35 ${HOST_SH} ${S}/conf
/newvers_stand.sh
${.ALLSRC
} ${MACHINE} ${NEWVERSWHAT}
37 CPPFLAGS
+= -nostdinc
-I
$S -I
${.OBJDIR
} -I
$M/stand
/libsa
38 CPPFLAGS
+= -I
$M/stand
/libiocs
-I
${COMMONDIR}
39 CPPFLAGS
+= -D_STANDALONE
-DHEAP_VARIABLE
40 CPPFLAGS
+= -DTEXTADDR
="0x${TEXT}"
41 CPPFLAGS
+= -DBOOT
=\"${BOOT}\" -DBOOT_VERS
=\"${VERSION}\"
42 CFLAGS
= -Wno-main
-Os
-m68020-60
43 .if
${OBJECT_FMT} == "ELF"
44 LINKFLAGS
= -N
-static
-T
${.CURDIR
}/boot.ldscript
46 LINKFLAGS
= -N
-static
-Ttext
${TEXT}
48 LIBIOCS
!= cd
$M/stand
/libiocs
&& ${PRINTOBJDIR}
49 LIBSA
!= cd
$M/stand
/libsa
&& ${PRINTOBJDIR}
50 LDLIBS
= -L
${LIBSA} -lsa
-L
${LIBIOCS} -liocs
52 .
include "../Makefile.booters"
55 ${PROG}: ${OBJS} ${LIBSA}/libsa.a
${LIBIOCS}/libiocs.a
57 ${LD} ${LINKFLAGS} -o
${PROG}.sym
${OBJS} ${LDLIBS}
58 ${STRIP} -F
${BFDNAME} -o
${PROG} ${PROG}.sym
60 CLEANFILES
+= ${PROG}.sym
62 .
include <bsd.prog.mk
>