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