1 # $NetBSD: Makefile,v 1.4 2010/05/27 06:58:15 dholland Exp $ 2 3 PROG= zboot 4 5 S= ${.CURDIR}/../../../.. 6 7 SRCS= crt0.c 8 SRCS+= boot.c bootinfo.c bootmenu.c conf.c devopen.c diskprobe.c 9 SRCS+= loadfile_zboot.c 10 SRCS+= getsecs.c termios.c unixcons.c unixdev.c unixsys.S 11 12 NOMAN= # defined 13 14 CFLAGS+= -Wall -Wno-main 15 CFLAGS+= -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith 16 CFLAGS+= -fno-stack-protector -fno-builtin -ffreestanding 17 CPPFLAGS+= -nostdinc -I. -I${.CURDIR} -I${.OBJDIR} -I${S} 18 CPPFLAGS+= -D_STANDALONE -DHEAP_VARIABLE 19 AFLAGS+= -D_LOCORE 20 LDFLAGS+= -nostdlib -Bstatic 21 22 CLEANFILES+= vers.c vers.o 23 24 LIBCRT0= crt0.o 25 LIBC= # nothing 26 LIBCRTBEGIN= # nothing 27 LIBCRTEND= # nothing 28 29 NEWVERSWHAT?= "Boot" 30 VERSIONFILE?= ${.CURDIR}/version 31 32 ### find out what to use for libkern 33 KERN_AS= library 34 .include "${S}/lib/libkern/Makefile.inc" 35 LIBKERN= ${KERNLIB} 36 37 ### find out what to use for libz 38 Z_AS= library 39 .include "${S}/lib/libz/Makefile.inc" 40 LIBZ= ${ZLIB} 41 42 ### find out what to use for libsa 43 SA_AS= library 44 SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes 45 .include "${S}/lib/libsa/Makefile.inc" 46 LIBSA= ${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 56 cleandir distclean: .WAIT cleanlibdir 57 58 cleanlibdir: 59 -rm -rf lib 60 61 release: check_RELEASEDIR 62 ${HOST_INSTALL_FILE} -m ${BINMODE} ${PROG} \ 63 ${RELEASEDIR}/${MACHINE}/installation 64