No empty .Rs/.Re
[netbsd-mini2440.git] / sys / arch / ofppc / stand / ofwboot / Makefile
blob8b95a4250f28e9b5c7924f761bf81afae9046603
1 # $NetBSD: Makefile,v 1.24 2009/01/12 07:49:57 tsutsui Exp $
3 S!= cd ${.CURDIR}/../../../.. ; pwd
5 PROG= ofwboot
6 SRCS= ofwstart.S Locore.c boot.c ofdev.c net.c netif_of.c
7 SRCS+= mbr.c rdb.c vers.c
8 CFLAGS+= -msoft-float -Wno-main -ffreestanding
9 CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith
10 #CPPFLAGS+= -g -DALLOC_TRACE -DDEBUG #-DOFW_DEBUG -DNETIF_DEBUG
11 #CPPFLAGS+= -DOFWDUMP
12 CPPFLAGS+= -D_STANDALONE -DSUPPORT_DHCP -I${.CURDIR}
13 CPPFLAGS+= -DHEAP_VARIABLE
14 DBG= -Os -mmultiple
16 SRCS+= ofwmagic.S
17 .PATH: ${S}/arch/powerpc/powerpc
19 SRCS+= byteorder.c
20 .PATH: ${S}/lib/libsa
22 NOMAN= # defined
23 STRIPFLAG=
24 BINMODE= 444
26 # XXX SHOULD NOT NEED TO DEFINE THESE!
27 LIBCRT0=
28 LIBC=
29 LIBCRTBEGIN=
30 LIBCRTEND=
32 NEWVERSWHAT= "OpenFirmware Boot"
34 # For now...
35 RELOC= 20000
37 ENTRY= _start
39 CLEANFILES+= vers.c
41 CPPFLAGS+= -I. -I${S} -I${S}/../common/include
42 CPPFLAGS+= -DRELOC=0x${RELOC}
43 CPPFLAGS+= -DFIRMWORKSBUGS
44 CPPFLAGS+= -DCOMPAT_386BSD_MBRPART
46 .if !make(obj) && !make(clean) && !make(cleandir)
47 .BEGIN:
48 @[ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine
49 @[ -h powerpc ] || ln -s ${S}/arch/powerpc/include powerpc
50 .endif
51 .NOPATH: machine powerpc
52 CLEANFILES+= machine powerpc
54 ### find out what to use for libkern
55 KERN_AS= library
56 .include "${S}/lib/libkern/Makefile.inc"
57 LIBKERN= ${KERNLIB}
59 ### find out what to use for libz
60 Z_AS= library
61 .include "${S}/lib/libz/Makefile.inc"
62 LIBZ= ${ZLIB}
64 ### find out what to use for libsa
65 SA_AS= library
66 SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_USE_LOADFILE=yes
67 .include "${S}/lib/libsa/Makefile.inc"
68 LIBSA= ${SALIB}
70 .PHONY: vers.c
71 vers.c: version
72 ${HOST_SH} ${S}/conf/newvers_stand.sh ${.CURDIR}/version "ofppc" ${NEWVERSWHAT}
74 ${PROG}: ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
75 ${LD} -s -N -T ${.CURDIR}/ldscript -Ttext ${RELOC} -Bstatic \
76 -e ${ENTRY} -o ${PROG}.X ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
77 mv -f ${PROG}.X ${PROG}
79 .include <bsd.prog.mk>