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