Home | History | Annotate | Line # | Download | only in gzboot
Makefile.gzboot revision 1.2
      1  1.2  thorpej #	$NetBSD: Makefile.gzboot,v 1.2 2002/02/23 18:19:09 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.1  thorpej CPPFLAGS+= -D_STANDALONE
     36  1.1  thorpej CPPFLAGS+= -DHEAP_VARIABLE
     37  1.1  thorpej CPPFLAGS+= -DRELOC=0x${RELOC}
     38  1.1  thorpej 
     39  1.1  thorpej COPTS+=	-ffreestanding
     40  1.1  thorpej CWARNFLAGS+= -Wno-main
     41  1.1  thorpej 
     42  1.1  thorpej CLEANFILES+= ${STARTFILE} vers.c ${BASE}.list
     43  1.1  thorpej SRCS+= vers.c
     44  1.1  thorpej 
     45  1.1  thorpej .if !make(obj) && !make(clean) && !make(cleandir)
     46  1.1  thorpej .BEGIN: machine
     47  1.1  thorpej .NOPATH: machine
     48  1.1  thorpej .endif
     49  1.1  thorpej 
     50  1.1  thorpej realdepend realall: machine
     51  1.1  thorpej CLEANFILES+= arm machine
     52  1.1  thorpej 
     53  1.1  thorpej machine::
     54  1.1  thorpej 	-rm -f arm machine
     55  1.1  thorpej 	ln -s ${S}/arch/evbarm/include machine
     56  1.1  thorpej 	ln -s ${S}/arch/arm/include arm
     57  1.1  thorpej 
     58  1.1  thorpej ${OBJS}: machine
     59  1.1  thorpej 
     60  1.1  thorpej ### find out what to use for libkern
     61  1.1  thorpej KERN_AS=	library
     62  1.1  thorpej .include "${S}/lib/libkern/Makefile.inc"
     63  1.1  thorpej LIBKERN=	${KERNLIB}
     64  1.1  thorpej 
     65  1.1  thorpej ### find out what to use for libz
     66  1.1  thorpej Z_AS=		library
     67  1.1  thorpej .include "${S}/lib/libz/Makefile.inc"
     68  1.1  thorpej LIBZ=		${ZLIB}
     69  1.1  thorpej 
     70  1.1  thorpej ### find out what to use for libsa
     71  1.1  thorpej SA_AS=		library
     72  1.1  thorpej .include "${S}/lib/libsa/Makefile.inc"
     73  1.1  thorpej LIBSA=		${SALIB}
     74  1.1  thorpej 
     75  1.1  thorpej cleandir distclean: cleanlibdir
     76  1.1  thorpej 
     77  1.1  thorpej cleanlibdir:
     78  1.1  thorpej 	rm -rf lib
     79  1.1  thorpej 
     80  1.2  thorpej LDFLAGS= -M -e start -T ${LDSCRIPT}
     81  1.1  thorpej 
     82  1.1  thorpej LIBLIST=${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} ${LIBSA}
     83  1.1  thorpej 
     84  1.1  thorpej .PHONY: vers.c
     85  1.1  thorpej vers.c: ${VERSIONFILE}
     86  1.1  thorpej 	sh ${S}/conf/newvers_stand.sh ${.ALLSRC} '${PLATFORM}' \
     87  1.1  thorpej 	    ${NEWVERSWHAT}
     88  1.1  thorpej 
     89  1.1  thorpej ${PROG}: ${STARTFILE} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
     90  1.2  thorpej 	${LD} -o ${BASE}.sym ${LDFLAGS} ${STARTFILE} \
     91  1.1  thorpej 	    ${OBJS} ${LIBLIST} > ${BASE}.list
     92  1.1  thorpej 
     93  1.1  thorpej .include <bsd.prog.mk>
     94