Makefile revision 1.2
1# $NetBSD: Makefile,v 1.2 2013/01/09 16:28:41 tsutsui Exp $ 2# @(#)Makefile 8.2 (Berkeley) 8/15/93 3 4NOMAN= # defined 5 6.include <bsd.own.mk> 7.include <bsd.sys.mk> 8 9S= ${.CURDIR}/../../../.. 10 11CPPFLAGS+= -nostdinc -D_STANDALONE 12CPPFLAGS+= -I${.CURDIR} -I${.OBJDIR} -I${S} -I${S}/arch 13 14CPPFLAGS+= -DSUPPORT_DISK 15#CPPFLAGS+= -DSUPPORT_TAPE 16#CPPFLAGS+= -DSUPPORT_ETHERNET 17#CPPFLAGS+= -DSUPPORT_DHCP -DSUPPORT_BOOTP 18#CPPFLAGS+= -DBOOTP_DEBUG -DNETIF_DEBUG -DETHER_DEBUG -DNFS_DEBUG 19#CPPFLAGS+= -DRPC_DEBUG -DRARP_DEBUG -DNET_DEBUG -DDEBUG -DPARANOID 20 21CFLAGS= -Os -msoft-float 22CFLAGS+= -ffreestanding 23CFLAGS+= -Wall -Werror 24CFLAGS+= -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith 25CFLAGS+= -Wno-pointer-sign 26 27LDSCRIPT= ${.CURDIR}/boot.ldscript 28LINKFORMAT= -static -N -T ${LDSCRIPT} 29 30SRCS= locore.S 31SRCS+= init_main.c autoconf.c ioconf.c 32SRCS+= trap.c 33SRCS+= devopen.c 34SRCS+= conf.c 35SRCS+= machdep.c 36SRCS+= getline.c parse.c 37SRCS+= boot.c 38SRCS+= cons.c prf.c 39SRCS+= romcons.c 40SRCS+= sio.c 41SRCS+= bmc.c bmd.c screen.c font.c kbd.c 42SRCS+= scsi.c sc.c sd.c 43#SRCS+= st.c tape.c 44SRCS+= disklabel.c 45#SRCS+= fsdump.c 46SRCS+= ufs_disksubr.c 47 48PROG= boot 49 50NEWVERSWHAT= "${PROG}" 51 52SRCS+= vers.c 53CLEANFILES+= vers.c 54 55### find out what to use for libkern 56KERN_AS= library 57.include "${S}/lib/libkern/Makefile.inc" 58 59### find out what to use for libz 60Z_AS= library 61.include "${S}/lib/libz/Makefile.inc" 62 63### find out what to use for libsa 64SA_AS= library 65SAMISCMAKEFLAGS+=SA_USE_LOADFILE=yes SA_USE_CREAD=yes 66.include "${S}/lib/libsa/Makefile.inc" 67 68LIBS= ${SALIB} ${ZLIB} ${KERNLIB} 69 70.PHONY: vers.c 71vers.c: ${.CURDIR}/version 72 ${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \ 73 ${.CURDIR}/version ${MACHINE} ${NEWVERSWHAT} 74 75${PROG}: ${LDSCRIPT} ${OBJS} ${LIBS} 76 ${LD} ${LINKFORMAT} -x -o ${PROG}.elf ${OBJS} ${LIBS} 77 ${ELF2AOUT} ${PROG}.elf ${PROG}.aout 78 mv ${PROG}.aout ${PROG} 79 80CLEANFILES+= ${PROG}.map ${PROG}.elf ${PROG}.gz 81 82cleandir distclean: .WAIT cleanlibdir 83 84cleanlibdir: 85 -rm -rf lib 86 87.include <bsd.klinks.mk> 88.include <bsd.prog.mk> 89