2005-04-21 16:53:53 +02:00
|
|
|
# Makefile for the boot monitor package.
|
|
|
|
|
|
|
|
SYS = ..
|
|
|
|
|
|
|
|
CC = exec cc
|
|
|
|
CC86 = exec cc -mi86 -Was-ncc
|
|
|
|
CFLAGS = -I$(SYS)
|
|
|
|
LIBS = -lsys
|
|
|
|
LD = $(CC) -s -.o
|
|
|
|
LD86 = $(CC86) -.o
|
|
|
|
BIN = /usr/bin
|
|
|
|
MDEC = /usr/mdec
|
|
|
|
|
2005-09-07 18:29:38 +02:00
|
|
|
all: bootblock boot edparams masterboot jumpboot installboot addaout
|
2005-04-21 16:53:53 +02:00
|
|
|
dos: boot.com mkfile.com
|
|
|
|
|
|
|
|
bootblock: bootblock.s
|
|
|
|
$(LD86) -com -o $@ bootblock.s
|
|
|
|
|
|
|
|
masterboot: masterboot.s
|
|
|
|
$(LD86) -com -o $@ masterboot.s
|
|
|
|
|
|
|
|
jumpboot: jumpboot.s
|
|
|
|
$(LD86) -com -o $@ jumpboot.s
|
|
|
|
|
|
|
|
boot.o: boot.c
|
|
|
|
$(CC86) $(CFLAGS) -c boot.c
|
|
|
|
|
|
|
|
bootimage.o: bootimage.c
|
|
|
|
$(CC86) $(CFLAGS) -c bootimage.c
|
|
|
|
|
|
|
|
rawfs86.o: rawfs.c rawfs.o
|
|
|
|
ln -f rawfs.c rawfs86.c
|
|
|
|
$(CC86) $(CFLAGS) -c rawfs86.c
|
|
|
|
rm rawfs86.c
|
|
|
|
-cmp -s rawfs.o rawfs86.o && ln -f rawfs.o rawfs86.o
|
|
|
|
|
|
|
|
boot: boothead.s boot.o bootimage.o rawfs86.o
|
2010-01-18 15:10:04 +01:00
|
|
|
$(LD86) -o bootexec \
|
2005-04-21 16:53:53 +02:00
|
|
|
boothead.s boot.o bootimage.o rawfs86.o $(LIBS)
|
2010-04-08 14:18:57 +02:00
|
|
|
install -S 22kb bootexec
|
2010-01-18 15:10:04 +01:00
|
|
|
# This is code that is executed when used on a bootable
|
|
|
|
# CD, as its entry point is the start of the file then.
|
|
|
|
# It jumps over the a.out header into the part of the
|
|
|
|
# code in boothead.s where the code knows it's booting
|
|
|
|
# from CD if entered there.
|
|
|
|
( printf '\xeb\x3e ' ; cat bootexec ) >boot
|
|
|
|
chmod 755 boot
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
edparams.o: boot.c
|
|
|
|
ln -f boot.c edparams.c
|
|
|
|
$(CC) $(CFLAGS) -DUNIX -c edparams.c
|
|
|
|
rm edparams.c
|
|
|
|
|
|
|
|
edparams: edparams.o rawfs.o
|
|
|
|
$(CC) $(CFLAGS) $(STRIP) -o $@ edparams.o rawfs.o
|
|
|
|
install -S 16kw edparams
|
|
|
|
|
|
|
|
dosboot.o: boot.c
|
|
|
|
$(CC86) $(CFLAGS) -DDOS -o $@ -c boot.c
|
|
|
|
|
|
|
|
doshead.o: doshead.s
|
|
|
|
$(CC) -mi386 -o $@ -c doshead.s
|
|
|
|
|
|
|
|
dosboot: doshead.o dosboot.o bootimage.o rawfs86.o
|
|
|
|
$(LD86) -com -o $@ \
|
|
|
|
doshead.o dosboot.o bootimage.o rawfs86.o $(LIBS)
|
|
|
|
|
|
|
|
boot.com: dosboot
|
2010-01-05 10:21:55 +01:00
|
|
|
exec sh a.out2com dosboot boot.com
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
mkfile: mkfhead.s mkfile.c
|
|
|
|
$(LD) -.o -mi86 -com -o $@ mkfhead.s mkfile.c $(LIBS)
|
|
|
|
|
|
|
|
mkfile.com: mkfile
|
2010-01-05 10:21:55 +01:00
|
|
|
exec sh a.out2com mkfile mkfile.com
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
installboot: installboot.o rawfs.o
|
|
|
|
$(CC) $(STRIP) -o installboot installboot.o rawfs.o
|
|
|
|
install -S 6kw installboot
|
|
|
|
|
|
|
|
addaout: addaout.o
|
|
|
|
$(CC) -o addaout addaout.o
|
|
|
|
|
|
|
|
installboot.o bootimage.o: image.h
|
|
|
|
boot.o bootimage.o dosboot.o edparams.o: boot.h
|
|
|
|
rawfs.o rawfs86.o installboot.o boot.o bootimage.o: rawfs.h
|
|
|
|
|
|
|
|
install: $(MDEC)/bootblock $(MDEC)/boot $(MDEC)/masterboot \
|
|
|
|
$(MDEC)/jumpboot $(BIN)/installboot $(BIN)/edparams
|
|
|
|
dosinstall: $(MDEC)/boot.com $(MDEC)/mkfile.com
|
|
|
|
|
|
|
|
$(MDEC)/bootblock: bootblock
|
|
|
|
install -cs -o bin -m 644 $? $@
|
|
|
|
|
|
|
|
$(MDEC)/boot: boot
|
|
|
|
install -cs -o bin -m 644 $? $@
|
|
|
|
|
|
|
|
$(MDEC)/boot.com: boot.com
|
|
|
|
install -c -m 644 $? $@
|
|
|
|
|
|
|
|
$(MDEC)/mkfile.com: mkfile.com
|
|
|
|
install -c -m 644 $? $@
|
|
|
|
|
|
|
|
$(MDEC)/masterboot: masterboot
|
|
|
|
install -cs -o bin -m 644 $? $@
|
|
|
|
|
|
|
|
$(MDEC)/jumpboot: jumpboot
|
|
|
|
install -cs -o bin -m 644 $? $@
|
|
|
|
|
|
|
|
$(BIN)/installboot: installboot
|
|
|
|
install -cs -o bin $? $@
|
|
|
|
|
|
|
|
$(BIN)/addaout: addaout
|
|
|
|
install -cs -o bin $? $@
|
|
|
|
|
|
|
|
$(BIN)/edparams: edparams
|
|
|
|
install -cs -o bin $? $@
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *.bak *.o
|
2010-01-18 15:10:04 +01:00
|
|
|
rm -f bootblock addaout installboot boot masterboot jumpboot edparams
|
2005-04-21 16:53:53 +02:00
|
|
|
rm -f dosboot boot.com mkfile mkfile.com
|