Home | History | Annotate | Line # | Download | only in boot
Makefile revision 1.29
      1  1.29       apb #	$NetBSD: Makefile,v 1.29 2014/08/05 15:40:59 apb Exp $
      2   1.3     lukem 
      3   1.4   tsutsui NOMAN= # defined
      4   1.4   tsutsui 
      5   1.4   tsutsui .include <bsd.own.mk>
      6   1.1       cdi 
      7   1.1       cdi S=	${.CURDIR}/../../../..
      8   1.1       cdi MIPS=	${S}/arch/mips
      9   1.1       cdi COBALT=	${S}/arch/cobalt
     10  1.12   tsutsui LIBSADIR=	${S}/lib/libsa
     11   1.1       cdi 
     12   1.1       cdi # .PATH:	${.CURDIR}/../common
     13   1.1       cdi 
     14   1.1       cdi BINMODE?= 444
     15   1.2    simonb 
     16   1.2    simonb # XXX SHOULD NOT NEED TO DEFINE THESE!
     17   1.2    simonb LIBCRT0=
     18  1.26   tsutsui LIBCRTI=
     19   1.2    simonb LIBC=
     20   1.2    simonb LIBCRTBEGIN=
     21   1.2    simonb LIBCRTEND=
     22   1.1       cdi 
     23  1.19   tsutsui realall: ${PROG}
     24   1.1       cdi 
     25   1.6       cdi # Load @15Mb boundary as most (all?) of the Cobalt boxes
     26   1.6       cdi # had been shipped with at least 16Mb.
     27   1.6       cdi #
     28   1.6       cdi # XXX The proper fix is to load at the kernel base address
     29   1.6       cdi # and to relocate itself at the end of available memory.
     30   1.6       cdi LOAD_ADDRESS?=0x80F00000
     31   1.1       cdi 
     32   1.1       cdi COMPORT?=0x0
     33   1.1       cdi COMSPEED?=115200
     34   1.1       cdi COMPROBE?=0xa020001c
     35   1.1       cdi 
     36  1.16   tsutsui ZSCHAN?=0x01		# 0x01: ZS_CHAN_A, 0x00: ZS_CHAN_B
     37  1.16   tsutsui ZSSPEED?=115200
     38  1.16   tsutsui ZSPROBE?=0xa020001c
     39  1.16   tsutsui 
     40   1.1       cdi AFLAGS+=	-D_LOCORE -D_KERNEL -DASSEMBLER -mno-abicalls
     41   1.1       cdi 
     42   1.1       cdi # -I${.CURDIR}/../.. done by Makefile.inc
     43   1.1       cdi CPPFLAGS+=	-nostdinc -D_STANDALONE -DNO_ABICALLS -D_NO_PROM_DEFINES
     44  1.20   tsutsui #CPPFLAGS+=	-D_DEBUG	\
     45  1.20   tsutsui #		-DLIBSA_PRINTF_LONGLONG_SUPPORT -DLIBSA_PRINTF_WIDTH_SUPPORT
     46  1.13   tsutsui CPPFLAGS+=	-I${.OBJDIR} -I${S} -I${S}/arch -I${LIBSADIR}
     47  1.17   tsutsui CPPFLAGS+=	-DCONS_SERIAL -DCOMPORT=${COMPORT}
     48   1.1       cdi CPPFLAGS+=	-DCOMSPEED=${COMSPEED} -DCOMPROBE=${COMPROBE}
     49  1.17   tsutsui CPPFLAGS+=	-DCONS_ZS -DZSCHAN=${ZSCHAN}
     50  1.16   tsutsui CPPFLAGS+=	-DZSSPEED=${ZSSPEED} -DZSPROBE=${ZSPROBE}
     51  1.12   tsutsui CPPFLAGS+=	-DSUPPORT_DHCP -DSUPPORT_BOOTP
     52  1.12   tsutsui #CPPFLAGS+=	-DBOOTP_DEBUG -DNETIF_DEBUG -DETHER_DEBUG -DNFS_DEBUG
     53  1.12   tsutsui #CPPFLAGS+=	-DRPC_DEBUG -DRARP_DEBUG -DNET_DEBUG -DDEBUG -DPARANOID
     54   1.1       cdi 
     55   1.1       cdi # compiler flags for smallest code size
     56  1.23      matt CFLAGS=		-O2 -mmemcpy -ffreestanding -mno-abicalls -msoft-float -G 128
     57  1.23      matt .if ${MACHINE_ARCH} == "mips64el"
     58  1.23      matt AFLAGS+=	-mips3 -mabi=32
     59  1.23      matt CFLAGS+=	-mips3 -mabi=32
     60  1.23      matt LINKFORMAT=	-m elf32ltsmip
     61  1.23      matt .endif
     62   1.1       cdi 
     63  1.15   tsutsui CFLAGS+=	-Wall -Werror
     64  1.15   tsutsui CFLAGS+=	-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
     65  1.15   tsutsui CFLAGS+=	-Wno-pointer-sign
     66  1.15   tsutsui 
     67   1.3     lukem NETBSD_VERS!=	${HOST_SH} ${S}/conf/osrelease.sh
     68   1.1       cdi CPPFLAGS+=	-DNETBSD_VERS='"${NETBSD_VERS}"'
     69   1.1       cdi 
     70   1.1       cdi LDSCRIPT?=	${MIPS}/conf/stand.ldscript
     71   1.1       cdi 
     72   1.1       cdi PROG=		boot
     73   1.1       cdi # common sources
     74   1.5       cdi SRCS+=		start.S boot.c devopen.c conf.c clock.c bootinfo.c
     75   1.7   tsutsui SRCS+=		prf.c com.c cons.c ns16550.c pciide.c tgets.c wdc.c wd.c
     76  1.16   tsutsui SRCS+=		zs.c
     77  1.14   tsutsui SRCS+=		cache.c pci.c nif_tlp.c tlp.c
     78  1.18   tsutsui SRCS+=		lcd.c
     79  1.12   tsutsui 
     80  1.12   tsutsui # XXX dev_net.c should really be in libsa, but it doesn't
     81  1.12   tsutsui #     declare ip_convertaddr correctly.
     82  1.12   tsutsui .PATH: ${LIBSADIR}
     83  1.12   tsutsui SRCS+=		dev_net.c
     84   1.1       cdi 
     85   1.1       cdi SRCS+=		vers.c
     86   1.1       cdi CLEANFILES+=	vers.c
     87   1.1       cdi 
     88   1.1       cdi ### find out what to use for libkern
     89   1.1       cdi KERN_AS=	library
     90   1.1       cdi .include "${S}/lib/libkern/Makefile.inc"
     91   1.1       cdi 
     92   1.1       cdi ### find out what to use for libz
     93   1.1       cdi Z_AS=		library
     94   1.1       cdi .include "${S}/lib/libz/Makefile.inc"
     95   1.1       cdi 
     96   1.1       cdi ### find out what to use for libsa
     97   1.1       cdi SA_AS=		library
     98   1.1       cdi SAMISCMAKEFLAGS+=SA_USE_LOADFILE=yes SA_USE_CREAD=yes
     99   1.1       cdi .include "${S}/lib/libsa/Makefile.inc"
    100   1.1       cdi 
    101  1.11       uwe LIBS=		${SALIB} ${ZLIB} ${KERNLIB}
    102   1.1       cdi 
    103   1.1       cdi .PHONY: vers.c
    104   1.1       cdi vers.c: ${.CURDIR}/version
    105  1.22     joerg 	${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \
    106  1.22     joerg 	    ${.CURDIR}/version "cobalt"
    107   1.1       cdi 
    108  1.19   tsutsui ${PROG}: ${LDSCRIPT} ${OBJS} ${LIBS}
    109  1.23      matt 	${LD} ${LINKFORMAT} -Map ${PROG}.map -N -x -Ttext ${LOAD_ADDRESS} \
    110   1.1       cdi 	    -T ${LDSCRIPT} -e start -o ${PROG} ${OBJS} ${LIBS}
    111  1.29       apb 	${TOOL_GZIP_N} -c9 ${PROG} > ${PROG}.gz
    112   1.1       cdi 	@${SIZE} ${PROG}
    113   1.1       cdi 
    114   1.1       cdi CLEANFILES+=	${PROG}.map ${PROG}.elf ${PROG}.gz
    115   1.1       cdi 
    116  1.21  dholland cleandir distclean: .WAIT cleanlibdir
    117   1.1       cdi 
    118   1.1       cdi cleanlibdir:
    119   1.8       jmc 	-rm -rf lib
    120   1.1       cdi 
    121  1.19   tsutsui .include <bsd.klinks.mk>
    122   1.1       cdi .include <bsd.prog.mk>
    123