Home | History | Annotate | Line # | Download | only in boot64
      1  1.15       rin #	$NetBSD: Makefile,v 1.15 2024/06/29 08:06:56 rin 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.15       rin 	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.13  christos .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 ### find out what to use for libkern
     45   1.1    sekiya KERN_AS=	library
     46   1.2     skrll KERNMISCMAKEFLAGS+=	LD="${LD} -m elf64btsmip" RANLIB="true"
     47   1.1    sekiya .include "${S}/lib/libkern/Makefile.inc"
     48   1.1    sekiya LIBKERN=	${KERNLIB}
     49   1.1    sekiya 
     50   1.1    sekiya ### find out what to use for libz
     51   1.1    sekiya Z_AS=		library
     52   1.2     skrll ZMISCMAKEFLAGS+=	LD="${LD} -m elf64btsmip" RANLIB="true"
     53   1.1    sekiya .include "${S}/lib/libz/Makefile.inc"
     54   1.1    sekiya LIBZ=		${ZLIB}
     55   1.1    sekiya 
     56   1.1    sekiya ### find out what to use for libsa
     57   1.1    sekiya SA_AS=		library
     58   1.1    sekiya SAMISCMAKEFLAGS+=	SA_USE_LOADFILE=yes SA_USE_CREAD=yes \
     59   1.2     skrll 			LD="${LD} -m elf64btsmip" RANLIB="true"
     60   1.1    sekiya .include "${S}/lib/libsa/Makefile.inc"
     61   1.1    sekiya LIBSA=		${SALIB}
     62   1.1    sekiya 
     63   1.1    sekiya 
     64   1.1    sekiya LIBS=		${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN}
     65   1.1    sekiya 
     66   1.1    sekiya ip30boot: ${OBJS} ${LIBS}
     67  1.10      matt 	${_MKTARGET_LINK}
     68   1.2     skrll 	${LD} -m elf64btsmip -Map boot.map -x -Ttext ${LOAD_ADDRESS_IP30} \
     69   1.4   tsutsui 		${LDBUG} -e start -o ${.TARGET} ${OBJS} ${LIBS}
     70  1.10      matt 	${SIZE} ${.TARGET}
     71   1.1    sekiya 
     72   1.7  dholland cleandir distclean: .WAIT cleanlibdir
     73   1.6   tsutsui cleanlibdir:
     74   1.6   tsutsui 	-rm -rf lib
     75   1.6   tsutsui 
     76  1.14  christos .include "${S}/conf/newvers_stand.mk"
     77  1.14  christos 
     78   1.6   tsutsui .include <bsd.klinks.mk>
     79   1.1    sekiya .include <bsd.prog.mk>
     80