[9] | 1 | # Makefile for the boot monitor package.
|
---|
| 2 |
|
---|
| 3 | SYS = ..
|
---|
| 4 |
|
---|
| 5 | CC = exec cc
|
---|
| 6 | CC86 = exec cc -mi86 -Was-ncc
|
---|
| 7 | CFLAGS = -I$(SYS)
|
---|
| 8 | LIBS = -lsys
|
---|
| 9 | LD = $(CC) -s -.o
|
---|
| 10 | LD86 = $(CC86) -.o
|
---|
| 11 | BIN = /usr/bin
|
---|
| 12 | MDEC = /usr/mdec
|
---|
| 13 |
|
---|
| 14 | all: bootblock boot edparams masterboot jumpboot installboot addaout
|
---|
| 15 | dos: boot.com mkfile.com
|
---|
| 16 |
|
---|
| 17 | bootblock: bootblock.s
|
---|
| 18 | $(LD86) -com -o $@ bootblock.s
|
---|
| 19 |
|
---|
| 20 | masterboot: masterboot.s
|
---|
| 21 | $(LD86) -com -o $@ masterboot.s
|
---|
| 22 |
|
---|
| 23 | jumpboot: jumpboot.s
|
---|
| 24 | $(LD86) -com -o $@ jumpboot.s
|
---|
| 25 |
|
---|
| 26 | boot.o: boot.c
|
---|
| 27 | $(CC86) $(CFLAGS) -c boot.c
|
---|
| 28 |
|
---|
| 29 | bootimage.o: bootimage.c
|
---|
| 30 | $(CC86) $(CFLAGS) -c bootimage.c
|
---|
| 31 |
|
---|
| 32 | rawfs86.o: rawfs.c rawfs.o
|
---|
| 33 | ln -f rawfs.c rawfs86.c
|
---|
| 34 | $(CC86) $(CFLAGS) -c rawfs86.c
|
---|
| 35 | rm rawfs86.c
|
---|
| 36 | -cmp -s rawfs.o rawfs86.o && ln -f rawfs.o rawfs86.o
|
---|
| 37 |
|
---|
| 38 | boot: boothead.s boot.o bootimage.o rawfs86.o
|
---|
| 39 | $(LD86) -o $@ \
|
---|
| 40 | boothead.s boot.o bootimage.o rawfs86.o $(LIBS)
|
---|
| 41 | install -S 8kb boot
|
---|
| 42 |
|
---|
| 43 | edparams.o: boot.c
|
---|
| 44 | ln -f boot.c edparams.c
|
---|
| 45 | $(CC) $(CFLAGS) -DUNIX -c edparams.c
|
---|
| 46 | rm edparams.c
|
---|
| 47 |
|
---|
| 48 | edparams: edparams.o rawfs.o
|
---|
| 49 | $(CC) $(CFLAGS) $(STRIP) -o $@ edparams.o rawfs.o
|
---|
| 50 | install -S 16kw edparams
|
---|
| 51 |
|
---|
| 52 | dosboot.o: boot.c
|
---|
| 53 | $(CC86) $(CFLAGS) -DDOS -o $@ -c boot.c
|
---|
| 54 |
|
---|
| 55 | doshead.o: doshead.s
|
---|
| 56 | $(CC) -mi386 -o $@ -c doshead.s
|
---|
| 57 |
|
---|
| 58 | dosboot: doshead.o dosboot.o bootimage.o rawfs86.o
|
---|
| 59 | $(LD86) -com -o $@ \
|
---|
| 60 | doshead.o dosboot.o bootimage.o rawfs86.o $(LIBS)
|
---|
| 61 |
|
---|
| 62 | boot.com: dosboot
|
---|
| 63 | ./a.out2com dosboot boot.com
|
---|
| 64 |
|
---|
| 65 | mkfile: mkfhead.s mkfile.c
|
---|
| 66 | $(LD) -.o -mi86 -com -o $@ mkfhead.s mkfile.c $(LIBS)
|
---|
| 67 |
|
---|
| 68 | mkfile.com: mkfile
|
---|
| 69 | ./a.out2com mkfile mkfile.com
|
---|
| 70 |
|
---|
| 71 | installboot: installboot.o rawfs.o
|
---|
| 72 | $(CC) $(STRIP) -o installboot installboot.o rawfs.o
|
---|
| 73 | install -S 6kw installboot
|
---|
| 74 |
|
---|
| 75 | addaout: addaout.o
|
---|
| 76 | $(CC) -o addaout addaout.o
|
---|
| 77 |
|
---|
| 78 | installboot.o bootimage.o: image.h
|
---|
| 79 | boot.o bootimage.o dosboot.o edparams.o: boot.h
|
---|
| 80 | rawfs.o rawfs86.o installboot.o boot.o bootimage.o: rawfs.h
|
---|
| 81 |
|
---|
| 82 | install: $(MDEC)/bootblock $(MDEC)/boot $(MDEC)/masterboot \
|
---|
| 83 | $(MDEC)/jumpboot $(BIN)/installboot $(BIN)/edparams
|
---|
| 84 | dosinstall: $(MDEC)/boot.com $(MDEC)/mkfile.com
|
---|
| 85 |
|
---|
| 86 | $(MDEC)/bootblock: bootblock
|
---|
| 87 | install -cs -o bin -m 644 $? $@
|
---|
| 88 |
|
---|
| 89 | $(MDEC)/boot: boot
|
---|
| 90 | install -cs -o bin -m 644 $? $@
|
---|
| 91 |
|
---|
| 92 | $(MDEC)/boot.com: boot.com
|
---|
| 93 | install -c -m 644 $? $@
|
---|
| 94 |
|
---|
| 95 | $(MDEC)/mkfile.com: mkfile.com
|
---|
| 96 | install -c -m 644 $? $@
|
---|
| 97 |
|
---|
| 98 | $(MDEC)/masterboot: masterboot
|
---|
| 99 | install -cs -o bin -m 644 $? $@
|
---|
| 100 |
|
---|
| 101 | $(MDEC)/jumpboot: jumpboot
|
---|
| 102 | install -cs -o bin -m 644 $? $@
|
---|
| 103 |
|
---|
| 104 | $(BIN)/installboot: installboot
|
---|
| 105 | install -cs -o bin $? $@
|
---|
| 106 |
|
---|
| 107 | $(BIN)/addaout: addaout
|
---|
| 108 | install -cs -o bin $? $@
|
---|
| 109 |
|
---|
| 110 | $(BIN)/edparams: edparams
|
---|
| 111 | install -cs -o bin $? $@
|
---|
| 112 |
|
---|
| 113 | clean:
|
---|
| 114 | rm -f *.bak *.o
|
---|
| 115 | rm -f bootblock addaout installboot boot masterboot jumpboot edparams
|
---|
| 116 | rm -f dosboot boot.com mkfile mkfile.com
|
---|