Home | History | Annotate | Line # | Download | only in boot
Makefile revision 1.9
      1 #	$NetBSD: Makefile,v 1.9 2000/01/23 17:04:04 mycroft Exp $
      2 
      3 S= ${.CURDIR}/../../../..
      4 
      5 BOOTPROG= boot
      6 NEWVERSWHAT= "BOOT"
      7 
      8 ASRCS+= srt0.s
      9 CSRCS+= boot.c clock.c com.c conf.c cons.c cpu.c devopen.c
     10 CSRCS+= fd.c filesystem.c inkernel.c io.c tgets.c prf.c monitor.c
     11 CSRCS+= kbd.c ns16550.c vreset.c vga.c video.c
     12 
     13 CLEANFILES+= vers.c vers.o ${BOOTPROG} ${.CURDIR}/lib
     14 
     15 CPPFLAGS= -I${.CURDIR} -I${.CURDIR}/../elf2pef -I${.CURDIR}/../../..
     16 CPPFLAGS+= -I${S} -I${S}/lib/libsa
     17 CPPFLAGS+= -D_STANDALONE -DDBMONITOR -DRELOC=${RELOC}
     18 CPPFLAGS+= -DUSE_SCAN
     19 #CPPFLAGS+= -DCONS_BE
     20 CPPFLAGS+= -DCONS_VGA
     21 #CPPFLAGS+= -DCONS_SERIAL -DCOMSPEED=9600 -DCOMPORT=0x3F8
     22 
     23 AOBJS=	${ASRCS:.s=.o}
     24 COBJS=	${CSRCS:.c=.o}
     25 OBJS=	${AOBJS} ${COBJS}
     26 AFLAGS= -x assembler-with-cpp -traditional-cpp
     27 MKMAN=	no
     28 STRIPFLAG=
     29 BINMODE= 444
     30 
     31 RELOC= 0x700000
     32 
     33 .BEGIN:
     34 	@[ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine
     35 	@[ -h powerpc ] || ln -s ${S}/arch/powerpc/include powerpc
     36 .NOPATH: machine powerpc
     37 CLEANFILES+= machine powerpc
     38 
     39 ### find out what to use for libkern
     40 KERN_AS=	library
     41 .include "${S}/lib/libkern/Makefile.inc"
     42 LIBKERN=	${KERNLIB}
     43 
     44 ### find out what to use for libz
     45 Z_AS=		library
     46 .include "${S}/lib/libz/Makefile.inc"
     47 LIBZ=		${ZLIB}
     48 
     49 ### find out what to use for libsa
     50 SA_AS=		library
     51 SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes
     52 .include "${S}/lib/libsa/Makefile.inc"
     53 LIBSA=		${SALIB}
     54 
     55 realall: ${BOOTPROG}
     56 
     57 ${BOOTPROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
     58 	sh ${.CURDIR}/../newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
     59 	${COMPILE.c} vers.c
     60 	${LD} -o ${BOOTPROG} -s -N -T ld.script -Ttext ${RELOC} ${OBJS} \
     61 		${LIBSA} ${LIBZ} ${LIBKERN} vers.o
     62 
     63 remake: cleanobjs all
     64 cleanobjs:
     65 	rm -f ${OBJS}
     66 
     67 .include <bsd.prog.mk>
     68