# Makefile for kernel using standard Minix directory layout and compiler. # CPP may need changing to /usr/lib/cpp. # The following nonstandard flags are used: # -F: run cpp and cem sequentially (used when memory is tight) # -T.: put temporaries in working directory (when RAM disk is small) # Set O=o for ANSI compiler, or O=s for K&R compiler. #O=o O=s BIN =. CC =cc CFLAGS =-F -T. CPP =/usr/lib/cpp CPPFLAGS =-DASLD -P END =/usr/lib/end.$O LD =asld LDFLAGS =-i LIBS =/usr/lib/libc.a START =mpx.s a =kernel.h $h/config.h $h/const.h $h/type.h \ $s/types.h $i/limits.h $i/errno.h \ const.h type.h proto.h glo.h h =/usr/include/minix i =/usr/include s =/usr/include/sys KEROBJS =start.$O protect.$O klib.$O wini.$O \ table.$O main.$O tty.$O floppy.$O system.$O proc.$O \ clock.$O memory.$O console.$O rs232.$O rs2.$O printer.$O \ dmp.$O exception.$O i8259.$O misc.$O keyboard.$O SOBJS =start.$O klib.$O mpx.$O rs2.$O # Rules. .SUFFIXES: .x # .x files are .$O files which need C-preprocessing .x.$O: $(CPP) $(CPPFLAGS) $< >$@ # What to make. dummy: $(BIN)/kernel # this line fixes a bug in RAL's latest make $(BIN)/kernel: $(START) $(KEROBJS) $(LIBS) $(END) $(LD) $(LDFLAGS) -o $(BIN)/kernel \ $(START) $(KEROBJS) \ $(LIBS) $(END) -s > kernel.$Oym ast -X $(BIN)/kernel kernel.$Oym @rm kernel.$Oym clean: @rm -f *.s *.o *.bak kernel klib.$O: $h/config.h $h/const.h const.h protect.h sconst.h klib.x mpx.$O: $h/config.h $h/const.h $h/com.h const.h protect.h sconst.h mpx.x rs2.$O: $h/config.h $h/const.h const.h sconst.h rs2.x start.$O: $h/config.h $h/const.h $h/com.h const.h protect.h sconst.h start.c clock.$O: $a clock.$O: $i/signal.h clock.$O: $h/callnr.h clock.$O: $h/com.h clock.$O: proc.h console.$O: $a console.$O: $i/sgtty.h console.$O: $h/callnr.h console.$O: $h/com.h console.$O: protect.h console.$O: tty.h start.$O: $a start.$O: $i/string.h start.$O: $h/boot.h start.$O: protect.h start.$O: start.c dmp.$O: $a dmp.$O: $h/com.h dmp.$O: proc.h dmp.$O: tty.h exception.$O: $a exception.$O: $i/signal.h exception.$O: proc.h floppy.$O: $a floppy.$O: $h/callnr.h floppy.$O: $h/com.h floppy.$O: $h/diskparm.h i8259.$O: $a keyboard.$O: $a keyboard.$O: $i/sgtty.h keyboard.$O: $i/signal.h keyboard.$O: $h/callnr.h keyboard.$O: $h/com.h keyboard.$O: tty.h main.$O: $a main.$O: $i/signal.h main.$O: $h/callnr.h main.$O: $h/com.h main.$O: proc.h memory.$O: $a memory.$O: $h/callnr.h memory.$O: $h/com.h misc.$O: $a misc.$O: $h/com.h printer.$O: $a printer.$O: $h/callnr.h printer.$O: $h/com.h proc.$O: $a proc.$O: $h/callnr.h proc.$O: $h/com.h proc.$O: proc.h protect.$O: $a protect.$O: proc.h protect.$O: protect.h rs232.$O: $a rs232.$O: $i/sgtty.h rs232.$O: tty.h system.$O: $a system.$O: $i/signal.h system.$O: $h/boot.h system.$O: $h/callnr.h system.$O: $h/com.h system.$O: proc.h system.$O: protect.h table.$O: $a table.$O: $h/com.h table.$O: proc.h table.$O: tty.h tty.$O: $a tty.$O: $i/sgtty.h tty.$O: $i/signal.h tty.$O: $h/callnr.h tty.$O: $h/com.h tty.$O: tty.h wini.$O: $a wini.$O: $h/callnr.h wini.$O: $h/com.h wini.$O: $h/partition.h