Makefile revision 1.5
1# $NetBSD: Makefile,v 1.5 2011/01/27 04:54:40 nisimura Exp $ 2 3S= ${.CURDIR}/../../../.. 4 5PROG= altboot 6NOMAN= # defined 7SRCS= entry.S main.c brdsetup.c pci.c devopen.c dev_net.c nif.c \ 8 fxp.c tlp.c rge.c skg.c dsk.c pciide.c siisata.c printf.c 9CLEANFILES+= vers.c vers.o ${PROG} ${PROG}.bin 10CFLAGS+= -Wall -Wno-main -ffreestanding -msoft-float -mmultiple 11CFLAGS+= -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith 12CPPFLAGS+= -D_STANDALONE -DSUPPORT_DHCP 13#CPPFLAGS+= -DCONSNAME=\"com\" -DCONSPORT=0x3f8 -DCONSSPEED=115200 14#CPPFLAGS+= -DCONSNAME=\"eumb\" -DCONSPORT=0x4600 -DCONSSPEED=57600 15CPPFLAGS+= -nostdinc -I. -I${.OBJDIR} -I${S} 16DBG= -Os 17 18.include <bsd.own.mk> 19 20# XXX SHOULD NOT NEED TO DEFINE THESE! 21LIBCRT0= 22LIBC= 23LIBCRTBEGIN= 24LIBCRTEND= 25 26STRIPFLAG= 27BINMODE= 444 28 29RELOC= 1000000 30ENTRY= _start 31 32.if !make(obj) && !make(clean) && !make(cleandir) 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.endif 38CLEANFILES+= machine powerpc 39 40### find out what to use for libkern 41KERN_AS= library 42.include "${S}/lib/libkern/Makefile.inc" 43LIBKERN= ${KERNLIB} 44 45### find out what to use for libz 46Z_AS= library 47.include "${S}/lib/libz/Makefile.inc" 48LIBZ= ${ZLIB} 49 50### find out what to use for libsa 51SA_AS= library 52SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes 53.include "${S}/lib/libsa/Makefile.inc" 54LIBSA= ${SALIB} 55 56${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} 57 ${HOST_SH} ${S}/conf/newvers_stand.sh -K \ 58 ${${MKREPRO} == "yes" :?:-D} ${.CURDIR}/version sandpoint 59 ${CC} -c vers.c 60 ${LD} -N -Ttext ${RELOC} -Bstatic -e ${ENTRY} -o ${PROG} \ 61 ${OBJS} vers.o ${LIBSA} ${LIBZ} ${LIBKERN} 62 ${OBJCOPY} -S -O binary ${.TARGET} ${.TARGET}.bin 63 64.include <bsd.prog.mk> 65 66cleandir distclean: .WAIT cleanlibdir 67 68cleanlibdir: 69 -rm -rf lib 70