Makefile.gzboot revision 1.5
1# $NetBSD: Makefile.gzboot,v 1.5 2002/04/25 22:30:38 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 44# libz options 45CPPFLAGS+= -DDYNAMIC_CRC_TABLE 46 47CPPFLAGS+= -DRELOC=${RELOC} 48CPPFLAGS+= -DMAXIMAGESIZE=${MAXIMAGESIZE} 49CPPFLAGS+= -DLOADADDR=${LOADADDR} 50 51COPTS+= -ffreestanding 52CWARNFLAGS+= -Wno-main 53 54CLEANFILES+= ${STARTFILE} vers.c ${BASE}.list 55SRCS+= vers.c 56 57.if !make(obj) && !make(clean) && !make(cleandir) 58.BEGIN: machine 59.NOPATH: machine 60.endif 61 62realdepend realall: machine 63CLEANFILES+= arm machine 64 65machine:: 66 -rm -f arm machine 67 ln -s ${S}/arch/evbarm/include machine 68 ln -s ${S}/arch/arm/include arm 69 70${OBJS}: machine 71 72### find out what to use for libkern 73KERN_AS= library 74.include "${S}/lib/libkern/Makefile.inc" 75LIBKERN= ${KERNLIB} 76 77### find out what to use for libz 78Z_AS= library 79.include "${S}/lib/libz/Makefile.inc" 80LIBZ= ${ZLIB} 81 82### find out what to use for libsa 83SA_AS= library 84.include "${S}/lib/libsa/Makefile.inc" 85LIBSA= ${SALIB} 86 87cleandir distclean: cleanlibdir 88 89cleanlibdir: 90 rm -rf lib 91 92LDFLAGS= -M -T ${LDSCRIPT} 93 94LIBLIST=${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} ${LIBSA} 95 96.PHONY: vers.c 97vers.c: ${VERSIONFILE} 98 sh ${S}/conf/newvers_stand.sh ${.ALLSRC} '${PLATFORM}' \ 99 ${NEWVERSWHAT} 100 101${PROG}: ${STARTFILE} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 102 ${LD} -o ${BASE}.sym ${LDFLAGS} ${STARTFILE} \ 103 ${OBJS} ${LIBLIST} > ${BASE}.list 104 105.include <bsd.prog.mk> 106