blob: 3f572bedddae284bb5ba50fe3e1d9d0b5b57e2cd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
HOSTCC=cc
HOSTCCFLAGS=-O
BCC=bcc
CC=$(BCC)
CFLAGS=-ansi -Ms -H0x10000 -s
ASFLAGS=-0 -w
MDEFS=
# LST=-l $*.lst
# CLST=-A-l -A$*.lst
default: makeboot makeboot.com monitor.out
all: default tgz bin
CSRC=minix.c
SSRC=sysboot.s \
tarboot.s skip.s com_bcc.s tich.s \
bootlist.s mbr.s msdos.s noboot.s
encap: $(SSRC:s=v) $(CSRC:c=v) minixhd.v
bin: $(SSRC:s=bin) $(CSRC:c=bin) minixhd.bin
MOBJ=monitor.o i86_funcs.o relocate.o help.o bzimage.o dosfs.o nofs.o
MSRC=monitor.c i86_funcs.c relocate.c help.c bzimage.c dosfs.c nofs.c
MINC=i86_funcs.h readfs.h
EXTRAS=minix.h elf_info.c elf_info.h standalone.c li86.s
install:
monitor.out: $(MOBJ)
$(CC) $(CFLAGS) $(MOBJ) -o monitor.out
$(MOBJ): $(MINC) version.h
monitor: $(MSRC) $(MINC)
@rm -f $(MOBJ)
make 'CFLAGS=-ansi' monitor.out
mv monitor.out monitor
@rm -f $(MOBJ)
minix.s: minix.c
$(BCC) -Mf -DDOTS -DTRY_FLOPPY $(MDEFS) -S minix.c
minixhd.s: minix.c
$(BCC) -Mf -DDOTS -DHARDDISK $(MDEFS) -S minix.c -o minixhd.s
makeboot: makeboot.c sysboot.v noboot.v skip.v msdos.v tarboot.v
$(HOSTCC) $(HOSTCCFLAGS) -o makeboot makeboot.c
makeboot.com: makeboot.c sysboot.v noboot.v skip.v msdos.v tarboot.v
$(BCC) -Md -o makeboot.com makeboot.c
version.h:
head -1 ../Libc_version | \
sed 's/\(.*\)/#define VERSION "\1"/' > version.h
clean realclean:
rm -f monitor makeboot bootblocks.tar.gz
rm -f minix.s minixhd.s version.h
rm -f *.com *.o *.bin *.out *.lst *.sym *.v *.tmp
tgz: minix.bin monitor.out makeboot.com makeboot
tar cfV bootblocks.tar ENIAC monitor.out \
README Makefile \
$(MSRC) \
$(MINC) \
makeboot.c $(CSRC) \
$(SSRC) \
makeboot.com minix.bin \
$(EXTRAS)
makeboot tar bootblocks.tar
gzip -f9 bootblocks.tar
distribution:
tar czf /tmp/bootblocks.tar.gz \
README Makefile $(MSRC) $(MINC) makeboot.c $(CSRC) $(SSRC) $(EXTRAS)
.SUFFIXES: .bin .v
.s.bin:
$(BCC) -W -c $*.s -A-u- -A-b -A$*.tmp -A-s -A$*.sym $(CLST)
mv $*.tmp $*.bin
-@rm $*.o
.s.v:
as86_encap $*.s $*.v $*_ $(ASFLAGS) $(LST)
|