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