Home | History | Annotate | Line # | Download | only in stand
Makefile revision 1.4
      1 #	$NetBSD: Makefile,v 1.4 1994/11/20 20:54:49 deraadt Exp $
      2 
      3 #	@(#)Makefile	8.1 (Berkeley) 6/10/93
      4 
      5 DESTDIR=
      6 
      7 RELOC_SUN4=	240000
      8 RELOC_SUN4C=	340000
      9 RELOC_SUN4M=	440000
     10 
     11 RELOC?=		${RELOC_SUN4C}
     12 
     13 DEFS= -DSTANDALONE
     14 CFLAGS=	-O2 ${INCPATH} ${DEFS}
     15 
     16 SRCS=   boot.c filesystem.c promdev.c version.c
     17 XXSRCS=	bootxx.c promdev.c
     18 
     19 S=	${.CURDIR}/../../..
     20 
     21 .PATH: ${S}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
     22 .PATH: ${S}/stand ${S}/lib/libsa
     23 
     24 INCPATH=-I${.CURDIR} -I${S}/arch -I${S} -I${S}/lib/libsa
     25 
     26 ### find out what to use for libkern and libsa
     27 .include "$S/lib/libkern/Makefile.inc"
     28 LIBKERN= ${KERNLIB}
     29 .include "$S/lib/libsa/Makefile.inc"
     30 LIBSA=	${SA_LIB}
     31 
     32 LIBS=	${LIBSA} ${LIBKERN}
     33 
     34 BOOTS=	boot bootxx
     35 ALL=	${BOOTS} installboot
     36 
     37 all: ${ALL}
     38 
     39 ${BOOTS}: ${LIBS} .NOTMAIN
     40 
     41 OBJS=	${SRCS:N*.h:R:S/$/.o/g}
     42 XXOBJS=	${XXSRCS:N*.h:R:S/$/.o/g}
     43 
     44 # depend on DEFS
     45 
     46 srt0.o: Makefile
     47 
     48 # startups
     49 
     50 srt0.o: ${.CURDIR}/srt0.S
     51 	${CC} ${INCPATH} ${DEFS} -c ${.CURDIR}/srt0.S
     52 
     53 # new boot
     54 boot:	srt0.o ${OBJS} ${LIBS} fixhdr
     55 	${LD} -N -T ${RELOC} -e start srt0.o ${OBJS} ${LIBS} -o $@
     56 	${.OBJDIR}/fixhdr $@
     57 	@size $@
     58 
     59 bootxx:	srt0.o ${XXOBJS} ${LIBS} fixhdr
     60 	${LD} -N -T ${RELOC} -e start srt0.o ${XXOBJS} ${LIBS} -o $@
     61 	${.OBJDIR}/fixhdr $@
     62 	@size $@
     63 
     64 installboot: ${.CURDIR}/installboot.c
     65 	${CC} ${CFLAGS} -o installboot ${.CURDIR}/installboot.c
     66 
     67 # utilities
     68 
     69 fixhdr: fixhdr.c
     70 	${CC} -o fixhdr ${.CURDIR}/fixhdr.c
     71 
     72 clean cleandir:
     73 	rm -f *.o errs make.out
     74 	rm -f a.out boot cat ls fixhdr
     75 
     76 .include <bsd.dep.mk>
     77 .include <bsd.obj.mk>
     78 
     79