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