Home | History | Annotate | Line # | Download | only in boot
Makefile revision 1.1
      1  1.1  is NOPROG=	installboot
      2  1.1  is MAN=installboot.8
      3  1.1  is 
      4  1.1  is SUBDIR=aout2bb txlt
      5  1.1  is 
      6  1.1  is TXLT=txlt/txlt
      7  1.1  is 
      8  1.1  is OBJS = configure.o main.o
      9  1.1  is OBJS += console.o xd.o
     10  1.1  is 
     11  1.1  is # libsa library replacements:
     12  1.1  is OBJS += alloc.o printf.o twiddle.o
     13  1.1  is 
     14  1.1  is # libkern replacements:
     15  1.1  is OBJS += bcopy.o bzero.o ashrdi3.o muldi3.o
     16  1.1  is 
     17  1.1  is # machine language startup code:
     18  1.1  is OBJS += startit.o
     19  1.1  is 
     20  1.1  is SRCS = installboot.sh configure.c main.c console.c xd.c 
     21  1.1  is SRCS+= twiddle.c
     22  1.1  is SRCS+= bbstart.s libstubs.s alloc.s printf.s startit.s
     23  1.1  is SRCS+= bcopy.s bzero.c ashrdi3.s muldi3.s
     24  1.1  is 
     25  1.1  is CLEANFILES = $(OBJS) $(BOOTBLOCKS) x.out xxstart.s f.out fdstart.s
     26  1.1  is 
     27  1.1  is S=	${.CURDIR}/../../../..
     28  1.1  is INCPATH=-I${.CURDIR} -I${.CURDIR}/../.. -I${S} -I${S}/lib/libsa
     29  1.1  is COPTIM=	-O2 -fomit-frame-pointer -fno-function-cse -Wa,-l -m68060 -Wa,-m68030
     30  1.1  is CFLAGS = ${COPTIM} ${INCPATH} ${DEFS}
     31  1.1  is COPTS += -Wall -Wstrict-prototypes
     32  1.1  is 
     33  1.1  is BOOTBLOCKS=xxboot # XXX  fdboot is too large at the moment.
     34  1.1  is 
     35  1.1  is .s.o: ; $(CC) $(CAFLAGS) $(COPTS) -x assembler-with-cpp -o $*.o -c $*.s
     36  1.1  is 
     37  1.1  is #libs:
     38  1.1  is 
     39  1.1  is .include "${.CURDIR}/libsa/Makefile.inc"
     40  1.1  is LIBSA=  ${SA_LIB}
     41  1.1  is 
     42  1.1  is # libstubs should really be a library, but we don't care for now.
     43  1.1  is LIBS=	${LIBSA} ${LIBKERN} libstubs.o
     44  1.1  is 
     45  1.1  is all: $(BOOTBLOCKS) installboot
     46  1.1  is 
     47  1.1  is $(OBJS): txlt
     48  1.1  is 
     49  1.1  is xxstart.s: bbstart.s
     50  1.1  is 	cpp bbstart.s > $@
     51  1.1  is 	
     52  1.1  is fdstart.s: bbstart.s
     53  1.1  is 	cpp -DAUTOLOAD=8192 bbstart.s > $@
     54  1.1  is 
     55  1.1  is x.out: xxstart.o $(OBJS) $(LIBS)
     56  1.1  is 	$(LD) $(LDFLAGS) -r -dc -e _start -o x.out xxstart.o $(OBJS) $(LIBS)
     57  1.1  is 	size x.out
     58  1.1  is 
     59  1.1  is f.out: fdstart.o $(OBJS) $(LIBS)
     60  1.1  is 	$(LD) $(LDFLAGS) -r -dc -e _start -o f.out fdstart.o $(OBJS) $(LIBS)
     61  1.1  is 	size f.out
     62  1.1  is 
     63  1.1  is 
     64  1.1  is $(BOOTBLOCKS): aout2bb
     65  1.1  is 
     66  1.1  is xxboot: x.out
     67  1.1  is 	rm -f $@
     68  1.1  is 	aout2bb/aout2bb x.out $@ || nm -u x.out
     69  1.1  is 
     70  1.1  is fdboot: f.out
     71  1.1  is 	rm -f $@
     72  1.1  is 	aout2bb/aout2bb -F f.out $@ || nm -u f.out
     73  1.1  is 
     74  1.1  is clean::
     75  1.1  is 	rm -f $(OBJS) fdstart.[os] xxstart.[os] f.out x.out installboot
     76  1.1  is 
     77  1.1  is install: all maninstall
     78  1.1  is 	install -o $(BINOWN) -g $(BINGRP) $(BOOTBLOCKS) /usr/mdec
     79  1.1  is 	install -o $(BINOWN) -g $(BINGRP) installboot /usr/sbin
     80  1.1  is 
     81  1.1  is ci:
     82  1.1  is 	ci -l $(SRCS) Makefile
     83  1.1  is 
     84  1.1  is tar:
     85  1.1  is 	(cd ..; tar \
     86  1.1  is 		--exclude '*.o' --exclude RCS --exclude .depend \
     87  1.1  is 		--exclude '*.out' --exclude fdstart.s --exclude xxstart.s \
     88  1.1  is 		--exclude aout2bb/aout2bb --exclude libsa.a \
     89  1.1  is 		-czvf boot.tar.gz boot)
     90  1.1  is 
     91  1.1  is test: xxtest fdtest
     92  1.1  is 
     93  1.1  is xxtest: xxboot
     94  1.1  is 	dd if=$? of=/dev/rsd1e bs=8192 count=1
     95  1.1  is 
     96  1.1  is fdtest: fdboot
     97  1.1  is 	dd if=$? of=/dev/rfd0a bs=8192 count=1
     98  1.1  is 
     99  1.1  is .include <bsd.prog.mk>
    100  1.1  is .include "Makefile.txlt"
    101