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