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
6 S= ${.CURDIR}/../../../..
8 .PATH: ${.CURDIR}/../common
13 SRCS= ${COMMONSOURCE} ${DRIVERSOURCE} ${PROGSOURCE}
18 CLEANFILES+= ${PROGAOUT} vers.c vers.o
20 CPPFLAGS+= -I${.CURDIR}/../../.. -I${.CURDIR}/../../../.. -I${.OBJDIR}
22 CPPFLAGS+= -D__daddr_t=int32_t
23 CFLAGS= -Os -msoft-float -ffreestanding
28 # XXX SHOULD NOT NEED TO DEFINE THESE!
35 vers.c: ${.CURDIR}/version
36 ${HOST_SH} ${S}/conf/newvers_stand.sh \
37 -DM ${.CURDIR}/version ${MACHINE} ${NEWVERSWHAT}
40 ${OBJCOPY} --output-target=binary ${PROGAOUT} ${PROGAOUT}.bin
41 ${TOOL_HP300MKBOOT} -l 0x${RELOC} ${PROGAOUT}.bin ${PROG}
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
64 .include <bsd.klinks.mk>
65 .include <bsd.prog.mk>
67 ### find out what to use for libkern
69 .include "${S}/lib/libkern/Makefile.inc"
72 ### find out what to use for libz
74 .include "${S}/lib/libz/Makefile.inc"
77 ### find out what to use for libsa
79 SAMISCMAKEFLAGS+="SA_USE_CREAD=yes"
80 SAMISCMAKEFLAGS+="SA_USE_LOADFILE=yes"
81 .include "${S}/lib/libsa/Makefile.inc"
84 ${PROGAOUT}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
85 ${LD} -N -Ttext ${RELOC} -e begin -o ${PROGAOUT} \
86 ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
88 @echo ${PROGAOUT} total size should not exceed 1044480 bytes