No empty .Rs/.Re
[netbsd-mini2440.git] / sys / arch / hp300 / stand / Makefile.buildboot
blobdbebbde3e2d095f159e9f3a3359fcc677a94e6d2
1 #       $NetBSD: Makefile.buildboot,v 1.28 2009/03/15 06:10:03 tsutsui Exp $
3 # RELOC=FFF00000 allows for boot prog up to FF000 (1044480) bytes long
4 RELOC=  FFF00000
6 S=              ${.CURDIR}/../../../..
8 .PATH: ${.CURDIR}/../common
10 PROG=           ${PROGAOUT}.lif
11 WARNS?=         1
13 SRCS=           ${COMMONSOURCE} ${DRIVERSOURCE} ${PROGSOURCE}
14 NOMAN=          # defined
15 STRIPFLAG=
16 BINMODE=        444
18 CLEANFILES+=    ${PROGAOUT} vers.c vers.o
20 CPPFLAGS+=      -I${.CURDIR}/../../.. -I${.CURDIR}/../../../..  -I${.OBJDIR}
21 CPPFLAGS+=      -Wno-main
22 CPPFLAGS+=      -D__daddr_t=int32_t
23 CFLAGS=         -Os -msoft-float -ffreestanding
25 SRCS+=          vers.c
26 CLEANFILES+=    vers.c
28 # XXX SHOULD NOT NEED TO DEFINE THESE!
29 LIBCRT0=
30 LIBC=
31 LIBCRTBEGIN=
32 LIBCRTEND=
34 .PHONY: vers.c
35 vers.c: ${.CURDIR}/version
36         ${HOST_SH} ${S}/conf/newvers_stand.sh \
37                 -DM ${.CURDIR}/version ${MACHINE} ${NEWVERSWHAT}
39 ${PROG}: ${PROGAOUT}
40         ${OBJCOPY} --output-target=binary ${PROGAOUT} ${PROGAOUT}.bin
41         ${TOOL_HP300MKBOOT} -l 0x${RELOC} ${PROGAOUT}.bin ${PROG}
42         rm -f ${PROGAOUT}.bin
44 CPPFLAGS+=              -DDCACONSOLE -DAPCICONSOLE -DITECONSOLE -DDCMCONSOLE
45 CPPFLAGS+=              -DHIL_KEYBOARD -DUK_KEYBOARD
46 CPPFLAGS+=              -DDOMAIN_KEYBOARD
47 CPPFLAGS+=              -D_STANDALONE -DCOMPAT_NOLABEL -Dhp300
48 CPPFLAGS+=              -DCOMPAT_UFS -DNO_LSEEK
50 # if sun bootparams is desired
51 #CPPFLAGS+=     -DSUN_BOOTPARAMS
53 # Limit the alloc() heap to below the msgbuf and ROM scratch pages.
54 CPPFLAGS+=              -DHEAP_LIMIT="0xffffdfff"
56 COMMONSOURCE=           srt0.S autoconf.c clock.c conf.c cons.c devopen.c \
57                         exec.c machdep.c prf.c rawfs.c netio.c
58 DRIVERSOURCE=           apci.c ct.c dca.c dcm.c dnkbd.c fhpib.c hil.c \
59                         hpib.c if_le.c ite.c ite_dv.c ite_gb.c ite_rb.c \
60                         ite_subr.c ite_tc.c ite_hy.c kbd.c kbdconf.c \
61                         nhpib.c rd.c scsi.c sd.c
63 .include <bsd.own.mk>
64 .include <bsd.klinks.mk>
65 .include <bsd.prog.mk>
67 ### find out what to use for libkern
68 KERN_AS=        library
69 .include "${S}/lib/libkern/Makefile.inc"
70 LIBKERN=        ${KERNLIB}
72 ### find out what to use for libz
73 Z_AS=           library
74 .include "${S}/lib/libz/Makefile.inc"
75 LIBZ=           ${ZLIB}
77 ### find out what to use for libsa
78 SA_AS=          library
79 SAMISCMAKEFLAGS+="SA_USE_CREAD=yes"
80 SAMISCMAKEFLAGS+="SA_USE_LOADFILE=yes"
81 .include "${S}/lib/libsa/Makefile.inc"
82 LIBSA=          ${SALIB}
84 ${PROGAOUT}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
85         ${LD} -N -Ttext ${RELOC} -e begin -o ${PROGAOUT} \
86             ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
87         @${SIZE} ${PROGAOUT}
88         @echo ${PROGAOUT} total size should not exceed 1044480 bytes