1 # $NetBSD: Makefile.buildboot,v 1.12 2008/06/12 14:08:29 skrll Exp $
6 #DEBUGFLAGS+=-DDEBUGBUG
7 #DEBUGFLAGS+=-DPDCDEBUG
8 #DEBUGFLAGS+=-DLIFDEBUG
9 #DEBUGFLAGS+=-DEXEC_DEBUG
10 #DEBUGFLAGS+=-DALLOC_TRACE
14 LIBCRTBEGIN= # nothing
18 S= ${.CURDIR}/../../../..
20 .PATH: ${.CURDIR}/../common
22 SRCS= ${PROGSOURCE} ${COMMONSOURCE} ${DRIVERSOURCE}
27 CPPFLAGS+= -nostdinc -I${.CURDIR}/../../.. -I${.CURDIR}/../../../.. \
29 CFLAGS+= -Os -msoft-float -Wno-main
31 CFLAGS+= -mdisable-fpregs -mfast-indirect-calls -mpa-risc-1-0
36 vers.c: ${.CURDIR}/version
37 ${HOST_SH} ${S}/conf/newvers_stand.sh ${.CURDIR}/version \
40 CPPFLAGS+= -D_STANDALONE -Dhp700 ${DEBUGFLAGS}
41 CPPFLAGS+= -DRELOC=0x${RELOC} -DHEAP_LIMIT=${HEAP_LIMIT}
44 COMMONSOURCE= cons.c dev_hppa.c dk.c itecons.c \
45 machdep.c milli_tiny.S pdc.c time.c
48 ### find out what to use for libkern
50 .include "${S}/lib/libkern/Makefile.inc"
53 ### find out what to use for libz
55 .include "${S}/lib/libz/Makefile.inc"
58 ### find out what to use for libsa
60 SAMISCMAKEFLAGS+="SA_USE_LOADFILE=yes"
61 .include "${S}/lib/libsa/Makefile.inc"
64 LDFLAGS+= -static -nostdlib -Wl,-N -Wl,-Ttext,$(RELOC)
65 LDFLAGS+= -Wl,-T,${.CURDIR}/ld.script -Wl,-Map,${PROG}.map
67 ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
68 ${CC} ${LDFLAGS} -o ${PROG} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
70 @echo ${PROG} total size should not exceed XXXX bytes
72 .include <bsd.prog.mk>
73 .include <bsd.klinks.mk>