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