# $NetBSD: Makefile,v 1.3 2011/01/26 13:36:49 nisimura Exp $ S= ${.CURDIR}/../../../.. PROG= altboot SRCS= entry.S main.c brdsetup.c pci.c devopen.c dev_net.c nif.c \ fxp.c tlp.c rge.c skg.c dsk.c pciide.c siisata.c printf.c CLEANFILES+= vers.c vers.o ${PROG} ${PROG}.bin CFLAGS+= -Wall -Wno-main -ffreestanding -msoft-float -mmultiple CFLAGS+= -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith CPPFLAGS+= -D_STANDALONE -DSUPPORT_DHCP #CPPFLAGS+= -DCONSNAME=\"com\" -DCONSPORT=0x3f8 -DCONSSPEED=115200 #CPPFLAGS+= -DCONSNAME=\"eumb\" -DCONSPORT=0x4600 -DCONSSPEED=57600 CPPFLAGS+= -nostdinc -I. -I${.OBJDIR} -I${S} DBG= -Os # XXX SHOULD NOT NEED TO DEFINE THESE! LIBCRT0= LIBC= LIBCRTBEGIN= LIBCRTEND= NOMAN= # defined STRIPFLAG= BINMODE= 444 RELOC= 1000000 ENTRY= _start .if !make(obj) && !make(clean) && !make(cleandir) .BEGIN: @[ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine @[ -h powerpc ] || ln -s ${S}/arch/powerpc/include powerpc .NOPATH: machine powerpc .endif CLEANFILES+= machine powerpc ### find out what to use for libkern KERN_AS= library .include "${S}/lib/libkern/Makefile.inc" LIBKERN= ${KERNLIB} ### find out what to use for libz Z_AS= library .include "${S}/lib/libz/Makefile.inc" LIBZ= ${ZLIB} ### find out what to use for libsa SA_AS= library SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes .include "${S}/lib/libsa/Makefile.inc" LIBSA= ${SALIB} ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN} ${HOST_SH} ${S}/conf/newvers_stand.sh -KD ${.CURDIR}/version sandpoint ${CC} -c vers.c ${LD} -N -Ttext ${RELOC} -Bstatic -e ${ENTRY} -o ${PROG} \ ${OBJS} vers.o ${LIBSA} ${LIBZ} ${LIBKERN} ${OBJCOPY} -S -O binary ${.TARGET} ${.TARGET}.bin .include cleandir distclean: .WAIT cleanlibdir cleanlibdir: -rm -rf lib