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