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