Makefile revision 1.2
1# from: @(#)Makefile 8.1 (Berkeley) 6/10/93 2# $Id: Makefile,v 1.2 1994/07/01 10:46:55 pk Exp $ 3 4DESTDIR= 5 6RELOC_SUN4= 240000 7RELOC_SUN4C= 340000 8RELOC_SUN4M= 440000 9 10RELOC= ${RELOC_SUN4C} 11 12DEFS= -DSTANDALONE -DCOMPAT_NOLABEL # -DROMPRF 13CFLAGS= -O2 ${INCPATH} ${DEFS} 14 15SRCS= boot.c filesystem.c promdev.c version.c 16#SRCS+= io.c strerror.c 17 18S= ${.CURDIR}/../../.. 19 20.PATH: ${S}/arch/${MACHINE_ARCH}/${MACHINE_ARCH} 21.PATH: ${S}/stand ${S}/lib/libsa 22 23INCPATH=-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" 27LIBKERN= ${KERNLIB} 28#KERNLIB= ${.CURDIR}/../compile/libkern.a 29 30.include "$S/lib/libsa/Makefile.inc" 31LIBSA= ${SA_LIB} 32 33LIBS= ${LIBSA} ${LIBKERN} 34 35BOOTS= boot 36ALL= ${BOOTS} 37 38all: ${ALL} 39 40${BOOTS}: ${LIBS} 41 42OBJS= ${SRCS:N*.h:R:S/$/.o/g} 43${.OBJDIR}/libdrive.a: ${OBJS} 44 ar crv $@ $? 45 ranlib $@ 46 47# depend on DEFS 48 49devopen.o machdep.o srt0.o: Makefile 50 51# startups 52 53srt0.o: ${.CURDIR}/srt0.S 54 ${CC} ${INCPATH} ${DEFS} -c ${.CURDIR}/srt0.S 55 56# new boot 57boot: 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 62bootconf.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 68mkboot: ${.CURDIR}/mkboot.c 69 ${CC} ${CFLAGS} -o mkboot ${.CURDIR}/mkboot.c 70 71installboot: ${.CURDIR}/installboot.c 72 ${CC} ${CFLAGS} -o installboot ${.CURDIR}/installboot.c 73 74# utilities 75 76fixhdr: fixhdr.c 77 ${CC} -o fixhdr ${.CURDIR}/fixhdr.c 78 79clean 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