77 lines
1.8 KiB
Makefile
77 lines
1.8 KiB
Makefile
# $NetBSD: Makefile.buildboot,v 1.1 2014/02/24 07:23:43 skrll Exp $
|
|
|
|
RELOC= 120000
|
|
HEAP_LIMIT=0x1c0000
|
|
#DEBUGFLAGS=-DDEBUG
|
|
#DEBUGFLAGS+=-DDEBUGBUG
|
|
#DEBUGFLAGS+=-DPDCDEBUG
|
|
#DEBUGFLAGS+=-DLIFDEBUG
|
|
#DEBUGFLAGS+=-DEXEC_DEBUG
|
|
#DEBUGFLAGS+=-DALLOC_TRACE
|
|
#DEBUGLIBS= no
|
|
|
|
LIBCRT0= # nothing
|
|
LIBCRTI= # nothing
|
|
LIBCRTBEGIN= # nothing
|
|
LIBCRTEND= # nothing
|
|
LIBC= # nothing
|
|
|
|
S= ${.CURDIR}/../../../..
|
|
|
|
.PATH: ${.CURDIR}/../common
|
|
|
|
SRCS= ${PROGSOURCE} ${COMMONSOURCE} ${DRIVERSOURCE}
|
|
NOMAN=
|
|
STRIPFLAG=
|
|
BINMODE= 444
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
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 ${${MKREPRO} == "yes" :?:-D} \
|
|
${.CURDIR}/version hppa ${NEWVERSWHAT}
|
|
|
|
CPPFLAGS+= -D_STANDALONE -Dhppa ${DEBUGFLAGS}
|
|
CPPFLAGS+= -DRELOC=0x${RELOC} -DHEAP_LIMIT=${HEAP_LIMIT}
|
|
CPPFLAGS+= -DNO_NET
|
|
|
|
COMMONSOURCE= cons.c dev_hppa.c dk.c itecons.c \
|
|
machdep.c milli_tiny.S 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_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>
|
|
.include <bsd.klinks.mk>
|