NetBSD/sys/arch/hp700/stand/Makefile.buildboot

72 lines
1.8 KiB
Makefile

# $NetBSD: Makefile.buildboot,v 1.2 2002/11/28 06:00:28 chs Exp $
MACHINE_ARCH=hppa
MACHINE=hp700
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
SRCS= ${PROGSOURCE} ${COMMONSOURCE} ${DRIVERSOURCE}
NOMAN=
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}
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=
### 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 ${PROG}.map
${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
${LD} ${LDFLAGS} -o ${PROG} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
@${SIZE} ${PROG}
@echo ${PROG} total size should not exceed XXXX bytes
.include <bsd.prog.mk>