Makefile revision 1.15
1# $NetBSD: Makefile,v 1.15 2013/12/15 18:08:37 joerg 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 37LIBC= # nothing 38LIBCRTBEGIN= # nothing 39LIBCRTEND= # nothing 40 41NEWVERSWHAT?= "Boot" 42VERSIONFILE?= ${.CURDIR}/version 43 44### find out what to use for libkern 45KERN_AS= library 46.include "${S}/lib/libkern/Makefile.inc" 47LIBKERN= ${KERNLIB} 48 49### find out what to use for libz 50Z_AS= library 51.include "${S}/lib/libz/Makefile.inc" 52LIBZ= ${ZLIB} 53 54### find out what to use for libsa 55SA_AS= library 56SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes SA_ENABLE_LS_OP=yes 57.include "${S}/lib/libsa/Makefile.inc" 58LIBSA= ${SALIB} 59 60${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${VERSIONFILE} 61 ${_MKTARGET_LINK} 62 ${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \ 63 ${VERSIONFILE} ${MACHINE} ${NEWVERSWHAT} 64 ${CC} ${CFLAGS} ${CPPFLAGS} -c vers.c 65 ${LD} ${LDFLAGS} -o ${PROG} ${OBJS} vers.o ${LIBSA} ${LIBZ} ${LIBKERN} 66 67.include <bsd.klinks.mk> 68.include <bsd.prog.mk> 69 70cleandir distclean: .WAIT cleanlibdir 71 72cleanlibdir: 73 -rm -rf lib 74 75release: check_RELEASEDIR 76 ${HOST_INSTALL_FILE} -m ${BINMODE} ${PROG} \ 77 ${RELEASEDIR}/${MACHINE}/installation 78