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