Home | History | Annotate | Line # | Download | only in boot2440
Makefile revision 1.3
      1 #	$NetBSD: Makefile,v 1.3 2012/02/22 12:12:21 nisimura 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 -march=armv4
     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 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 .if !make(obj) && !make(clean) && !make(cleandir)
     33 .BEGIN:
     34 	@[ -h machine ] || ln -s ${S}/arch/evbarm/include machine
     35 	@[ -h arm ] || ln -s ${S}/arch/arm/include arm
     36 .NOPATH: machine arm
     37 .endif
     38 CLEANFILES+= machine arm
     39 
     40 ### find out what to use for libkern
     41 KERN_AS=	library
     42 .include "${S}/lib/libkern/Makefile.inc"
     43 LIBKERN=	${KERNLIB}
     44 
     45 ### find out what to use for libz
     46 Z_AS=		library
     47 .include "${S}/lib/libz/Makefile.inc"
     48 LIBZ=		${ZLIB}
     49 
     50 ### find out what to use for libsa
     51 SA_AS=		library
     52 SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes
     53 .include "${S}/lib/libsa/Makefile.inc"
     54 LIBSA=		${SALIB}
     55 
     56 .PHONY: vers.c
     57 vers.c: version
     58 	${HOST_SH} ${S}/conf/newvers_stand.sh -K \
     59 	    ${${MKREPRO} == "yes" :?:-D} ${.CURDIR}/version "evbarm"
     60 
     61 ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
     62 	${LD} -N -Ttext ${RELOC} -Bstatic -e ${ENTRY} -o ${.TARGET}.elf \
     63 	    ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
     64 	${OBJCOPY} -S -O binary ${.TARGET}.elf ${.TARGET}
     65 
     66 .include <bsd.prog.mk>
     67