Home | History | Annotate | Line # | Download | only in stand
Makefile.buildboot revision 1.41
      1  1.41   tsutsui #	$NetBSD: Makefile.buildboot,v 1.41 2025/05/26 12:25:12 tsutsui Exp $
      2  1.13    simonb 
      3  1.13    simonb # RELOC=FFF00000 allows for boot prog up to FF000 (1044480) bytes long
      4  1.13    simonb RELOC=	FFF00000
      5   1.1   thorpej 
      6   1.1   thorpej S=		${.CURDIR}/../../../..
      7   1.1   thorpej 
      8   1.1   thorpej .PATH: ${.CURDIR}/../common
      9   1.1   thorpej 
     10  1.39   tsutsui PROG=		${PROGELF}.lif
     11  1.24   tsutsui WARNS?=		1
     12   1.1   thorpej 
     13   1.1   thorpej SRCS=		${COMMONSOURCE} ${DRIVERSOURCE} ${PROGSOURCE}
     14  1.18        tv NOMAN=		# defined
     15   1.3   thorpej STRIPFLAG=
     16   1.1   thorpej BINMODE=	444
     17   1.1   thorpej 
     18  1.39   tsutsui CLEANFILES+=	${PROGELF}
     19   1.1   thorpej 
     20  1.10   frueauf CPPFLAGS+=	-I${.CURDIR}/../../.. -I${.CURDIR}/../../../..  -I${.OBJDIR}
     21  1.13    simonb CPPFLAGS+=	-Wno-main
     22  1.23   tsutsui CPPFLAGS+=	-D__daddr_t=int32_t
     23  1.37   tsutsui CFLAGS=		-Os -fno-unwind-tables -msoft-float -ffreestanding
     24   1.1   thorpej 
     25  1.21    simonb # XXX SHOULD NOT NEED TO DEFINE THESE!
     26  1.21    simonb LIBCRT0=
     27  1.33   tsutsui LIBCRTI=
     28  1.21    simonb LIBC=
     29  1.21    simonb LIBCRTBEGIN=
     30  1.21    simonb LIBCRTEND=
     31  1.12    simonb 
     32  1.38  christos .if ${MKREPRO_TIMESTAMP:Uno} != "no"
     33  1.38  christos HP300MKBOOT_TIMESTAMP=-t "${MKREPRO_TIMESTAMP}"
     34  1.38  christos .endif
     35  1.38  christos 
     36  1.39   tsutsui ${PROG}: ${PROGELF}
     37  1.39   tsutsui 	${OBJCOPY} --output-target=binary ${PROGELF} ${PROGELF}.bin
     38  1.39   tsutsui 	${TOOL_HP300MKBOOT} -l 0x${RELOC} ${HP300MKBOOT_TIMESTAMP} ${PROGELF}.bin ${PROG}
     39  1.39   tsutsui 	rm -f ${PROGELF}.bin
     40  1.13    simonb 
     41  1.36  christos .include "${S}/conf/newvers_stand.mk"
     42  1.36  christos 
     43  1.13    simonb CPPFLAGS+=		-DDCACONSOLE -DAPCICONSOLE -DITECONSOLE -DDCMCONSOLE
     44  1.13    simonb CPPFLAGS+=		-DHIL_KEYBOARD -DUK_KEYBOARD
     45  1.13    simonb CPPFLAGS+=		-DDOMAIN_KEYBOARD
     46  1.13    simonb CPPFLAGS+=		-D_STANDALONE -DCOMPAT_NOLABEL -Dhp300
     47  1.13    simonb CPPFLAGS+=		-DCOMPAT_UFS -DNO_LSEEK
     48  1.35   tsutsui CPPFLAGS+=		-DLIBSA_CREAD_NOCRC
     49  1.40   tsutsui CPPFLAGS+=		-DBBC_SLOW_GETSECS
     50  1.17  gmcgarry 
     51  1.17  gmcgarry # if sun bootparams is desired
     52  1.17  gmcgarry #CPPFLAGS+=     -DSUN_BOOTPARAMS
     53  1.13    simonb 
     54  1.13    simonb # Limit the alloc() heap to below the msgbuf and ROM scratch pages.
     55  1.13    simonb CPPFLAGS+=		-DHEAP_LIMIT="0xffffdfff"
     56  1.13    simonb 
     57  1.13    simonb COMMONSOURCE=		srt0.S autoconf.c clock.c conf.c cons.c devopen.c \
     58  1.19  gmcgarry 			exec.c machdep.c prf.c rawfs.c netio.c
     59  1.13    simonb DRIVERSOURCE=		apci.c ct.c dca.c dcm.c dnkbd.c fhpib.c hil.c \
     60  1.41   tsutsui 			hpib.c if_le.c ite.c ite_dv.c ite_gb.c \
     61  1.32   tsutsui 			ite_hy.c ite_rb.c ite_subr.c ite_tc.c ite_tvrx.c \
     62  1.34   tsutsui 			ite_sti.c \
     63  1.31   tsutsui 			kbd.c kbdconf.c nhpib.c rd.c scsi.c sd.c
     64  1.13    simonb 
     65  1.16        tv .include <bsd.own.mk>
     66  1.28   tsutsui .include <bsd.klinks.mk>
     67   1.1   thorpej .include <bsd.prog.mk>
     68   1.1   thorpej 
     69   1.7   thorpej ### find out what to use for libkern
     70   1.7   thorpej KERN_AS=	library
     71   1.7   thorpej .include "${S}/lib/libkern/Makefile.inc"
     72   1.7   thorpej LIBKERN=	${KERNLIB}
     73   1.7   thorpej 
     74   1.2   thorpej ### find out what to use for libz
     75   1.2   thorpej Z_AS=		library
     76   1.2   thorpej .include "${S}/lib/libz/Makefile.inc"
     77   1.2   thorpej LIBZ=		${ZLIB}
     78   1.2   thorpej 
     79   1.1   thorpej ### find out what to use for libsa
     80   1.1   thorpej SA_AS=		library
     81   1.8   thorpej SAMISCMAKEFLAGS+="SA_USE_CREAD=yes"
     82   1.8   thorpej SAMISCMAKEFLAGS+="SA_USE_LOADFILE=yes"
     83   1.1   thorpej .include "${S}/lib/libsa/Makefile.inc"
     84   1.1   thorpej LIBSA=		${SALIB}
     85   1.1   thorpej 
     86  1.39   tsutsui ${PROGELF}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
     87  1.39   tsutsui 	${LD} -N -Ttext ${RELOC} -e begin -o ${PROGELF} \
     88  1.12    simonb 	    ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
     89  1.39   tsutsui 	@${SIZE} ${PROGELF}
     90  1.39   tsutsui 	@echo ${PROGELF} total size should not exceed 1044480 bytes
     91