472a75b08f
both ELF aware.
82 lines
2.2 KiB
Makefile
82 lines
2.2 KiB
Makefile
# $NetBSD: Makefile.buildboot,v 1.13 2001/01/02 04:14:34 simonb Exp $
|
|
|
|
# RELOC=FFF00000 allows for boot prog up to FF000 (1044480) bytes long
|
|
RELOC= FFF00000
|
|
|
|
S= ${.CURDIR}/../../../..
|
|
|
|
.PATH: ${.CURDIR}/../common
|
|
|
|
PROG= ${PROGAOUT}.lif
|
|
|
|
SRCS= ${COMMONSOURCE} ${DRIVERSOURCE} ${PROGSOURCE}
|
|
MKMAN= no
|
|
STRIPFLAG=
|
|
BINMODE= 444
|
|
|
|
CLEANFILES+= ${PROGAOUT} vers.c vers.o
|
|
|
|
CPPFLAGS+= -I${.CURDIR}/../../.. -I${.CURDIR}/../../../.. -I${.OBJDIR}
|
|
CPPFLAGS+= -Wno-main
|
|
CFLAGS= -Os -msoft-float
|
|
|
|
SRCS+= vers.c
|
|
CLEANFILES+= vers.c
|
|
|
|
.PHONY: vers.c
|
|
vers.c: ${.CURDIR}/version
|
|
sh ${S}/conf/newvers_stand.sh ${.CURDIR}/version hp300 ${NEWVERSWHAT}
|
|
|
|
${PROG}: ${PROGAOUT} ${MKBOOT_PROG}
|
|
${MKBOOT_PROG} ${PROGAOUT} ${PROG}
|
|
|
|
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
|
|
|
|
.ifnmake(print-objdir)
|
|
MKBOOTOBJDIR!= cd ${.CURDIR}/../mkboot ; ${MAKE} print-objdir
|
|
MKBOOT_PROG= ${MKBOOTOBJDIR}/mkboot
|
|
.endif
|
|
|
|
# Make sure ${MKBOOT_PROG} is always available
|
|
${MKBOOT_PROG}:
|
|
@cd ${MKBOOTDIR} && ${MAKE} depend && ${MAKE}
|
|
|
|
.include <bsd.prog.mk>
|
|
|
|
### find out what to use for libkern
|
|
KERN_AS= library
|
|
.include "${S}/lib/libkern/Makefile.inc"
|
|
LIBKERN= ${KERNLIB}
|
|
|
|
### find out what to use for libz
|
|
Z_AS= library
|
|
.include "${S}/lib/libz/Makefile.inc"
|
|
LIBZ= ${ZLIB}
|
|
|
|
### find out what to use for libsa
|
|
SA_AS= library
|
|
SAMISCMAKEFLAGS+="SA_USE_CREAD=yes"
|
|
SAMISCMAKEFLAGS+="SA_USE_LOADFILE=yes"
|
|
.include "${S}/lib/libsa/Makefile.inc"
|
|
LIBSA= ${SALIB}
|
|
|
|
${PROGAOUT}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
|
|
${LD} -N -Ttext ${RELOC} -e begin -o ${PROGAOUT} \
|
|
${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
|
|
@size ${PROGAOUT}
|
|
@echo ${PROGAOUT} total size should not exceed 1044480 bytes
|