Makefile revision 1.7
1#	$NetBSD: Makefile,v 1.7 1999/03/26 06:54:40 dbj Exp $
2
3S=	${.CURDIR}/../../../..
4
5### find out what to use for libkern
6KERN_AS=        library
7.include "${S}/lib/libkern/Makefile.inc"
8#LIBKERN=        ${KERNLIB}
9
10### find out what to use for libz
11Z_AS=           library
12.include "${S}/lib/libz/Makefile.inc"
13#LIBZ=           ${ZLIB}
14
15### find out what to use for libsa
16SA_AS=          library
17#SAMISCMAKEFLAGS= SA_USE_CREAD=yes
18.include "${S}/lib/libsa/Makefile.inc"
19#LIBSA=          ${SALIB}
20
21RELOC=	4380000
22
23# XXX make defs arch-indep.
24INCLUDES+=	-I${.CURDIR} -I${.CURDIR}/obj.${MACHINE} -I${S}/arch -I${S} -I${S}/lib/libsa -I${S}/lib/libkern
25DEFS+=		-D_STANDALONE -DMC68040 -DSUPPORT_BOOTP -DSUPPORT_DHCP  -DDEBUG -DSD_DEBUG -DSCSI_DEBUG # -DEN_DEBUG   -DNETIF_DEBUG  
26SAMISCCPPFLAGS=	-DSUPPORT_DHCP -DSUPPORT_BOOTP -DINSECURE # -DBOOTP_DEBUG -DETHER_DEBUG -DNET_DEBUG # -DNETIF_DEBUG -DNFS_DEBUG  -DARP_DEBUG 
27WARNS=1
28HAVE_GCC28!=	${CC} --version | egrep "^(2\.8|egcs)" ; echo 
29.if (${HAVE_GCC28} != "")
30CWARNFLAGS+=	-Wno-main
31.endif
32CFLAGS+=	 -nostdinc ${INCLUDES} ${DEFS}
33LIBCRT0=
34
35PROG=	boot
36SRCS=   boot.c machdep.c conf.c devopen.c rtc.c sd.c scsi.c en.c
37# @@@ dev_net.c should really be in libsa, but it doesn't
38# declare ip_convertaddr correctly, so I put it here _temporarily_.
39
40MKMAN=	no
41BINDIR=	/usr/mdec
42#LIBS=	${SALIB} ${KERNLIB} ${ZLIB}
43LIBS=	${SALIB} ${KERNLIB}
44
45OBJS+=	dev_net.o
46
47${PROG}: links srt0.o ${OBJS} vers.o ${LIBS}
48	${LD} -N -Ttext ${RELOC} -e start srt0.o ${OBJS} ${LIBS} vers.o -o $@
49	@${SIZE} $@
50
51# this looks useful to me ... let's see when it will be an official part
52# of libsa
53dev_net.o : ${S}/lib/libsa/dev_net.c
54	${COMPILE.c} ${.IMPSRC}
55
56# startup
57
58srt0.o: ${.CURDIR}/srt0.s
59	${CC} -m68040 ${INCPATH} ${DEFS} -c ${.CURDIR}/srt0.s
60
61vers.c: newvers
62newvers:
63	sh ${.CURDIR}/newvers.sh
64	${CC} ${CFLAGS} -c vers.c
65
66#installboot: ${.CURDIR}/installboot.sh
67#	@rm -f installboot
68#	cp -p ${.CURDIR}/installboot.sh installboot
69
70# utilities
71
72links:
73	rm -f machine
74	ln -s ${S}/arch/${MACHINE}/include machine
75	rm -f ${MACHINE_ARCH}
76	ln -s ${S}/arch/${MACHINE_ARCH}/include ${MACHINE_ARCH}
77	rm -f limits.h
78	ln -s machine/limits.h limits.h
79
80clean:
81	rm -f *.o errs core make.out
82	rm -f a.out boot cat ls
83	rm -f machine ${MACHINE_ARCH} limits.h
84
85.include <bsd.prog.mk>
86