Makefile revision 1.20
1# $NetBSD: Makefile,v 1.20 2004/06/21 18:20:08 jmc Exp $ 2 3S= ${.CURDIR}/../../../.. 4 5BOOTPROG= boot 6NEWVERSWHAT= "BOOT" 7 8ASRCS+= srt0.s 9CSRCS+= boot.c clock.c com.c conf.c cons.c cpu.c devopen.c 10CSRCS+= fd.c filesystem.c inkernel.c io.c tgets.c prf.c monitor.c 11CSRCS+= kbd.c ns16550.c vreset.c vga.c video.c 12 13CLEANFILES+= vers.c vers.o ${BOOTPROG} 14 15COPTS+= -ffreestanding 16CPPFLAGS= -I. -I${.CURDIR} -I${.CURDIR}/../elf2pef -I${.CURDIR}/../../.. 17CPPFLAGS+= -I${S} -I${S}/lib/libsa 18CPPFLAGS+= -D_STANDALONE -DDBMONITOR -DRELOC=${RELOC} 19CPPFLAGS+= -DUSE_SCAN 20#CPPFLAGS+= -DCONS_BE 21CPPFLAGS+= -DCONS_VGA 22#CPPFLAGS+= -DCONS_SERIAL -DCOMSPEED=9600 -DCOMPORT=0x3F8 23 24AOBJS= ${ASRCS:.s=.o} 25COBJS= ${CSRCS:.c=.o} 26OBJS= ${AOBJS} ${COBJS} 27CFLAGS= -Wno-main 28AFLAGS= -x assembler-with-cpp -traditional-cpp 29NOMAN= # defined 30STRIPFLAG= 31BINMODE= 444 32 33RELOC= 0x700000 34 35.if !make(obj) && !make(clean) && !make(cleandir) 36.BEGIN: 37 @[ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine 38 @[ -h powerpc ] || ln -s ${S}/arch/powerpc/include powerpc 39.endif 40.NOPATH: machine powerpc 41CLEANFILES+= machine powerpc 42 43### find out what to use for libkern 44KERN_AS= library 45.include "${S}/lib/libkern/Makefile.inc" 46LIBKERN= ${KERNLIB} 47 48### find out what to use for libz 49Z_AS= library 50.include "${S}/lib/libz/Makefile.inc" 51LIBZ= ${ZLIB} 52 53### find out what to use for libsa 54SA_AS= library 55SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes 56.include "${S}/lib/libsa/Makefile.inc" 57LIBSA= ${SALIB} 58 59.PHONY: vers.c 60vers.c: version 61 ${HOST_SH} ${S}/conf/newvers_stand.sh ${.CURDIR}/version "bebox" ${NEWVERSWHAT} 62 63realall: ${BOOTPROG} 64 65${BOOTPROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} vers.o 66 ${LD} -o ${BOOTPROG} -s -N -T ${.CURDIR}/ld.script -Ttext ${RELOC} ${OBJS} \ 67 ${LIBSA} ${LIBZ} ${LIBKERN} vers.o 68 69cleandir distclean: cleanlibdir 70 71cleanlibdir: 72 -rm -rf lib 73 74.include <bsd.prog.mk> 75