2001-11-14 03:58:48 +03:00
|
|
|
# $NetBSD: Makefile.buildboot,v 1.16 2001/11/14 00:58:49 tv Exp $
|
2001-01-02 07:14:33 +03:00
|
|
|
|
|
|
|
# RELOC=FFF00000 allows for boot prog up to FF000 (1044480) bytes long
|
|
|
|
RELOC= FFF00000
|
1997-02-04 06:51:37 +03:00
|
|
|
|
|
|
|
S= ${.CURDIR}/../../../..
|
|
|
|
|
|
|
|
.PATH: ${.CURDIR}/../common
|
|
|
|
|
|
|
|
PROG= ${PROGAOUT}.lif
|
|
|
|
|
|
|
|
SRCS= ${COMMONSOURCE} ${DRIVERSOURCE} ${PROGSOURCE}
|
1999-02-13 05:54:17 +03:00
|
|
|
MKMAN= no
|
1997-04-17 11:27:46 +04:00
|
|
|
STRIPFLAG=
|
1997-02-04 06:51:37 +03:00
|
|
|
BINMODE= 444
|
|
|
|
|
|
|
|
CLEANFILES+= ${PROGAOUT} vers.c vers.o
|
|
|
|
|
1999-12-22 00:06:26 +03:00
|
|
|
CPPFLAGS+= -I${.CURDIR}/../../.. -I${.CURDIR}/../../../.. -I${.OBJDIR}
|
2001-01-02 07:14:33 +03:00
|
|
|
CPPFLAGS+= -Wno-main
|
1999-12-15 00:38:31 +03:00
|
|
|
CFLAGS= -Os -msoft-float
|
1997-02-04 06:51:37 +03:00
|
|
|
|
2000-12-16 07:20:24 +03:00
|
|
|
SRCS+= vers.c
|
|
|
|
CLEANFILES+= vers.c
|
|
|
|
|
|
|
|
.PHONY: vers.c
|
|
|
|
vers.c: ${.CURDIR}/version
|
|
|
|
sh ${S}/conf/newvers_stand.sh ${.CURDIR}/version hp300 ${NEWVERSWHAT}
|
|
|
|
|
1997-02-04 06:51:37 +03:00
|
|
|
${PROG}: ${PROGAOUT} ${MKBOOT_PROG}
|
2001-05-27 09:35:11 +04:00
|
|
|
${OBJCOPY} --output-target=binary ${PROGAOUT} ${PROGAOUT}.bin
|
|
|
|
${MKBOOT_PROG} -l 0x${RELOC} ${PROGAOUT}.bin ${PROG}
|
|
|
|
rm -f ${PROGAOUT}.bin
|
1997-02-04 06:51:37 +03:00
|
|
|
|
2001-01-02 07:14:33 +03:00
|
|
|
CPPFLAGS+= -DDCACONSOLE -DAPCICONSOLE -DITECONSOLE -DDCMCONSOLE
|
|
|
|
CPPFLAGS+= -DHIL_KEYBOARD -DUK_KEYBOARD
|
|
|
|
CPPFLAGS+= -DDOMAIN_KEYBOARD
|
|
|
|
CPPFLAGS+= -D_STANDALONE -DCOMPAT_NOLABEL -Dhp300
|
|
|
|
CPPFLAGS+= -DCOMPAT_UFS -DNO_LSEEK
|
|
|
|
|
|
|
|
# Limit the alloc() heap to below the msgbuf and ROM scratch pages.
|
|
|
|
CPPFLAGS+= -DHEAP_LIMIT="0xffffdfff"
|
|
|
|
|
|
|
|
COMMONSOURCE= srt0.S autoconf.c clock.c conf.c cons.c devopen.c \
|
|
|
|
machdep.c prf.c rawfs.c netio.c
|
|
|
|
DRIVERSOURCE= apci.c ct.c dca.c dcm.c dnkbd.c fhpib.c hil.c \
|
|
|
|
hpib.c if_le.c ite.c ite_dv.c ite_gb.c ite_rb.c \
|
|
|
|
ite_subr.c ite_tc.c ite_hy.c kbd.c kbdconf.c \
|
|
|
|
nhpib.c rd.c scsi.c sd.c
|
|
|
|
|
2001-11-14 03:58:48 +03:00
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
|
|
|
MKBOOTOBJDIR!= cd ${.CURDIR}/../mkboot && ${PRINTOBJDIR}
|
2001-01-02 07:14:33 +03:00
|
|
|
MKBOOT_PROG= ${MKBOOTOBJDIR}/mkboot
|
|
|
|
|
|
|
|
# Make sure ${MKBOOT_PROG} is always available
|
|
|
|
${MKBOOT_PROG}:
|
|
|
|
@cd ${MKBOOTDIR} && ${MAKE} depend && ${MAKE}
|
|
|
|
|
1997-02-04 06:51:37 +03:00
|
|
|
.include <bsd.prog.mk>
|
|
|
|
|
1999-11-14 00:17:56 +03:00
|
|
|
### find out what to use for libkern
|
|
|
|
KERN_AS= library
|
|
|
|
.include "${S}/lib/libkern/Makefile.inc"
|
|
|
|
LIBKERN= ${KERNLIB}
|
|
|
|
|
1997-02-04 22:28:50 +03:00
|
|
|
### find out what to use for libz
|
|
|
|
Z_AS= library
|
|
|
|
.include "${S}/lib/libz/Makefile.inc"
|
|
|
|
LIBZ= ${ZLIB}
|
|
|
|
|
1997-02-04 06:51:37 +03:00
|
|
|
### find out what to use for libsa
|
|
|
|
SA_AS= library
|
1999-12-14 23:54:04 +03:00
|
|
|
SAMISCMAKEFLAGS+="SA_USE_CREAD=yes"
|
|
|
|
SAMISCMAKEFLAGS+="SA_USE_LOADFILE=yes"
|
1997-02-04 06:51:37 +03:00
|
|
|
.include "${S}/lib/libsa/Makefile.inc"
|
|
|
|
LIBSA= ${SALIB}
|
|
|
|
|
1999-11-14 00:17:56 +03:00
|
|
|
${PROGAOUT}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
|
2000-12-16 07:20:24 +03:00
|
|
|
${LD} -N -Ttext ${RELOC} -e begin -o ${PROGAOUT} \
|
|
|
|
${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
|
2001-05-13 03:55:07 +04:00
|
|
|
@${SIZE} ${PROGAOUT}
|
1997-02-04 06:51:37 +03:00
|
|
|
@echo ${PROGAOUT} total size should not exceed 1044480 bytes
|