1 1.22 mhitch # $NetBSD: Makefile,v 1.22 2001/03/02 16:46:19 mhitch Exp $ 2 1.1 is 3 1.2 is ### what we need: 4 1.1 is 5 1.10 is DIR_TOP= ${.CURDIR}/../../../../.. 6 1.10 is DIR_SA = ${DIR_TOP}/lib/libsa 7 1.10 is DIR_KERN= ${DIR_TOP}/lib/libkern 8 1.10 is DIR_KERN_MD= ${DIR_TOP}/lib/libkern/arch/$(MACHINE_ARCH) 9 1.1 is 10 1.2 is .PATH: $(DIR_SA) $(DIR_KERN) $(DIR_KERN_MD) 11 1.1 is 12 1.2 is # prefer our assembler versions over assembler, and assembler over C: 13 1.1 is 14 1.2 is .SUFFIXES: 15 1.2 is .SUFFIXES: .out .o .po .so .s .S .c .cc .C .f .y .l .ln .m4 .sh 16 1.1 is 17 1.16 veego FILES= xxboot fdboot 18 1.13 veego BINDIR=/usr/mdec 19 1.1 is 20 1.15 is COBJS = main.o console.o xd.o twiddle.o bzero.o gets.o 21 1.19 is COBJS+= lseek.o open.o read.o close.o dev.o errno.o 22 1.2 is COBJS+= ufs.o 23 1.1 is 24 1.2 is SOBJS = alloc.o ashrdi3.o bcopy.o muldi3.o printf.o startit.o 25 1.2 is SOBJS += strlen.o strcmp.o 26 1.2 is SOBJS += libstubs.o 27 1.1 is 28 1.2 is OBJS= $(SOBJS) $(COBJS) 29 1.1 is 30 1.17 is DEFS = -D_STANDALONE -DINSECURE 31 1.1 is 32 1.2 is ### main target: ### 33 1.1 is 34 1.21 is realall: ${FILES} 35 1.1 is 36 1.18 tron .include <bsd.prog.mk> 37 1.18 tron 38 1.2 is ### special rules for bootblocks ### 39 1.1 is 40 1.20 is INCPATH = -nostdinc -I${DIR_TOP} -I${DIR_TOP}/lib/libsa -I${.CURDIR} -I${.CURDIR}/../../.. -I${.CURDIR}/../aout2bb -I${DESTDIR}/usr/include 41 1.10 is 42 1.2 is AFLAGS += -m68030 -l 43 1.10 is CAFLAGS += -Wa,-l -Wa,-m68030 ${INCPATH} 44 1.1 is 45 1.14 chopps COPTIM= -O -fomit-frame-pointer -fcse-follow-jumps -fcse-skip-blocks -Wa,-l -m68060 -Wa,-m68030 46 1.18 tron CFLAGS= ${COPTIM} ${INCPATH} ${DEFS} -Wall #-Wstrict-prototypes 47 1.1 is 48 1.2 is .c.o: 49 1.18 tron ${CC} ${CFLAGS} -S $< -o $*.s 50 1.18 tron ${TXLT} < $*.s | ${AS} ${AFLAGS} -o $*.o 51 1.2 is rm $*.s 52 1.1 is 53 1.18 tron .s.o: ; ${CC} ${CAFLAGS} ${COPTS} -x assembler-with-cpp -o $@ -c $< 54 1.1 is 55 1.18 tron .S.o: ; ${CC} ${CAFLAGS} ${COPTS} -x assembler-with-cpp -o $@ -c $< 56 1.1 is 57 1.3 is CLEANFILES += xxboot fdboot x.out f.out xxstart.o fdstart.o libboot.a 58 1.1 is 59 1.1 is xxboot: x.out 60 1.22 mhitch ${AOUT2BB} x.out $@ || ${NM} -u x.out 61 1.1 is 62 1.1 is fdboot: f.out 63 1.22 mhitch ${AOUT2BB} f.out $@ || ${NM} -u f.out 64 1.2 is 65 1.2 is x.out: xxstart.o libboot.a 66 1.18 tron ${LD} ${LDFLAGS} -r -dc -e _start -o $@ $> 67 1.22 mhitch ${SIZE} $@ 68 1.22 mhitch ${NM} -u $@ 69 1.2 is 70 1.2 is f.out: fdstart.o libboot.a 71 1.18 tron ${LD} ${LDFLAGS} -r -dc -e _start -o $@ $> 72 1.22 mhitch ${SIZE} $@ 73 1.22 mhitch ${NM} -u $@ 74 1.2 is 75 1.2 is xxstart.o: ${.CURDIR}/bbstart.s 76 1.18 tron ${CC} ${CAFLAGS} ${COPTS} -x assembler-with-cpp \ 77 1.2 is -o $@ -c $> 78 1.2 is 79 1.2 is fdstart.o: ${.CURDIR}/bbstart.s 80 1.18 tron ${CC} -DAUTOLOAD=8192 ${CAFLAGS} ${COPTS} -x assembler-with-cpp \ 81 1.2 is -o $@ -c $> 82 1.1 is 83 1.18 tron libboot.a: ${OBJS} 84 1.18 tron ${AR} r $@ $> && ${RANLIB} $@ 85 1.2 is 86 1.10 is # make sure these are built: 87 1.2 is 88 1.10 is ${COBJS}: ${TXLT} 89 1.13 veego ${FILES}: ${AOUT2BB} 90