No empty .Rs/.Re
[netbsd-mini2440.git] / sys / arch / hpcmips / stand / lcboot / Makefile
blob8226783b8de866e661347b7b82e53c8ea7ec6152
1 # $NetBSD: Makefile,v 1.8 2006/04/07 19:38:58 mrg Exp $
2 .include <bsd.own.mk>
4 ROMICE?= no
6 S= ${.CURDIR}/../../../../
8 PROG= lcboot.out
9 SREC= lcboot.srec
10 MKMAN= no
11 WARNS= 1
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
18 STARTOBJS=
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.
25 #COPTS= -Os
26 COPTS=
27 DBG=
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")
37 CPPFLAGS+= -DROMICE
38 .endif
40 .if !make(obj) && !make(clean) && !make(cleandir)
41 .BEGIN:
42 @([ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine)
43 @[ -h mips ] || ln -s ${S}/arch/mips/include mips
44 .NOPATH: machine
45 .endif
46 CLEANFILES+= machine mips
48 ${OBJS}: machine mips
50 ### find out what to use for libkern
51 .include "${S}/lib/libkern/Makefile.inc"
52 LIBKERN= ${KERNLIB}
54 ### find out what to use for libz
55 .include "${S}/lib/libz/Makefile.inc"
56 LIBZ= ${ZLIB}
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"
62 LIBSA= ${SALIB}
64 LIBLIST= ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} ${LIBSA}
66 # if there is a 'version' file, add rule for vers.c and add it to SRCS
67 # and CLEANFILES
68 .if exists (${VERSIONFILE})
69 SRCS+= vers.c
70 CLEANFILES+= vers.c
71 .PHONY: vers.c
72 vers.c: ${VERSIONFILE}
73 ${HOST_SH} ${S}/conf/newvers_stand.sh ${.ALLSRC} 'hpcmips' ${NEWVERSWHAT}
74 .endif
76 CLEANFILES+= ${PROG}
77 ${PROG}: ${OBJS} ${LIBKERN} ${LIBSA} ${LIBZ}
78 ${LD} -o ${PROG} -T ${LD_SCRIPT} ${OBJS} ${LIBLIST}
80 CLEANFILES+= ${SREC}
81 all: ${SREC}
82 ${SREC}: ${PROG}
83 ${OBJCOPY} -S -O srec ${PROG} ${SREC}
85 .include <bsd.prog.mk>