Sync usage with man page.
[netbsd-mini2440.git] / sys / arch / sandpoint / stand / netboot / Makefile
blob2eac839fa75f803b462defa82ca73376bf388416
1 # $NetBSD: Makefile,v 1.14 2009/01/12 08:06:54 tsutsui Exp $
3 S= ${.CURDIR}/../../../..
5 PROG= netboot
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}
17 DBG= -Os
19 # XXX SHOULD NOT NEED TO DEFINE THESE!
20 LIBCRT0=
21 LIBC=
22 LIBCRTBEGIN=
23 LIBCRTEND=
25 NOMAN= # defined
26 STRIPFLAG=
27 BINMODE= 444
29 RELOC= 1000000
30 ENTRY= _start
33 .if !make(obj) && !make(clean) && !make(cleandir)
34 .BEGIN:
35 @[ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine
36 @[ -h powerpc ] || ln -s ${S}/arch/powerpc/include powerpc
37 .NOPATH: machine powerpc
38 .endif
39 CLEANFILES+= machine powerpc
41 ### find out what to use for libkern
42 KERN_AS= library
43 .include "${S}/lib/libkern/Makefile.inc"
44 LIBKERN= ${KERNLIB}
46 ### find out what to use for libz
47 Z_AS= library
48 .include "${S}/lib/libz/Makefile.inc"
49 LIBZ= ${ZLIB}
51 ### find out what to use for libsa
52 SA_AS= library
53 SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes
54 .include "${S}/lib/libsa/Makefile.inc"
55 LIBSA= ${SALIB}
57 ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
58 ${HOST_SH} ${.CURDIR}/newvers.sh ${.CURDIR}/version
59 ${CC} -c vers.c
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
68 cleanlibdir:
69 -rm -rf lib