2002-04-26 02:30:38 +04:00
|
|
|
# $NetBSD: Makefile.gzboot,v 1.5 2002/04/25 22:30:38 thorpej Exp $
|
2002-02-23 08:41:14 +03:00
|
|
|
|
|
|
|
NOMAN= # defined
|
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
|
|
|
|
EVBARM_STAND= ${S}/arch/evbarm/stand
|
|
|
|
|
|
|
|
BASE= gzboot_${PLATFORM}_${RELOC}
|
|
|
|
PROG= ${BASE}.sym
|
|
|
|
WARNS= 1
|
|
|
|
|
|
|
|
NEWVERSWHAT= "Gzip Boot"
|
|
|
|
VERSIONFILE= ${EVBARM_STAND}/gzboot/version
|
|
|
|
|
|
|
|
BINMODE=644
|
|
|
|
|
|
|
|
DBG= -Os
|
|
|
|
|
|
|
|
# XXX SHOULD NOT NEED TO DEFINE THESE!
|
|
|
|
LIBCRT0=
|
|
|
|
LIBC=
|
|
|
|
LIBCRTBEGIN=
|
|
|
|
LIBCRTEND=
|
|
|
|
|
|
|
|
.PATH: ${EVBARM_STAND}/gzboot
|
|
|
|
.PATH: ${EVBARM_STAND}/board
|
|
|
|
|
2002-02-24 23:29:44 +03:00
|
|
|
SRCS+= gzboot.c image.S
|
2002-02-23 08:41:14 +03:00
|
|
|
|
|
|
|
STARTFILE= srtbegin.o
|
|
|
|
|
|
|
|
CPPFLAGS+= -nostdinc -I. -I${EVBARM_STAND}/gzboot -I${EVBARM_STAND}/board
|
|
|
|
CPPFLAGS+= -I${S} -I${S}/arch -I${S}/lib/libsa
|
2002-02-23 23:19:52 +03:00
|
|
|
|
2002-02-23 08:41:14 +03:00
|
|
|
CPPFLAGS+= -D_STANDALONE
|
2002-02-23 23:19:52 +03:00
|
|
|
|
2002-04-26 02:30:38 +04:00
|
|
|
# Specify the heap size (used by board mem_init() routines)
|
|
|
|
CPPFLAGS+= -DHEAP_SIZE=1048576 # 1M
|
|
|
|
|
2002-02-23 23:19:52 +03:00
|
|
|
# libsa options
|
2002-02-23 08:41:14 +03:00
|
|
|
CPPFLAGS+= -DHEAP_VARIABLE
|
2002-02-23 23:19:52 +03:00
|
|
|
|
|
|
|
# libz options
|
|
|
|
CPPFLAGS+= -DDYNAMIC_CRC_TABLE
|
|
|
|
|
|
|
|
CPPFLAGS+= -DRELOC=${RELOC}
|
|
|
|
CPPFLAGS+= -DMAXIMAGESIZE=${MAXIMAGESIZE}
|
|
|
|
CPPFLAGS+= -DLOADADDR=${LOADADDR}
|
2002-02-23 08:41:14 +03:00
|
|
|
|
|
|
|
COPTS+= -ffreestanding
|
|
|
|
CWARNFLAGS+= -Wno-main
|
|
|
|
|
|
|
|
CLEANFILES+= ${STARTFILE} vers.c ${BASE}.list
|
|
|
|
SRCS+= vers.c
|
|
|
|
|
|
|
|
.if !make(obj) && !make(clean) && !make(cleandir)
|
|
|
|
.BEGIN: machine
|
|
|
|
.NOPATH: machine
|
|
|
|
.endif
|
|
|
|
|
|
|
|
realdepend realall: machine
|
|
|
|
CLEANFILES+= arm machine
|
|
|
|
|
|
|
|
machine::
|
|
|
|
-rm -f arm machine
|
|
|
|
ln -s ${S}/arch/evbarm/include machine
|
|
|
|
ln -s ${S}/arch/arm/include arm
|
|
|
|
|
|
|
|
${OBJS}: machine
|
|
|
|
|
|
|
|
### find out what to use for libkern
|
|
|
|
KERN_AS= library
|
|
|
|
.include "${S}/lib/libkern/Makefile.inc"
|
|
|
|
LIBKERN= ${KERNLIB}
|
|
|
|
|
|
|
|
### find out what to use for libz
|
|
|
|
Z_AS= library
|
|
|
|
.include "${S}/lib/libz/Makefile.inc"
|
|
|
|
LIBZ= ${ZLIB}
|
|
|
|
|
|
|
|
### find out what to use for libsa
|
|
|
|
SA_AS= library
|
|
|
|
.include "${S}/lib/libsa/Makefile.inc"
|
|
|
|
LIBSA= ${SALIB}
|
|
|
|
|
|
|
|
cleandir distclean: cleanlibdir
|
|
|
|
|
|
|
|
cleanlibdir:
|
|
|
|
rm -rf lib
|
|
|
|
|
2002-02-24 23:29:44 +03:00
|
|
|
LDFLAGS= -M -T ${LDSCRIPT}
|
2002-02-23 08:41:14 +03:00
|
|
|
|
|
|
|
LIBLIST=${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} ${LIBSA}
|
|
|
|
|
|
|
|
.PHONY: vers.c
|
|
|
|
vers.c: ${VERSIONFILE}
|
|
|
|
sh ${S}/conf/newvers_stand.sh ${.ALLSRC} '${PLATFORM}' \
|
|
|
|
${NEWVERSWHAT}
|
|
|
|
|
|
|
|
${PROG}: ${STARTFILE} ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
|
2002-02-23 21:19:09 +03:00
|
|
|
${LD} -o ${BASE}.sym ${LDFLAGS} ${STARTFILE} \
|
2002-02-23 08:41:14 +03:00
|
|
|
${OBJS} ${LIBLIST} > ${BASE}.list
|
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|