minix/boot/Makefile

119 lines
2.6 KiB
Makefile
Raw Normal View History

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
all: bootblock cdbootblock 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
cdbootblock: bootblock.s
$(LD86) -com -o $@ bootblock.s -DCDBOOT
2005-04-21 16:53:53 +02:00
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
$(LD86) -o boot boothead.s boot.o bootimage.o rawfs86.o $(LIBS)
install -S 22kb 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
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
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
rm -f cdbootblock bootblock addaout installboot boot masterboot jumpboot edparams
2005-04-21 16:53:53 +02:00
rm -f dosboot boot.com mkfile mkfile.com