1 # $NetBSD: Makefile,v 1.14 2009/01/12 08:06:54 tsutsui Exp $
3 S
= ${.CURDIR
}/..
/..
/..
/..
6 SRCS
= entry.S main.c brdsetup.c pci.c devopen.c dev_net.c nif.c \
7 fxp.c tlp.c rge.c printf.c
8 CLEANFILES
+= vers.c vers.o
${PROG} ${PROG}.bin
9 CFLAGS
+= -Wall
-Wno-main
-ffreestanding
-msoft-float
-mmultiple
10 CFLAGS
+= -Wmissing-prototypes
-Wstrict-prototypes
-Wpointer-arith
11 CPPFLAGS
+= -D_STANDALONE
-DSUPPORT_DHCP
12 CPPFLAGS
+= -DCONSNAME
=\"com
\" -DCONSPORT
=0x3f8 -DCONSSPEED
=115200
13 #CPPFLAGS+= -DCONSNAME=\"eumb\" -DCONSPORT=0x4600 -DCONSSPEED=57600
14 #CPPFLAGS+= -DTICKS_PER_SEC=(133333333/4)
15 #CPPFLAGS+= -DSTART_DDB_SESSION
16 CPPFLAGS
+= -nostdinc
-I.
-I
${.OBJDIR
} -I
${S}
19 # XXX SHOULD NOT NEED TO DEFINE THESE!
33 .if
!make
(obj
) && !make
(clean) && !make
(cleandir
)
35 @
[ -h machine
] || ln
-s
${S}/arch
/${MACHINE}/include machine
36 @
[ -h powerpc
] || ln
-s
${S}/arch
/powerpc
/include powerpc
37 .NOPATH
: machine powerpc
39 CLEANFILES
+= machine powerpc
41 ### find out what to use for libkern
43 .
include "${S}/lib/libkern/Makefile.inc"
46 ### find out what to use for libz
48 .
include "${S}/lib/libz/Makefile.inc"
51 ### find out what to use for libsa
53 SAMISCMAKEFLAGS
= SA_USE_CREAD
=yes SA_USE_LOADFILE
=yes
54 .
include "${S}/lib/libsa/Makefile.inc"
57 ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
58 ${HOST_SH} ${.CURDIR
}/newvers.sh
${.CURDIR
}/version
60 ${LD} -N
-Ttext
${RELOC} -Bstatic
-e
${ENTRY} -o
${PROG} \
61 ${OBJS} vers.o
${LIBSA} ${LIBZ} ${LIBKERN}
62 ${OBJCOPY} -S
-O binary
${.TARGET
} ${.TARGET
}.bin
64 .
include <bsd.prog.mk
>
66 cleandir
distclean: cleanlibdir