# $OpenBSD: Makefile,v 1.2 1997/03/22 00:19:56 niklas Exp $ NOPROG= installboot MAN=installboot.8 SUBDIR=aout2bb txlt TXLT=txlt/txlt OBJS = configure.o main.o OBJS += console.o xd.o # libsa library replacements: OBJS += alloc.o printf.o twiddle.o # libkern replacements: OBJS += bcopy.o bzero.o ashrdi3.o muldi3.o # machine language startup code: OBJS += startit.o SRCS = installboot.sh configure.c main.c console.c xd.c SRCS+= twiddle.c SRCS+= bbstart.s libstubs.s alloc.s printf.s startit.s SRCS+= bcopy.s bzero.c ashrdi3.s muldi3.s CLEANFILES = $(OBJS) $(BOOTBLOCKS) x.out xxstart.s f.out fdstart.s S= ${.CURDIR}/../../../.. INCPATH=-I${.CURDIR} -I${.CURDIR}/../.. -I${S} -I${S}/lib/libsa COPTIM= -O2 -fomit-frame-pointer -fno-function-cse -Wa,-l -m68060 -Wa,-m68030 CFLAGS = ${COPTIM} ${INCPATH} ${DEFS} COPTS += -Wall -Wstrict-prototypes BOOTBLOCKS=xxboot # XXX fdboot is too large at the moment. .s.o: $(CC) $(CAFLAGS) $(COPTS) -x assembler-with-cpp -o $*.o -c \ ${.CURDIR}/$*.s #libs: .include "${.CURDIR}/libsa/Makefile.inc" LIBSA= ${SA_LIB} # libstubs should really be a library, but we don't care for now. LIBS= ${LIBSA} ${LIBKERN} libstubs.o all: $(BOOTBLOCKS) installboot $(OBJS): txlt xxstart.s: bbstart.s cpp ${.CURDIR}/bbstart.s > $@ fdstart.s: bbstart.s cpp -DAUTOLOAD=8192 ${.CURDIR}/bbstart.s > $@ x.out: xxstart.o $(OBJS) $(LIBS) $(LD) $(LDFLAGS) -r -dc -e _start -o x.out xxstart.o $(OBJS) $(LIBS) size x.out f.out: fdstart.o $(OBJS) $(LIBS) $(LD) $(LDFLAGS) -r -dc -e _start -o f.out fdstart.o $(OBJS) $(LIBS) size f.out $(BOOTBLOCKS): aout2bb xxboot: x.out rm -f $@ aout2bb/aout2bb x.out $@ || nm -u x.out fdboot: f.out rm -f $@ aout2bb/aout2bb -F f.out $@ || nm -u f.out clean:: rm -f $(OBJS) fdstart.[os] xxstart.[os] f.out x.out installboot install: all maninstall install -o $(BINOWN) -g $(BINGRP) $(BOOTBLOCKS) /usr/mdec install -o $(BINOWN) -g $(BINGRP) installboot /usr/sbin ci: ci -l $(SRCS) Makefile tar: (cd ..; tar \ --exclude '*.o' --exclude RCS --exclude .depend \ --exclude '*.out' --exclude fdstart.s --exclude xxstart.s \ --exclude aout2bb/aout2bb --exclude libsa.a \ -czvf boot.tar.gz boot) test: xxtest fdtest xxtest: xxboot dd if=$? of=/dev/rsd1e bs=8192 count=1 fdtest: fdboot dd if=$? of=/dev/rfd0a bs=8192 count=1 .include .include "Makefile.txlt"