Home | History | Annotate | Line # | Download | only in boot64
Makefile revision 1.6.2.1
      1  1.6.2.1  uebayasi #	$NetBSD: Makefile,v 1.6.2.1 2010/08/17 06:45:12 uebayasi Exp $
      2      1.1    sekiya 
      3      1.1    sekiya PROG=	ip30boot
      4      1.1    sekiya 
      5      1.1    sekiya SRCS=	start64.S boot.c bootinfo.c conf.c devopen.c putchar.c getchar.c \
      6      1.1    sekiya 	getopt.c disk.c
      7      1.1    sekiya 
      8      1.1    sekiya CLEANFILES+=	boot.map
      9      1.1    sekiya 
     10      1.1    sekiya .include <bsd.sys.mk>		# for HOST_SH
     11      1.1    sekiya 
     12      1.1    sekiya # $S must correspond to the top of the 'sys' tree
     13      1.1    sekiya S=	${.CURDIR}/../../../..
     14      1.1    sekiya 
     15      1.1    sekiya BINMODE?=	444
     16      1.1    sekiya 
     17      1.1    sekiya realall: ${PROG}
     18      1.1    sekiya 
     19      1.1    sekiya .PATH:		${.CURDIR}/../common
     20      1.1    sekiya AFLAGS+=	-D_LOCORE -D_KERNEL -mno-abicalls -mabi=64 -D_LP64
     21      1.1    sekiya CPPFLAGS+=	-nostdinc -D_STANDALONE -DNO_ABICALLS -I${.OBJDIR} -I${S}
     22      1.1    sekiya # compiler flags for smallest code size
     23      1.1    sekiya CFLAGS=		-ffreestanding -Os -Wall -Werror -mno-abicalls -msoft-float -G 1024 -mabi=64 -D_LP64
     24      1.1    sekiya LDBUG=		-T $S/arch/mips/conf/stand.ldscript
     25      1.1    sekiya NETBSD_VERS!=	${HOST_SH} ${.CURDIR}/../../../../conf/osrelease.sh
     26      1.1    sekiya CPPFLAGS+=	-DNETBSD_VERS='"${NETBSD_VERS}"'
     27      1.1    sekiya 
     28      1.1    sekiya CPPFLAGS+=	-Dsgimips
     29      1.1    sekiya 
     30      1.1    sekiya # PROG set by parent.
     31      1.1    sekiya NOMAN=		# defined
     32      1.1    sekiya 
     33      1.1    sekiya # We load the kernel at 420K in from the start of RAM to give the boot
     34      1.1    sekiya # loader plenty of breathing room.  Load the boot loader starting at
     35      1.1    sekiya # the second page of RAM.
     36      1.1    sekiya 
     37      1.1    sekiya LOAD_ADDRESS_IP30?=	0xa800000020080000
     38      1.1    sekiya 
     39      1.1    sekiya # if there is a 'version' file, add rule for vers.c and add it to SRCS
     40      1.1    sekiya # and CLEANFILES
     41      1.1    sekiya .if exists(version)
     42      1.1    sekiya .PHONY: vers.c
     43      1.1    sekiya vers.c: ${.CURDIR}/version
     44      1.5   tsutsui 	${HOST_SH} ${S}/conf/newvers_stand.sh ${.CURDIR}/version "sgimips"
     45      1.1    sekiya 
     46      1.1    sekiya SRCS+=	vers.c
     47      1.1    sekiya CLEANFILES+= vers.c
     48      1.1    sekiya .endif
     49      1.1    sekiya 
     50      1.1    sekiya ### find out what to use for libkern
     51      1.1    sekiya KERN_AS=	library
     52      1.2     skrll KERNMISCMAKEFLAGS+=	LD="${LD} -m elf64btsmip" RANLIB="true"
     53      1.1    sekiya .include "${S}/lib/libkern/Makefile.inc"
     54      1.1    sekiya LIBKERN=	${KERNLIB}
     55      1.1    sekiya 
     56      1.1    sekiya ### find out what to use for libz
     57      1.1    sekiya Z_AS=		library
     58      1.2     skrll ZMISCMAKEFLAGS+=	LD="${LD} -m elf64btsmip" RANLIB="true"
     59      1.1    sekiya .include "${S}/lib/libz/Makefile.inc"
     60      1.1    sekiya LIBZ=		${ZLIB}
     61      1.1    sekiya 
     62      1.1    sekiya ### find out what to use for libsa
     63      1.1    sekiya SA_AS=		library
     64      1.1    sekiya SAMISCMAKEFLAGS+=	SA_USE_LOADFILE=yes SA_USE_CREAD=yes \
     65      1.2     skrll 			LD="${LD} -m elf64btsmip" RANLIB="true"
     66      1.1    sekiya .include "${S}/lib/libsa/Makefile.inc"
     67      1.1    sekiya LIBSA=		${SALIB}
     68      1.1    sekiya 
     69      1.1    sekiya 
     70      1.1    sekiya LIBS=		${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN}
     71      1.1    sekiya 
     72      1.1    sekiya ip30boot: ${OBJS} ${LIBS}
     73      1.2     skrll 	${LD} -m elf64btsmip -Map boot.map -x -Ttext ${LOAD_ADDRESS_IP30} \
     74      1.4   tsutsui 		${LDBUG} -e start -o ${.TARGET} ${OBJS} ${LIBS}
     75      1.1    sekiya 
     76  1.6.2.1  uebayasi cleandir distclean: .WAIT cleanlibdir
     77      1.6   tsutsui cleanlibdir:
     78      1.6   tsutsui 	-rm -rf lib
     79      1.6   tsutsui 
     80      1.6   tsutsui .include <bsd.klinks.mk>
     81      1.1    sekiya .include <bsd.prog.mk>
     82