1 # $NetBSD: Makefile,v 1.18 2008/05/28 14:04:07 tsutsui Exp $
6 .
include <bsd.sys.mk
> # for HOST_SH
8 S
= ${.CURDIR
}/..
/..
/..
/..
10 COBALT
= ${S}/arch
/cobalt
11 LIBSADIR
= ${S}/lib
/libsa
13 # .PATH: ${.CURDIR}/../common
17 # XXX SHOULD NOT NEED TO DEFINE THESE!
25 # Load @15Mb boundary as most (all?) of the Cobalt boxes
26 # had been shipped with at least 16Mb.
28 # XXX The proper fix is to load at the kernel base address
29 # and to relocate itself at the end of available memory.
30 LOAD_ADDRESS?
=0x80F00000
36 ZSCHAN?
=0x01 # 0x01: ZS_CHAN_A, 0x00: ZS_CHAN_B
40 AFLAGS
+= -D_LOCORE
-D_KERNEL
-DASSEMBLER
-mno-abicalls
42 # -I${.CURDIR}/../.. done by Makefile.inc
43 CPPFLAGS
+= -nostdinc
-D_STANDALONE
-DNO_ABICALLS
-D_NO_PROM_DEFINES
45 CPPFLAGS
+= -I
${.OBJDIR
} -I
${S} -I
${S}/arch
-I
${LIBSADIR}
46 CPPFLAGS
+= -DCONS_SERIAL
-DCOMPORT
=${COMPORT}
47 CPPFLAGS
+= -DCOMSPEED
=${COMSPEED} -DCOMPROBE
=${COMPROBE}
48 CPPFLAGS
+= -DCONS_ZS
-DZSCHAN
=${ZSCHAN}
49 CPPFLAGS
+= -DZSSPEED
=${ZSSPEED} -DZSPROBE
=${ZSPROBE}
50 CPPFLAGS
+= -DSUPPORT_DHCP
-DSUPPORT_BOOTP
51 #CPPFLAGS+= -DBOOTP_DEBUG -DNETIF_DEBUG -DETHER_DEBUG -DNFS_DEBUG
52 #CPPFLAGS+= -DRPC_DEBUG -DRARP_DEBUG -DNET_DEBUG -DDEBUG -DPARANOID
54 # compiler flags for smallest code size
55 CFLAGS
= -Os
-mmemcpy
-ffreestanding
-mno-abicalls
-msoft-float
-G
128
57 CFLAGS
+= -Wall
-Werror
58 CFLAGS
+= -Wstrict-prototypes
-Wmissing-prototypes
-Wpointer-arith
59 CFLAGS
+= -Wno-pointer-sign
61 NETBSD_VERS
!= ${HOST_SH} ${S}/conf
/osrelease.sh
62 CPPFLAGS
+= -DNETBSD_VERS
='"${NETBSD_VERS}"'
64 LDSCRIPT?
= ${MIPS}/conf
/stand.ldscript
68 SRCS
+= start.S boot.c devopen.c conf.c clock.c bootinfo.c
69 SRCS
+= prf.c com.c cons.c ns16550.c pciide.c tgets.c wdc.c wd.c
71 SRCS
+= cache.c pci.c nif_tlp.c tlp.c
74 # XXX dev_net.c should really be in libsa, but it doesn't
75 # declare ip_convertaddr correctly.
82 ### find out what to use for libkern
84 .
include "${S}/lib/libkern/Makefile.inc"
86 ### find out what to use for libz
88 .
include "${S}/lib/libz/Makefile.inc"
90 ### find out what to use for libsa
92 SAMISCMAKEFLAGS
+=SA_USE_LOADFILE
=yes SA_USE_CREAD
=yes
93 .
include "${S}/lib/libsa/Makefile.inc"
95 LIBS
= ${SALIB} ${ZLIB} ${KERNLIB}
98 vers.c
: ${.CURDIR
}/version
99 ${HOST_SH} ${S}/conf
/newvers_stand.sh
${.CURDIR
}/version
"cobalt"
101 ${PROG}: ${LDSCRIPT} ${OBJS} ${LIBS}
102 ${LD} -Map
${PROG}.map
-N
-x
-Ttext
${LOAD_ADDRESS} \
103 -T
${LDSCRIPT} -e start
-o
${PROG} ${OBJS} ${LIBS}
104 gzip
-c9
${PROG} > ${PROG}.gz
107 CLEANFILES
+= ${PROG}.map
${PROG}.elf
${PROG}.gz
109 cleandir
distclean: cleanlibdir
114 .
include <bsd.klinks.mk
>
115 .
include <bsd.prog.mk
>