1 # $NetBSD: Makefile,v 1.6 2013/02/05 03:17:50 matt 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 11 CLEANFILES+= vers.c ${PROG}.elf 12 CFLAGS+= -Wall -Wno-main -ffreestanding 13 CPPFLAGS+= -D_STANDALONE -DSUPPORT_DHCP -DLIBSA_PRINTF_WIDTH_SUPPORT 14 CPPFLAGS+= -DDM9000MAC="0x08,0x08,0x11,0x18,0x12,0x27" 15 CPPFLAGS+= -DDEFAULT_BOOTFILE="ld0a:netbsd;net:" 16 CPPFLAGS+= -nostdinc -I. -I${.OBJDIR} -I${S} -I${S}/arch 17 CPPFLAGS+= -march=armv4 -mabi=atpcs -mfloat-abi=soft 18 CPUFLAGS+= -Wa,-meabi=gnu 19 DBG= 20 21 LIBCRT0= # nothing 22 LIBCRTBEGIN= # nothing 23 LIBCRTEND= # nothing 24 LIBC= # nothing 25 26 MAN= # no manual page 27 NOMAN= # defined 28 STRIPFLAG= 29 BINMODE= 444 30 31 RELOC= 0x30A00000 32 ENTRY= _start 33 34 .if !make(obj) && !make(clean) && !make(cleandir) 35 .BEGIN: 36 @[ -h machine ] || ln -s ${S}/arch/evbarm/include machine 37 @[ -h arm ] || ln -s ${S}/arch/arm/include arm 38 .NOPATH: machine arm 39 .endif 40 CLEANFILES+= machine arm 41 42 ### find out what to use for libkern 43 KERN_AS= library 44 .include "${S}/lib/libkern/Makefile.inc" 45 LIBKERN= ${KERNLIB} 46 47 ### find out what to use for libz 48 Z_AS= library 49 .include "${S}/lib/libz/Makefile.inc" 50 LIBZ= ${ZLIB} 51 52 ### find out what to use for libsa 53 SA_AS= library 54 SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes 55 .include "${S}/lib/libsa/Makefile.inc" 56 LIBSA= ${SALIB} 57 58 .PHONY: vers.c 59 vers.c: version 60 ${HOST_SH} ${S}/conf/newvers_stand.sh -K \ 61 ${${MKREPRO} == "yes" :?:-D} ${.CURDIR}/version "evbarm" 62 63 ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 64 ${_MKTARGET_LINK} 65 ${LD} -N -Ttext ${RELOC} -Bstatic -e ${ENTRY} -o ${.TARGET}.elf \ 66 ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 67 ${OBJCOPY} -S -O binary ${.TARGET}.elf ${.TARGET} 68 69 .include <bsd.prog.mk> 70