1# $NetBSD: Makefile,v 1.4 2010/05/27 06:58:15 dholland 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 11 12NOMAN= # defined 13 14CFLAGS+= -Wall -Wno-main 15CFLAGS+= -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith 16CFLAGS+= -fno-stack-protector -fno-builtin -ffreestanding 17CPPFLAGS+= -nostdinc -I. -I${.CURDIR} -I${.OBJDIR} -I${S} 18CPPFLAGS+= -D_STANDALONE -DHEAP_VARIABLE 19AFLAGS+= -D_LOCORE 20LDFLAGS+= -nostdlib -Bstatic 21 22CLEANFILES+= vers.c vers.o 23 24LIBCRT0= crt0.o 25LIBC= # nothing 26LIBCRTBEGIN= # nothing 27LIBCRTEND= # nothing 28 29NEWVERSWHAT?= "Boot" 30VERSIONFILE?= ${.CURDIR}/version 31 32### find out what to use for libkern 33KERN_AS= library 34.include "${S}/lib/libkern/Makefile.inc" 35LIBKERN= ${KERNLIB} 36 37### find out what to use for libz 38Z_AS= library 39.include "${S}/lib/libz/Makefile.inc" 40LIBZ= ${ZLIB} 41 42### find out what to use for libsa 43SA_AS= library 44SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes 45.include "${S}/lib/libsa/Makefile.inc" 46LIBSA= ${SALIB} 47 48${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 49 ${HOST_SH} ${S}/conf/newvers_stand.sh ${VERSIONFILE} ${MACHINE} ${NEWVERSWHAT} 50 ${CC} -c vers.c 51 ${LD} ${LDFLAGS} -o ${PROG} ${OBJS} vers.o ${LIBSA} ${LIBZ} ${LIBKERN} 52 53.include <bsd.klinks.mk> 54.include <bsd.prog.mk> 55 56cleandir distclean: .WAIT cleanlibdir 57 58cleanlibdir: 59 -rm -rf lib 60 61release: check_RELEASEDIR 62 ${HOST_INSTALL_FILE} -m ${BINMODE} ${PROG} \ 63 ${RELEASEDIR}/${MACHINE}/installation 64