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