9 CFLAGS
=-ansi
-Ms
-Oi
-O
$(DEFS
)
10 LDFLAGS
=-s
-i
-H0x10000
13 # CFLAGS=-ansi -Ms $(DEFS)
16 default
: makeboot makeboot.com monitor.sys minix_elks.bin lsys.com
18 all: bootbin bootsys default tgz
20 bootsys
: bootfile.sys boottar.sys bootminix.sys monitor.sys boot_win.sys
23 SSRC
=sysboot.s tarboot.s skip.s mbr.s msdos.s noboot.s \
24 boot_fpy.s killhd.s bb_linux.s bb_init1.s bb_init2.s
26 encap
: $(SSRC
:s
=v
) $(CSRC
:c
=v
) minixhd.v msdos16.v
27 bootbin
: $(SSRC
:s
=bin
) $(CSRC
:c
=bin
) minixhd.bin msdos16.bin minix_elks.bin
29 MOBJ
=monitor.o commands.o i86_funcs.o relocate.o help.o bzimage.o \
30 buffer.o unix.o fs.o fs_tar.o fs_min.o fs_dos.o
31 MSRC
=monitor.c commands.c i86_funcs.c relocate.c help.c bzimage.c \
32 buffer.c unix.c fs.c fs_tar.c fs_min.c fs_dos.c
33 MINC
=i86_funcs.h readfs.h monitor.h
35 BOOTBLOCKS
=sysboot.v noboot.v skip.v msdos.v msdos16.v \
36 tarboot.v minix.v minixhd.v mbr.v killhd.v
38 EXTRAS
=minix.h zimage.s minix_elks.c lsys.c boot_win.c
41 install -m
755 -s makeboot
$(DIST
)$(PREFIX
)/bin
/makeboot
44 $(CC
) $(CFLAGS
) $(LDFLAGS
) $(MONDEFS
) -d
$(MOBJ
) -o monitor.com
-M
> monitor.sym
47 $(CC
) $(CFLAGS
) $(LDFLAGS
) $(MONDEFS
) $(MOBJ
) -o monitor.out
-M
> monitor.sym
52 bootfile.sys
: $(MSRC
) $(MINC
)
54 make
'CFLAGS=$(CFLAGS) -DDOSFLOPPY' monitor.out
55 mv monitor.out bootfile.sys
58 boottar.sys
: $(MSRC
) $(MINC
) tarboot.bin
60 make
'CFLAGS=$(CFLAGS) -DTARFLOPPY' monitor.out
61 mv monitor.out boottar.sys
64 bootminix.sys
: $(MSRC
) $(MINC
) minix.bin
66 make
'CFLAGS=$(CFLAGS) -DMINFLOPPY' monitor.out
67 mv monitor.out bootminix.sys
70 monitor.sys
: $(MSRC
) $(MINC
)
73 mv monitor.out monitor.sys
76 monitor
: $(MSRC
) $(MINC
)
78 make
'CFLAGS=-ansi $(DEFS)' monitor.out
79 mv monitor.out monitor
82 bzimage.o
: bzimage.c zimage.v
84 minix.s
: minix.c Makefile
85 $(CC
) -Mf
-O
-DTRY_FLOPPY
$(MINIXDEFS
) -S minix.c
87 minix_elks.s
: minix_elks.c Makefile minix.v
88 $(CC
) -Mf
-O
$(MINIXDEFS
) -S minix_elks.c
90 minixhd.s
: minix.c Makefile
91 $(CC
) -Mf
-O
-DHARDDISK
$(MINIXDEFS
) -S minix.c
-o minixhd.s
94 sed
's/^fatbits=12/fatbits=16/' < msdos.s
> msdos16.s
97 sed
-e
's/^diskman=0/diskman=1/' \
98 -e
's/^message=1/message=0/' \
99 -e
's/^mbrkey=1/mbrkey=0/' \
100 -e
's/^preboot=1/preboot=0/' \
103 boot_win.sys
: boot_win.c
104 $(CC
) -Ms
-H0x6000
-s boot_win.c
-o boot_win.sys
106 makeboot
: makeboot.c
$(BOOTBLOCKS
)
107 $(HOSTCC
) $(HOSTCCFLAGS
) -o makeboot makeboot.c
109 makeboot.com
: makeboot.c
$(BOOTBLOCKS
)
110 $(CC
) -Md
-O
-o makeboot.com makeboot.c
112 lsys.com
: lsys.c msdos.v msdos16.v
113 $(CC
) -Md
-O
-o lsys.com lsys.c
116 rm -f bootfile.sys boottar.sys bootminix.sys monitor.sys boot_win.sys
117 rm -f monitor makeboot bootblocks.
tar.gz
118 rm -f minix.s minixhd.s minix_elks.s msdos16.s mbr_dm.s
119 rm -f
*.com
*.o
*.bin
*.out
*.lst
*.sym
*.v
*.tmp
121 tgz
: minix.bin monitor.sys makeboot.com makeboot
122 tar cfV bootblocks.
tar ENIAC monitor.sys \
128 makeboot.com minix.bin \
130 makeboot
tar bootblocks.
tar
131 gzip
-f9 bootblocks.
tar
134 tar czf
/tmp
/bootblocks.
tar.gz \
135 README Makefile
$(MSRC
) $(MINC
) makeboot.c
$(CSRC
) $(SSRC
) $(EXTRAS
)
140 $(AS86
) -w-
-0 -b
$*.bin
-s
$*.sym
$*.s
$(LST
)
143 as86_encap
$*.s
$*.v
$*_
$(ASFLAGS
) $(LST
)