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