Makefile revision 1.16
1# $NetBSD: Makefile,v 1.16 2014/01/12 15:26:31 tsutsui Exp $ 2 3PROG= zboot 4 5S= ${.CURDIR}/../../../.. 6 7SRCS= crt0.c 8SRCS+= boot.c bootinfo.c bootmenu.c conf.c devopen.c diskprobe.c 9SRCS+= loadfile_zboot.c 10SRCS+= getsecs.c termios.c unixcons.c unixdev.c unixsys.S 11SRCS+= pathfs.c 12 13NOMAN= # defined 14 15.include <bsd.own.mk> 16 17CFLAGS+= -Wall -Wno-main 18CFLAGS+= -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith 19CFLAGS+= -fno-stack-protector -fno-builtin -ffreestanding 20CFLAGS+= -fno-unwind-tables 21CPPFLAGS+= -nostdinc -I. -I${.CURDIR} -I${.OBJDIR} -I${S} 22CPPFLAGS+= -D_STANDALONE -DHEAP_VARIABLE 23CPPFLAGS+= -DLIBSA_ENABLE_LS_OP 24CPPFLAGS+= ${ARM_APCS_FLAGS} -mcpu=xscale 25.if ${HAVE_LLVM:Uno} != "no" || ${HAVE_GCC:U0} >= 48 26CPPFLAGS+= -marm 27.else 28CPPFLAGS+= -mno-thumb -mno-thumb-interwork 29.endif 30CPUFLAGS= 31AFLAGS+= -D_LOCORE 32LDFLAGS+= -nostdlib -Bstatic 33 34CLEANFILES+= vers.c vers.o 35 36LIBCRT0= crt0.o 37LIBCRTI= # nothing 38LIBC= # nothing 39LIBCRTBEGIN= # nothing 40LIBCRTEND= # nothing 41 42NEWVERSWHAT?= "Boot" 43VERSIONFILE?= ${.CURDIR}/version 44 45### find out what to use for libkern 46KERN_AS= library 47.include "${S}/lib/libkern/Makefile.inc" 48LIBKERN= ${KERNLIB} 49 50### find out what to use for libz 51Z_AS= library 52.include "${S}/lib/libz/Makefile.inc" 53LIBZ= ${ZLIB} 54 55### find out what to use for libsa 56SA_AS= library 57SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes SA_ENABLE_LS_OP=yes 58.include "${S}/lib/libsa/Makefile.inc" 59LIBSA= ${SALIB} 60 61${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${VERSIONFILE} 62 ${_MKTARGET_LINK} 63 ${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \ 64 ${VERSIONFILE} ${MACHINE} ${NEWVERSWHAT} 65 ${CC} ${CFLAGS} ${CPPFLAGS} -c vers.c 66 ${LD} ${LDFLAGS} -o ${PROG} ${OBJS} vers.o ${LIBSA} ${LIBZ} ${LIBKERN} 67 68.include <bsd.klinks.mk> 69.include <bsd.prog.mk> 70 71cleandir distclean: .WAIT cleanlibdir 72 73cleanlibdir: 74 -rm -rf lib 75 76release: check_RELEASEDIR 77 ${HOST_INSTALL_FILE} -m ${BINMODE} ${PROG} \ 78 ${RELEASEDIR}/${MACHINE}/installation 79