Makefile revision 1.19
1# $NetBSD: Makefile,v 1.19 2017/02/22 12:51:38 maya 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.init.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 25CPPFLAGS+= -marm 26CPUFLAGS= 27AFLAGS+= -D_LOCORE 28LDFLAGS+= -nostdlib -Bstatic 29 30CLEANFILES+= vers.c vers.o 31 32LIBCRT0= crt0.o 33LIBCRTI= # nothing 34LIBC= # nothing 35LIBCRTBEGIN= # nothing 36LIBCRTEND= # nothing 37 38NEWVERSWHAT?= "Boot" 39VERSIONFILE?= ${.CURDIR}/version 40 41### find out what to use for libkern 42KERN_AS= library 43.include "${S}/lib/libkern/Makefile.inc" 44LIBKERN= ${KERNLIB} 45 46### find out what to use for libz 47Z_AS= library 48.include "${S}/lib/libz/Makefile.inc" 49LIBZ= ${ZLIB} 50 51### find out what to use for libsa 52SA_AS= library 53SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes SA_ENABLE_LS_OP=yes 54.include "${S}/lib/libsa/Makefile.inc" 55LIBSA= ${SALIB} 56 57${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${VERSIONFILE} 58 ${_MKTARGET_LINK} 59 ${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \ 60 ${VERSIONFILE} zaurus ${NEWVERSWHAT} 61 ${CC} ${CFLAGS} ${CPPFLAGS} -c vers.c 62 ${LD} ${LDFLAGS} -o ${PROG} ${OBJS} vers.o ${LIBSA} ${LIBZ} ${LIBKERN} 63 64.include <bsd.klinks.mk> 65.include <bsd.prog.mk> 66 67cleandir distclean: .WAIT cleanlibdir 68 69cleanlibdir: 70 -rm -rf lib 71 72release: check_RELEASEDIR 73 ${HOST_INSTALL_FILE} -m ${BINMODE} ${PROG} \ 74 ${RELEASEDIR}/${MACHINE}/installation 75