Home | History | Annotate | Line # | Download | only in boot2440
      1 #	$NetBSD: Makefile,v 1.19 2019/10/24 18:46:20 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
      8 
      9 .include <bsd.own.mk>
     10 .include <bsd.klinks.mk>
     11 
     12 CLEANFILES+=	${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 ${ARM_APCS_FLAGS}
     19 CPUFLAGS=
     20 DBG=		-Os
     21 
     22 CWARNFLAGS.clang+=	-Wno-asm-operand-widths
     23 
     24 LIBCRT0=	# nothing
     25 LIBCRTI=	# 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 ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
     55 	${_MKTARGET_LINK}
     56 	${LD} -N -Ttext ${RELOC} -Bstatic -e ${ENTRY} -o ${.TARGET}.elf \
     57 	    ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
     58 	${OBJCOPY} -S -O binary ${.TARGET}.elf ${.TARGET}
     59 
     60 VERSIONFLAGS+=-k
     61 .include "${S}/conf/newvers_stand.mk"
     62 
     63 .include <bsd.prog.mk>
     64