1# $NetBSD: Makefile,v 1.1 2012/01/30 03:28:34 nisimura Exp $ 2 3S= ${.CURDIR}/../../../.. 4PROG= bootmini2440 5SRCS= entry.S main.c devopen.c netif.c dev_net.c dm9k.c dev_sdmmc.c 6SRCS+= s3csdi.c vers.c 7 8.include <bsd.own.mk> 9 10CLEANFILES+= vers.c ${PROG}.elf 11CFLAGS+= -Wall -Wno-main -ffreestanding -march=armv4 12CPPFLAGS+= -D_STANDALONE -DSUPPORT_DHCP 13CPPFLAGS+= -DDM9000MAC="0x08,0x08,0x11,0x18,0x12,0x27" 14CPPFLAGS+= -DDEFAULT_BOOTFILE="ld0a:netbsd;net:" 15CPPFLAGS+= -nostdinc -I. -I${.CURDIR} -I${.OBJDIR} -I${S} -I${S}/arch 16DBG= 17 18LIBCRT0= # nothing 19LIBCRTBEGIN= # nothing 20LIBCRTEND= # nothing 21LIBC= # nothing 22 23MAN= # no manual page 24NOMAN= # defined 25STRIPFLAG= 26BINMODE= 444 27 28RELOC= 0x30A00000 29ENTRY= _start 30 31### find out what to use for libkern 32KERN_AS= library 33.include "${S}/lib/libkern/Makefile.inc" 34LIBKERN= ${KERNLIB} 35 36### find out what to use for libz 37Z_AS= library 38.include "${S}/lib/libz/Makefile.inc" 39LIBZ= ${ZLIB} 40 41### find out what to use for libsa 42SA_AS= library 43SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes 44SACPPFLAGS= -DLIBSA_PRINTF_WIDTH_SUPPORT 45.include "${S}/lib/libsa/Makefile.inc" 46LIBSA= ${SALIB} 47 48.PHONY: vers.c 49vers.c: version 50 ${HOST_SH} ${S}/conf/newvers_stand.sh -K \ 51 ${${MKREPRO} == "yes" :?:-D} ${.CURDIR}/version "evbarm" 52 53${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 54 ${LD} -N -Ttext ${RELOC} -Bstatic -e ${ENTRY} -o ${.TARGET}.elf \ 55 ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 56 ${OBJCOPY} -S -O binary ${.TARGET}.elf ${.TARGET} 57 58 59.include <bsd.klinks.mk> 60.include <bsd.prog.mk> 61 62cleandir distclean: .WAIT cleanlibdir 63 64cleanlibdir: 65 -rm -rf lib 66 67