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