84 lines
2.0 KiB
Makefile
84 lines
2.0 KiB
Makefile
# $NetBSD: Makefile.buildboot,v 1.10 2006/06/28 02:20:44 lukem Exp $
|
|
|
|
RELOC= 120000
|
|
HEAP_LIMIT=0x1c0000
|
|
#DEBUGFLAGS=-DDEBUG
|
|
#DEBUGFLAGS+=-DDEBUGBUG
|
|
#DEBUGFLAGS+=-DPDCDEBUG
|
|
#DEBUGFLAGS+=-DLIFDEBUG
|
|
#DEBUGFLAGS+=-DEXEC_DEBUG
|
|
#DEBUGFLAGS+=-DALLOC_TRACE
|
|
#DEBUGLIBS= no
|
|
|
|
LIBCRT0= # nothing
|
|
LIBCRTBEGIN= # nothing
|
|
LIBCRTEND= # nothing
|
|
LIBC= # nothing
|
|
|
|
S= ${.CURDIR}/../../../..
|
|
|
|
.PATH: ${.CURDIR}/../common
|
|
|
|
SRCS= ${PROGSOURCE} ${COMMONSOURCE} ${DRIVERSOURCE}
|
|
NOMAN=
|
|
STRIPFLAG=
|
|
BINMODE= 444
|
|
|
|
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
|
|
|
|
vers.c: ${.CURDIR}/version
|
|
${HOST_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+= -static -nostdlib -Wl,-N -Wl,-Ttext,$(RELOC)
|
|
LDFLAGS+= -Wl,-T,${.CURDIR}/ld.script -Wl,-Map,${PROG}.map
|
|
|
|
${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
|
|
${CC} ${LDFLAGS} -o ${PROG} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
|
|
@${SIZE} ${PROG}
|
|
@echo ${PROG} total size should not exceed XXXX bytes
|
|
|
|
.include <bsd.prog.mk>
|
|
|
|
.if !make(obj) && !make(clean) && !make(cleandir)
|
|
.BEGIN:
|
|
@([ -h machine ] || ln -s $S/arch/hp700/include machine)
|
|
@([ -h hppa ] || ln -s $S/arch/hppa/include hppa)
|
|
|
|
.NOPATH: machine hppa
|
|
.endif
|
|
|
|
CLEANFILES+=machine hppa
|