Home | History | Annotate | Line # | Download | only in boot
Makefile revision 1.16.2.1
      1  1.16.2.1    bouyer # $NetBSD: Makefile,v 1.16.2.1 2017/04/21 16:53:22 bouyer Exp $
      2       1.1   tsutsui 
      3      1.16  christos .include <bsd.init.mk>
      4       1.1   tsutsui 
      5       1.1   tsutsui S!= cd ${.CURDIR}/../../../..; pwd
      6       1.1   tsutsui 
      7       1.1   tsutsui PROG= boot
      8       1.1   tsutsui MKMAN= no		# defined
      9       1.1   tsutsui STRIPFLAG=
     10       1.1   tsutsui BINMODE= 444
     11       1.1   tsutsui 
     12       1.1   tsutsui NETBSD_VERS!=	${HOST_SH} ${S}/conf/osrelease.sh
     13       1.1   tsutsui 
     14      1.12      matt .PATH:		${S}/dev/arcbios
     15      1.12      matt 
     16      1.12      matt SRCS=	start.S arcbios_calls.S
     17       1.1   tsutsui SRCS+=	boot.c bootinfo.c conf.c devopen.c disk.c getchar.c getopt.c putchar.c
     18       1.1   tsutsui 
     19      1.12      matt .include "${S}/dev/arcbios/Makefile.inc"
     20      1.12      matt 
     21       1.1   tsutsui # XXX SHOULD NOT NEED TO DEFINE THESE!
     22       1.1   tsutsui LIBCRT0=
     23      1.14   tsutsui LIBCRTI=
     24       1.1   tsutsui LIBC=
     25       1.1   tsutsui LIBCRTBEGIN=
     26       1.1   tsutsui LIBCRTEND=
     27       1.1   tsutsui 
     28      1.13       mrg AFLAGS=    -x assembler-with-cpp -mno-abicalls -mips2 -mabi=32
     29       1.1   tsutsui AFLAGS+=   -D_LOCORE -D_KERNEL
     30       1.1   tsutsui CFLAGS=    -Os -mmemcpy -G 1024
     31      1.12      matt CFLAGS+=   -ffreestanding -mno-abicalls -msoft-float -mips2 -mabi=32
     32       1.1   tsutsui CFLAGS+=   -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
     33       1.6   tsutsui CPPFLAGS+= -nostdinc -I. -I${S}
     34       1.1   tsutsui CPPFLAGS+= -D_STANDALONE -DNO_ABICALLS -D${MACHINE}
     35       1.1   tsutsui CPPFLAGS+= -DNETBSD_VERS='"${NETBSD_VERS}"'
     36       1.1   tsutsui #CPPFLAGS+= -DBOOT_DEBUG
     37       1.1   tsutsui LDSCRIPT=  ${S}/arch/mips/conf/stand.ldscript
     38       1.1   tsutsui TEXTADDR=  0x80f00000
     39      1.13       mrg LD+=		-m elf32ltsmip
     40       1.1   tsutsui 
     41       1.1   tsutsui ### find out what to use for libsa
     42       1.1   tsutsui SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes
     43       1.1   tsutsui .include "${S}/lib/libsa/Makefile.inc"
     44       1.1   tsutsui LIBSA=   ${SALIB}
     45       1.1   tsutsui 
     46       1.1   tsutsui ### find out what to use for libkern
     47       1.1   tsutsui .include "${S}/lib/libkern/Makefile.inc"
     48       1.1   tsutsui LIBKERN= ${KERNLIB}
     49       1.1   tsutsui 
     50       1.1   tsutsui ### find out what to use for libz
     51       1.1   tsutsui .include "${S}/lib/libz/Makefile.inc"
     52       1.1   tsutsui LIBZ=    ${ZLIB}
     53       1.1   tsutsui 
     54       1.1   tsutsui LIBS=  ${LIBSA} ${LIBKERN} ${LIBZ}
     55       1.1   tsutsui 
     56       1.9  dholland cleandir distclean: .WAIT cleanlibdir
     57       1.1   tsutsui cleanlibdir:
     58       1.1   tsutsui 	-rm -rf lib
     59       1.1   tsutsui 
     60       1.1   tsutsui ${PROG}: ${OBJS} ${LIBS}
     61       1.1   tsutsui 	${LD} -Map ${PROG}.map -N -x -Ttext ${TEXTADDR} -T ${LDSCRIPT} \
     62       1.1   tsutsui 	    -e start -o ${PROG}.elf ${OBJS} ${LIBS}
     63       1.1   tsutsui 	@${SIZE} ${PROG}.elf
     64       1.1   tsutsui 	${OBJCOPY} --impure -O ecoff-littlemips \
     65       1.1   tsutsui 	    -R .pdr -R .mdebug.abi32 -R .comment -R .ident \
     66       1.1   tsutsui 	    ${PROG}.elf ${.TARGET}
     67       1.1   tsutsui 
     68       1.1   tsutsui CLEANFILES+=	${PROG}.elf ${PROG}.map
     69       1.1   tsutsui 
     70  1.16.2.1    bouyer .include "${S}/conf/newvers_stand.mk"
     71  1.16.2.1    bouyer 
     72       1.7   tsutsui .include <bsd.klinks.mk>
     73       1.1   tsutsui .include <bsd.prog.mk>
     74