Home | History | Annotate | Line # | Download | only in boot2440
Makefile revision 1.1
      1 #	$NetBSD: Makefile,v 1.1 2012/01/30 03:28:34 nisimura 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 -march=armv4
     12 CPPFLAGS+=	-D_STANDALONE -DSUPPORT_DHCP 
     13 CPPFLAGS+=	-DDM9000MAC="0x08,0x08,0x11,0x18,0x12,0x27" 
     14 CPPFLAGS+=	-DDEFAULT_BOOTFILE="ld0e:netbsd;net:"
     15 CPPFLAGS+=	-nostdinc -I. -I${.CURDIR} -I${.OBJDIR} -I${S} -I${S}/arch
     16 DBG=		
     17 
     18 LIBCRT0=	# nothing
     19 LIBCRTBEGIN=	# nothing
     20 LIBCRTEND=	# nothing
     21 LIBC=		# nothing
     22 
     23 MAN=		# no manual page
     24 NOMAN=		# defined
     25 STRIPFLAG=
     26 BINMODE=	444
     27 
     28 RELOC=		0x30A00000
     29 ENTRY=		_start
     30 
     31 ### find out what to use for libkern
     32 KERN_AS=	library
     33 .include "${S}/lib/libkern/Makefile.inc"
     34 LIBKERN=	${KERNLIB}
     35 
     36 ### find out what to use for libz
     37 Z_AS=		library
     38 .include "${S}/lib/libz/Makefile.inc"
     39 LIBZ=		${ZLIB}
     40 
     41 ### find out what to use for libsa
     42 SA_AS=		library
     43 SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes
     44 SACPPFLAGS=	-DLIBSA_PRINTF_WIDTH_SUPPORT
     45 .include "${S}/lib/libsa/Makefile.inc"
     46 LIBSA=		${SALIB}
     47 
     48 .PHONY: vers.c
     49 vers.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 
     62 cleandir distclean: .WAIT cleanlibdir
     63 
     64 cleanlibdir:
     65 	-rm -rf lib
     66 
     67