87 lines
2.2 KiB
Makefile
87 lines
2.2 KiB
Makefile
# $NetBSD: Makefile.buildboot,v 1.1 2002/06/06 19:48:11 fredette Exp $
|
|
|
|
RELOC= 700000
|
|
HEAP_LIMIT=0x7c0000
|
|
#DEBUGFLAGS=-DDEBUG
|
|
#DEBUGFLAGS+=-DDEBUGBUG
|
|
#DEBUGFLAGS+=-DPDCDEBUG
|
|
#DEBUGFLAGS+=-DLIFDEBUG
|
|
#DEBUGFLAGS+=-DEXEC_DEBUG
|
|
#DEBUGFLAGS+=-DALLOC_TRACE
|
|
#DEBUGLIBS= no
|
|
|
|
S= ${.CURDIR}/../../../..
|
|
|
|
.PATH: ${.CURDIR}/../common
|
|
|
|
PROG= ${PROGAOUT}.lif
|
|
|
|
SRCS= ${PROGSOURCE} ${COMMONSOURCE} ${DRIVERSOURCE}
|
|
MKMAN= no
|
|
STRIPFLAG=
|
|
BINMODE= 444
|
|
|
|
CLEANFILES+= ${PROGAOUT} vers.c vers.o
|
|
|
|
CPPFLAGS+= -nostdinc -I${.CURDIR}/../../.. -I${.CURDIR}/../../../.. -I${.OBJDIR}
|
|
CFLAGS= -Os -msoft-float -Wno-main
|
|
CFLAGS+= -fno-builtin
|
|
CFLAGS+= -mdisable-fpregs -mfast-indirect-calls -mpa-risc-1-0
|
|
|
|
SRCS+= vers.c
|
|
CLEANFILES+= vers.c
|
|
|
|
.PHONY: vers.c
|
|
vers.c: ${.CURDIR}/version
|
|
sh ${S}/conf/newvers_stand.sh ${.CURDIR}/version hp700 ${NEWVERSWHAT}
|
|
|
|
${PROG}: ${PROGAOUT} ${MKBOOT_PROG}
|
|
-@cp ${PROGAOUT} ${PROGAOUT}.gdb
|
|
${STRIP} ${PROGAOUT}
|
|
${MKBOOT_PROG} -v ${PROGAOUT} ${ADDBOOT} ${PROG}
|
|
|
|
CPPFLAGS+= -D_STANDALONE -Dhp700 ${DEBUGFLAGS}
|
|
CPPFLAGS+= -DRELOC=0x${RELOC} -DHEAP_LIMIT=${HEAP_LIMIT}
|
|
CPPFLAGS+= -DNO_NET -D__INTERNAL_LIBSA_CREAD -DCOMPAT_UFS
|
|
|
|
COMMONSOURCE= cons.c ct.c dev_hppa.c dk.c itecons.c \
|
|
lf.c lif.c machdep.c pdc.c time.c
|
|
DRIVERSOURCE=
|
|
|
|
.ifnmake(print-objdir)
|
|
MKBOOTOBJDIR!= cd ${.CURDIR}/../mkboot ; ${MAKE} print-objdir
|
|
MKBOOT_PROG?= ${MKBOOTOBJDIR}/mkboot
|
|
.endif
|
|
|
|
# Make sure ${MKBOOT_PROG} is always available
|
|
${MKBOOTOBJDIR}/mkboot:
|
|
@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}
|
|
|
|
LDFLAGS+= -Bstatic -nostartfiles -nostdlib -N -Ttext $(RELOC)
|
|
LDFLAGS+= -T ${.CURDIR}/ld.script -Map ${PROGAOUT}.map
|
|
|
|
${PROGAOUT}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
|
|
${LD} ${LDFLAGS} -o ${PROGAOUT} \
|
|
${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
|
|
@${SIZE} ${PROGAOUT}
|
|
@echo ${PROGAOUT} total size should not exceed XXXX bytes
|