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