Home | History | Annotate | Line # | Download | only in ofwboot
      1 #	$NetBSD: Makefile,v 1.16 2017/04/08 19:53:22 christos Exp $
      2 
      3 NOMAN=		# defined
      4 
      5 .include <bsd.own.mk>
      6 .include <bsd.klinks.mk>
      7 
      8 S=		${.CURDIR}/../../../..
      9 
     10 WARNS=		2
     11 PROG=		ofwboot
     12 SRCS=		srt0.S Locore.c alloc.c boot.c ofdev.c net.c netif_of.c
     13 CFLAGS+=	-ffreestanding -Wno-main
     14 #CPPFLAGS+=	-DDEBUG -DNETIF_DEBUG
     15 CPPFLAGS+=	-DSUPPORT_DHCP -I${.CURDIR}
     16 CPPFLAGS+=	-D_STANDALONE
     17 DBG=		-Os
     18 
     19 SRCS+=		byteorder.c
     20 .PATH:		${S}/lib/libsa
     21 
     22 # XXX SHOULD NOT NEED TO DEFINE THESE!
     23 LIBCRT0=
     24 LIBCRTI=
     25 LIBC=
     26 LIBCRTBEGIN=
     27 LIBCRTEND=
     28 
     29 STRIPFLAG=
     30 BINMODE=	444
     31 
     32 NEWVERSWHAT=	"OpenFirmware Boot"
     33 
     34 RELOC=		f0000000
     35 
     36 ENTRY=		_start
     37 
     38 CPPFLAGS+=	-nostdinc -I. -I${.CURDIR}/../../.. -I${S}
     39 CPPFLAGS+=	-DRELOC=0x${RELOC}
     40 CFLAGS+=	-fno-unwind-tables
     41 CPUFLAGS=	-mcpu=strongarm
     42 
     43 CLEANFILES+= ${PROG}.aout
     44 
     45 ### find out what to use for libkern
     46 KERN_AS=	library
     47 .include "${S}/lib/libkern/Makefile.inc"
     48 LIBKERN=	${KERNLIB}
     49 
     50 ### find out what to use for libz
     51 Z_AS=		library
     52 .include "${S}/lib/libz/Makefile.inc"
     53 LIBZ=		${ZLIB}
     54 
     55 ### find out what to use for libsa
     56 SA_AS=		library
     57 SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes
     58 .include "${S}/lib/libsa/Makefile.inc"
     59 LIBSA=		${SALIB}
     60 
     61 ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
     62 	${_MKTARGET_LINK}
     63 	${LD} -s -N -Ttext ${RELOC} -Bstatic -e ${ENTRY} -o ${.TARGET}.aout \
     64 	    ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
     65 	${OBJCOPY} -O binary ${.TARGET}.aout ${.TARGET}
     66 
     67 .include "${S}/conf/newvers_stand.mk"
     68 
     69 .include <bsd.prog.mk>
     70