1 # from: @(#)Makefile 8.1 (Berkeley) 6/10/93 2 # $Id: Makefile,v 1.1 1994/02/26 10:57:09 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 -DCOMPAT_NOLABEL # -DROMPRF 13 CFLAGS= -O2 ${INCPATH} ${DEFS} 14 15 SRCS= boot.c promdev.c version.c 16 #SRCS+= io.c strerror.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${.CURDIR}/../.. -I${S} -I${S}/lib/libsa 24 25 ### find out what to use for libkern 26 .include "$S/lib/libkern/Makefile.inc" 27 LIBKERN= ${KERNLIB} 28 #KERNLIB= ${.CURDIR}/../compile/libkern.a 29 30 .include "$S/lib/libsa/Makefile.inc" 31 LIBSA= ${SA_LIB} 32 33 LIBS= ${LIBSA} ${LIBKERN} 34 35 BOOTS= boot 36 ALL= ${BOOTS} 37 38 all: ${ALL} 39 40 ${BOOTS}: ${LIBS} 41 42 OBJS= ${SRCS:N*.h:R:S/$/.o/g} 43 ${.OBJDIR}/libdrive.a: ${OBJS} 44 ar crv $@ $? 45 ranlib $@ 46 47 # depend on DEFS 48 49 devopen.o machdep.o srt0.o: Makefile 50 51 # startups 52 53 srt0.o: ${.CURDIR}/srt0.S 54 ${CC} ${INCPATH} ${DEFS} -c ${.CURDIR}/srt0.S 55 56 # new boot 57 boot: srt0.o ${OBJS} ${LIBS} fixhdr 58 ${LD} -N -T ${RELOC} -e start srt0.o ${OBJS} ${LIBS} -o $@ 59 ${.OBJDIR}/fixhdr boot 60 @size boot 61 62 bootconf.o: ${.CURDIR}/conf.c 63 rm -f bootconf.c 64 ln -s ${.CURDIR}/conf.c bootconf.c 65 ${CC} -c ${CFLAGS} -DBOOT bootconf.c 66 rm -f bootconf.c 67 68 mkboot: ${.CURDIR}/mkboot.c 69 ${CC} ${CFLAGS} -o mkboot ${.CURDIR}/mkboot.c 70 71 installboot: ${.CURDIR}/installboot.c 72 ${CC} ${CFLAGS} -o installboot ${.CURDIR}/installboot.c 73 74 # utilities 75 76 fixhdr: fixhdr.c 77 ${CC} -o fixhdr ${.CURDIR}/fixhdr.c 78 79 clean cleandir: 80 rm -f *.o errs make.out 81 rm -f a.out boot cat ls fixhdr 82 83 .include <bsd.dep.mk> 84 .include <bsd.obj.mk> 85 86