1# $NetBSD: Makefile.bootprogs,v 1.3 2009/05/03 15:12:12 tsutsui Exp $ 2 3S= ${.CURDIR}/../../../../.. 4 5NOMAN= # defined 6 7BINDIR= /usr/mdec 8BINMODE= 0444 9 10PRIMARY_LOAD_ADDRESS?=0x8c201000 11SECONDARY_LOAD_ADDRESS?=0x8ff00000 12 13.include <bsd.own.mk> 14 15STRIPFLAG= # override 16 17LIBCRT0= # nothing 18LIBCRTBEGIN= # nothing 19LIBCRTEND= # nothing 20LIBC= # nothing 21 22.PATH: ${.CURDIR}/.. 23 24COPTS= -m4-nofpu -Os -ffreestanding 25 26LDFLAGS+= -N 27CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes 28CPPFLAGS+= -nostdinc -D_STANDALONE 29CPPFLAGS+= -DSH4 30CPPFLAGS+= -I${.OBJDIR} -I${.CURDIR}/.. -I${.CURDIR}/../../boot -I${S} 31 32.if !make(obj) && !make(clean) && !make(cleandir) 33.BEGIN: 34 -rm -f machine && \ 35 ln -s ${S}/arch/${MACHINE}/include machine 36 -rm -f ${MACHINE_CPU} && \ 37 ln -s ${S}/arch/${MACHINE_CPU}/include ${MACHINE_CPU} 38.ifdef LIBOBJ 39 -rm -f lib && ln -s ${LIBOBJ}/lib lib 40 mkdir -p ${LIBOBJ}/lib 41.endif 42.endif 43 44### find out what to use for libsa 45SA_AS= library 46.include "${S}/lib/libsa/Makefile.inc" 47LIBSA= ${SALIB} 48CPPFLAGS+= -I$(SADIR) 49 50### find out what to use for libkern 51KERN_AS= library 52.include "${S}/lib/libkern/Makefile.inc" 53LIBKERN= ${KERNLIB} 54 55### find out what to use for libz 56Z_AS= library 57.include "${S}/lib/libz/Makefile.inc" 58LIBZ= ${ZLIB} 59 60cleandir distclean: .WAIT cleanlibdir 61 62cleanlibdir: 63 -rm -rf lib 64