1# $NetBSD: Makefile.booters,v 1.3 2009/07/20 04:59:03 kiyohara Exp $ 2 3.include <bsd.own.mk> 4 5STRIPFLAG= 6BINMODE=444 7 8LIBCRT0= # nothing 9LIBCRTBEGIN= # nothing 10LIBCRTEND= # nothing 11LIBC= # nothing 12 13COPTS= -Os -ffreestanding 14 15IA64_STAND_DIR?= $S/arch/ia64/stand 16 17.PATH: ${IA64_STAND_DIR}/efi 18 19CPPFLAGS += -nostdlib -nostdinc -I${.OBJDIR} -I${IA64_STAND_DIR} -I${IA64_STAND_DIR}/efi/include 20 21# Options used when building standalone components 22CFLAGS+= -ffreestanding -fshort-wchar -Wformat -D_STANDALONE 23LDFLAGS+= #-nostdlib 24CPPFLAGS+= -D_STANDALONE 25 26.if !make(obj) && !make(clean) && !make(cleandir) 27.BEGIN: machine 28.NOPATH: machine 29.endif 30 31realdepend realall: machine lib 32CLEANFILES= machine 33 34machine: 35 -rm -f $@ 36 ln -s $S/arch/${MACHINE_ARCH}/include $@ 37 38${OBJS}: machine lib 39 40lib: 41.ifdef LIBOBJ 42 -rm -f $@ 43 ln -s ${LIBOBJ}/lib . 44 [ -d ${LIBOBJ}/lib ] || mkdir ${LIBOBJ}/lib 45.else 46 mkdir lib 47.endif 48 49### find out what to use for libkern 50KERN_AS= library 51.include "${S}/lib/libkern/Makefile.inc" 52LIBKERN= ${KERNLIB} 53 54### find out what to use for libz 55Z_AS= library 56.include "${S}/lib/libz/Makefile.inc" 57LIBZ= ${ZLIB} 58 59### find out what to use for libsa 60SA_AS= library 61SAMISCMAKEFLAGS+="SA_USE_LOADFILE=yes" "SA_INCLUDE_NET=no" 62.include "${S}/lib/libsa/Makefile.inc" 63LIBSA= ${SALIB} 64 65 66cleandir distclean: .WAIT cleanlibdir 67 68cleanlibdir: 69 -rm -rf lib 70 71LIBLIST=${LIBKERN} ${LIBSA} ${LIBZ} ${LIBKERN} 72