Makefile revision 1.11
1# $NetBSD: Makefile,v 1.11 2014/01/16 01:15:34 christos Exp $ 2# @(#)Makefile 8.2 (Berkeley) 8/15/93 3 4NOMAN= # defined 5 6.include <bsd.own.mk> 7 8S= ${.CURDIR}/../../../.. 9LIBSADIR= ${S}/lib/libsa 10 11CPPFLAGS+= -nostdinc -D_STANDALONE 12CPPFLAGS+= -I${.CURDIR} -I${.OBJDIR} -I${S} -I${S}/arch 13 14CPPFLAGS+= -DSUPPORT_DISK 15#CPPFLAGS+= -DSUPPORT_TAPE 16CPPFLAGS+= -DSUPPORT_ETHERNET 17CPPFLAGS+= -DSUPPORT_DHCP -DSUPPORT_BOOTP 18#CPPFLAGS+= -DBOOTP_DEBUG -DNETIF_DEBUG -DETHER_DEBUG -DNFS_DEBUG 19#CPPFLAGS+= -DRPC_DEBUG -DRARP_DEBUG -DNET_DEBUG -DDEBUG -DPARANOID 20CPPFLAGS+= -DLIBSA_ENABLE_LS_OP 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 29TEXTADDR= 700000 30LDSCRIPT= ${.CURDIR}/boot.ldscript 31LINKFORMAT= -static -N -Ttext ${TEXTADDR} -T ${LDSCRIPT} 32 33SRCS= locore.S 34SRCS+= init_main.c autoconf.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 awaitkey.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