1 # $NetBSD: Makefile,v 1.8 2006/04/07 19:38:58 mrg Exp $
6 S
= ${.CURDIR
}/..
/..
/..
/..
/
12 SRCS
= start.S main.c com.c conf.c dev_flash.c dev_net.c \
13 devopen.c i28f128.c if_cs.c
15 #CPPFLAGS+= -DDEBUG -DNET_DEBUG -DNETIF_DEBUG -DARP_DEBUG \
16 # -DETHER_DEBUG -DBOOTP_DEBUG
20 NEWVERSWHAT
= "L-Card+ Boot"
21 VERSIONFILE
= ${S}/arch
/hpcmips
/stand
/lcboot
/version
24 # Make sure we override any optimization options specified by the user.
29 AFLAGS
+= -D_LOCORE
-D_KERNEL
30 AFLAGS
+= -x assembler-with-cpp
-traditional-cpp
-mips2
-mno-abicalls
31 INCLUDES
= -I
${.OBJDIR
} -I
${S} -I
${S}/arch
32 CPPFLAGS
+= ${INCLUDES} -nostdinc
-D_STANDALONE
-DHEAP_LIMIT
=0x8002ffff
33 CFLAGS
+= -mips2
-EL
-mno-abicalls
-ffreestanding
-mmemcpy
34 LD_SCRIPT
= lcboot.ldscript
36 .if defined
(ROMICE
) && (${ROMICE} == "yes")
40 .if
!make
(obj
) && !make
(clean) && !make
(cleandir
)
42 @
([ -h machine
] || ln
-s
${S}/arch
/${MACHINE}/include machine
)
43 @
[ -h mips
] || ln
-s
${S}/arch
/mips
/include mips
46 CLEANFILES
+= machine mips
50 ### find out what to use for libkern
51 .
include "${S}/lib/libkern/Makefile.inc"
54 ### find out what to use for libz
55 .
include "${S}/lib/libz/Makefile.inc"
58 ### find out what to use for libsa
59 SAMISCMAKEFLAGS
+="SA_USE_LOADFILE=yes"
60 SAMISCMAKEFLAGS
+="SA_USE_CREAD=yes"
61 .
include "${S}/lib/libsa/Makefile.inc"
64 LIBLIST
= ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} ${LIBSA}
66 # if there is a 'version' file, add rule for vers.c and add it to SRCS
68 .if exists
(${VERSIONFILE})
72 vers.c
: ${VERSIONFILE}
73 ${HOST_SH} ${S}/conf
/newvers_stand.sh
${.ALLSRC
} 'hpcmips' ${NEWVERSWHAT}
77 ${PROG}: ${OBJS} ${LIBKERN} ${LIBSA} ${LIBZ}
78 ${LD} -o
${PROG} -T
${LD_SCRIPT} ${OBJS} ${LIBLIST}
83 ${OBJCOPY} -S
-O srec
${PROG} ${SREC}
85 .
include <bsd.prog.mk
>