Makefile.gzboot revision 1.6
1# $NetBSD: Makefile.gzboot,v 1.6 2003/03/29 22:25:25 thorpej Exp $ 2 3NOMAN= # defined 4 5.include <bsd.own.mk> 6 7EVBARM_STAND= ${S}/arch/evbarm/stand 8 9BASE= gzboot_${PLATFORM}_${RELOC} 10PROG= ${BASE}.sym 11WARNS= 1 12 13NEWVERSWHAT= "Gzip Boot" 14VERSIONFILE= ${EVBARM_STAND}/gzboot/version 15 16BINMODE=644 17 18DBG= -Os 19 20# XXX SHOULD NOT NEED TO DEFINE THESE! 21LIBCRT0= 22LIBC= 23LIBCRTBEGIN= 24LIBCRTEND= 25 26.PATH: ${EVBARM_STAND}/gzboot 27.PATH: ${EVBARM_STAND}/board 28 29SRCS+= gzboot.c image.S 30 31STARTFILE= srtbegin.o 32 33CPPFLAGS+= -nostdinc -I. -I${EVBARM_STAND}/gzboot -I${EVBARM_STAND}/board 34CPPFLAGS+= -I${S} -I${S}/arch -I${S}/lib/libsa 35 36CPPFLAGS+= -D_STANDALONE 37 38# Specify the heap size (used by board mem_init() routines) 39CPPFLAGS+= -DHEAP_SIZE=1048576 # 1M 40 41# libsa options 42CPPFLAGS+= -DHEAP_VARIABLE 43 44CPPFLAGS+= -DRELOC=${RELOC} 45CPPFLAGS+= -DMAXIMAGESIZE=${MAXIMAGESIZE} 46CPPFLAGS+= -DLOADADDR=${LOADADDR} 47 48COPTS+= -ffreestanding 49CWARNFLAGS+= -Wno-main 50 51CLEANFILES+= ${STARTFILE} vers.c ${BASE}.list 52SRCS+= vers.c 53 54.if !make(obj) && !make(clean) && !make(cleandir) 55.BEGIN: machine 56.NOPATH: machine 57.endif 58 59realdepend realall: machine 60CLEANFILES+= arm machine 61 62machine:: 63 -rm -f arm machine 64 ln -s ${S}/arch/evbarm/include machine 65 ln -s ${S}/arch/arm/include arm 66 67${OBJS}: machine 68 69### find out what to use for libkern 70KERN_AS= library 71.include "${S}/lib/libkern/Makefile.inc" 72LIBKERN= ${KERNLIB} 73 74### find out what to use for libz 75Z_AS= library 76.include "${S}/lib/libz/Makefile.inc" 77LIBZ= ${ZLIB} 78 79### find out what to use for libsa 80SA_AS= library 81.include "${S}/lib/libsa/Makefile.inc" 82LIBSA= ${SALIB} 83 84cleandir distclean: cleanlibdir 85 86cleanlibdir: 87 rm -rf lib 88 89LDFLAGS= -M -T ${LDSCRIPT} 90 91LIBLIST=${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} ${LIBSA} 92 93.PHONY: vers.c 94vers.c: ${VERSIONFILE} 95 sh ${S}/conf/newvers_stand.sh ${.ALLSRC} '${PLATFORM}' \ 96 ${NEWVERSWHAT} 97 98${PROG}: ${STARTFILE} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 99 ${LD} -o ${BASE}.sym ${LDFLAGS} ${STARTFILE} \ 100 ${OBJS} ${LIBLIST} > ${BASE}.list 101 102.include <bsd.prog.mk> 103