source: trunk/minix/boot/Makefile@ 21

Last change on this file since 21 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 2.5 KB
RevLine 
[9]1# Makefile for the boot monitor package.
2
3SYS = ..
4
5CC = exec cc
6CC86 = exec cc -mi86 -Was-ncc
7CFLAGS = -I$(SYS)
8LIBS = -lsys
9LD = $(CC) -s -.o
10LD86 = $(CC86) -.o
11BIN = /usr/bin
12MDEC = /usr/mdec
13
14all: bootblock boot edparams masterboot jumpboot installboot addaout
15dos: boot.com mkfile.com
16
17bootblock: bootblock.s
18 $(LD86) -com -o $@ bootblock.s
19
20masterboot: masterboot.s
21 $(LD86) -com -o $@ masterboot.s
22
23jumpboot: jumpboot.s
24 $(LD86) -com -o $@ jumpboot.s
25
26boot.o: boot.c
27 $(CC86) $(CFLAGS) -c boot.c
28
29bootimage.o: bootimage.c
30 $(CC86) $(CFLAGS) -c bootimage.c
31
32rawfs86.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
38boot: 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
43edparams.o: boot.c
44 ln -f boot.c edparams.c
45 $(CC) $(CFLAGS) -DUNIX -c edparams.c
46 rm edparams.c
47
48edparams: edparams.o rawfs.o
49 $(CC) $(CFLAGS) $(STRIP) -o $@ edparams.o rawfs.o
50 install -S 16kw edparams
51
52dosboot.o: boot.c
53 $(CC86) $(CFLAGS) -DDOS -o $@ -c boot.c
54
55doshead.o: doshead.s
56 $(CC) -mi386 -o $@ -c doshead.s
57
58dosboot: doshead.o dosboot.o bootimage.o rawfs86.o
59 $(LD86) -com -o $@ \
60 doshead.o dosboot.o bootimage.o rawfs86.o $(LIBS)
61
62boot.com: dosboot
63 ./a.out2com dosboot boot.com
64
65mkfile: mkfhead.s mkfile.c
66 $(LD) -.o -mi86 -com -o $@ mkfhead.s mkfile.c $(LIBS)
67
68mkfile.com: mkfile
69 ./a.out2com mkfile mkfile.com
70
71installboot: installboot.o rawfs.o
72 $(CC) $(STRIP) -o installboot installboot.o rawfs.o
73 install -S 6kw installboot
74
75addaout: addaout.o
76 $(CC) -o addaout addaout.o
77
78installboot.o bootimage.o: image.h
79boot.o bootimage.o dosboot.o edparams.o: boot.h
80rawfs.o rawfs86.o installboot.o boot.o bootimage.o: rawfs.h
81
82install: $(MDEC)/bootblock $(MDEC)/boot $(MDEC)/masterboot \
83 $(MDEC)/jumpboot $(BIN)/installboot $(BIN)/edparams
84dosinstall: $(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
113clean:
114 rm -f *.bak *.o
115 rm -f bootblock addaout installboot boot masterboot jumpboot edparams
116 rm -f dosboot boot.com mkfile mkfile.com
Note: See TracBrowser for help on using the repository browser.