1 1.1 uwe # $NetBSD: Makefile.bootprogs,v 1.1 2006/09/01 21:26:18 uwe Exp $ 2 1.1 uwe 3 1.1 uwe S= ${.CURDIR}/../../../../.. 4 1.1 uwe 5 1.1 uwe NOMAN= # defined 6 1.1 uwe 7 1.1 uwe BINDIR= /usr/mdec 8 1.1 uwe BINMODE= 0444 9 1.1 uwe 10 1.1 uwe PRIMARY_LOAD_ADDRESS?=0x8c201000 11 1.1 uwe SECONDARY_LOAD_ADDRESS?=0x8ff00000 12 1.1 uwe 13 1.1 uwe .include <bsd.own.mk> 14 1.1 uwe 15 1.1 uwe STRIPFLAG= # override 16 1.1 uwe 17 1.1 uwe LIBCRT0= # nothing 18 1.1 uwe LIBCRTBEGIN= # nothing 19 1.1 uwe LIBCRTEND= # nothing 20 1.1 uwe LIBC= # nothing 21 1.1 uwe 22 1.1 uwe .PATH: ${.CURDIR}/.. 23 1.1 uwe 24 1.1 uwe COPTS= -Os -ffreestanding 25 1.1 uwe 26 1.1 uwe LDFLAGS+= -N 27 1.1 uwe CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes 28 1.1 uwe CPPFLAGS+= -nostdinc -D_STANDALONE 29 1.1 uwe CPPFLAGS+= -DSH4 30 1.1 uwe CPPFLAGS+= -I${.OBJDIR} -I${.CURDIR}/.. -I${.CURDIR}/../../boot -I${S} 31 1.1 uwe 32 1.1 uwe LANDISK_STAND_DIR?= $S/arch/landisk/stand 33 1.1 uwe 34 1.1 uwe CLEANFILES+= machine sh3 35 1.1 uwe 36 1.1 uwe .if !make(obj) && !make(clean) && !make(cleandir) 37 1.1 uwe .BEGIN: machine sh3 38 1.1 uwe .NOPATH: machine sh3 39 1.1 uwe 40 1.1 uwe machine:: 41 1.1 uwe -rm -f $@ 42 1.1 uwe ln -s ${S}/arch/${MACHINE}/include $@ 43 1.1 uwe 44 1.1 uwe sh3:: 45 1.1 uwe -rm -f $@ 46 1.1 uwe ln -s ${S}/arch/sh3/include $@ 47 1.1 uwe .endif 48 1.1 uwe 49 1.1 uwe lib: 50 1.1 uwe .ifdef LIBOBJ 51 1.1 uwe -rm -f $@ 52 1.1 uwe ln -s ${LIBOBJ}/lib . 53 1.1 uwe [ -d ${LIBOBJ}/lib ] || mkdir ${LIBOBJ}/lib 54 1.1 uwe .else 55 1.1 uwe mkdir lib 56 1.1 uwe .endif 57 1.1 uwe 58 1.1 uwe ### find out what to use for libsa 59 1.1 uwe SA_AS= library 60 1.1 uwe .include "${S}/lib/libsa/Makefile.inc" 61 1.1 uwe LIBSA= ${SALIB} 62 1.1 uwe CPPFLAGS+= -I$(SADIR) 63 1.1 uwe 64 1.1 uwe ### find out what to use for libkern 65 1.1 uwe KERN_AS= library 66 1.1 uwe .include "${S}/lib/libkern/Makefile.inc" 67 1.1 uwe LIBKERN= ${KERNLIB} 68 1.1 uwe 69 1.1 uwe ### find out what to use for libz 70 1.1 uwe Z_AS= library 71 1.1 uwe .include "${S}/lib/libz/Makefile.inc" 72 1.1 uwe LIBZ= ${ZLIB} 73 1.1 uwe 74 1.1 uwe realdepend realall: lib 75 1.1 uwe 76 1.1 uwe cleandir distclean: cleanlibdir 77 1.1 uwe 78 1.1 uwe cleanlibdir: 79 1.1 uwe -rm -rf lib 80