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