Home | History | Annotate | Line # | Download | only in zboot
Makefile revision 1.10.4.1
      1 #	$NetBSD: Makefile,v 1.10.4.1 2013/08/28 23:59:24 rmind Exp $
      2 
      3 PROG=		zboot
      4 
      5 S=		${.CURDIR}/../../../..
      6 
      7 SRCS=		crt0.c
      8 SRCS+=		boot.c bootinfo.c bootmenu.c conf.c devopen.c diskprobe.c
      9 SRCS+=		loadfile_zboot.c
     10 SRCS+=		getsecs.c termios.c unixcons.c unixdev.c unixsys.S
     11 SRCS+=		pathfs.c
     12 
     13 NOMAN=		# defined
     14 
     15 .include <bsd.own.mk>
     16 
     17 CFLAGS+=	-Wall -Wno-main
     18 CFLAGS+=	-Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
     19 CFLAGS+=	-fno-stack-protector -fno-builtin -ffreestanding
     20 CFLAGS+=	-fno-unwind-tables
     21 CPPFLAGS+=	-nostdinc -I. -I${.CURDIR} -I${.OBJDIR} -I${S}
     22 CPPFLAGS+=	-D_STANDALONE -DHEAP_VARIABLE
     23 CPPFLAGS+=	-DLIBSA_ENABLE_LS_OP
     24 CPPFLAGS+=	-mabi=apcs-gnu -mfloat-abi=soft -mcpu=xscale
     25 CPPFLAGS+=	-mno-thumb -mno-thumb-interwork
     26 CPUFLAGS=
     27 AFLAGS+=	-D_LOCORE
     28 LDFLAGS+=	-nostdlib -Bstatic
     29 
     30 CLEANFILES+=	vers.c vers.o
     31 
     32 LIBCRT0=	crt0.o
     33 LIBC=		# nothing
     34 LIBCRTBEGIN=	# nothing
     35 LIBCRTEND=	# nothing
     36 
     37 NEWVERSWHAT?=   "Boot"
     38 VERSIONFILE?=	${.CURDIR}/version
     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 SA_ENABLE_LS_OP=yes
     53 .include "${S}/lib/libsa/Makefile.inc"
     54 LIBSA=		${SALIB}
     55 
     56 ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${VERSIONFILE}
     57 	${_MKTARGET_LINK}
     58 	${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \
     59 	    ${VERSIONFILE} ${MACHINE} ${NEWVERSWHAT}
     60 	${CC} ${CFLAGS} ${CPPFLAGS} -c vers.c
     61 	${LD} ${LDFLAGS} -o ${PROG} ${OBJS} vers.o ${LIBSA} ${LIBZ} ${LIBKERN}
     62 
     63 .include <bsd.klinks.mk>
     64 .include <bsd.prog.mk>
     65 
     66 cleandir distclean: .WAIT cleanlibdir
     67 
     68 cleanlibdir:
     69 	-rm -rf lib
     70 
     71 release: check_RELEASEDIR
     72 	${HOST_INSTALL_FILE} -m ${BINMODE} ${PROG} \
     73 	    ${RELEASEDIR}/${MACHINE}/installation
     74