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