X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2FMakefile.inc;h=472d34b1c1afaadbb7ada2eae661941a55230806;hb=ec97d00bf0e1f36b17643a91a530a2ebf899fd6d;hp=6ed310ea91b24035a12545a6d05456c9edcacaa8;hpb=8ca3547f6c4d6d01a76d3ce642a0c1bf884c4c2a;p=pintos-anon diff --git a/src/Makefile.inc b/src/Makefile.inc index 6ed310e..472d34b 100644 --- a/src/Makefile.inc +++ b/src/Makefile.inc @@ -7,8 +7,6 @@ VPATH := $(VPATH):$(TOP_SRCDIR)/lib VPATH := $(VPATH):$(TOP_SRCDIR)/filesys VPATH := $(VPATH):$(TOP_SRCDIR)/userprog --include *.d - DEFINES += -DCNACHOS86 WARNINGS = -Wall -W -Wstrict-prototypes -Wmissing-prototypes CFLAGS = -g -O3 -MMD $(WARNINGS) $(INCLUDES) $(DEFINES) @@ -31,6 +29,7 @@ DEVICES_SRC = timer.c # Timer device. DEVICES_SRC += kbd.c # Keyboard device. DEVICES_SRC += vga.c # Video device. DEVICES_SRC += serial.c # Serial port device. +DEVICES_SRC += disk.c # IDE disk device. # Library code. LIB_SRC = debug.c # Debug helpers. @@ -54,16 +53,15 @@ OBJECTS = $(patsubst %.c,%.o,$(patsubst %.S,%.o,$(SOURCES))) all: diskimage.bin intr-stubs.S: $(TOP_SRCDIR)/threads/intr-stubs.pl - $< > $@.tmp && mv $@.tmp $@ + $< > $@ kernel.o: $(OBJECTS) ld -T $(TOP_SRCDIR)/threads/kernel.lds -o $@ $^ \ `$(CC) -print-libgcc-file-name` kernel.bin: kernel.o - objcopy -O binary -R .note -R .comment -S $< $@.data - perl -e 'print "\0" x (4096 - (-s "$@.data") % 4096)' > $@.pad - cat $@.data $@.pad > $@.tmp && mv $@.tmp $@ + objcopy -O binary -R .note -R .comment -S $< $@.tmp + $(TOP_SRCDIR)/pad 4096 < $@.tmp > $@ loader.bin: loader.S kernel.bin gcc -c $< -DKERNEL_LOAD_PAGES=`perl -e 'print +(-s "kernel.bin") / 4096;'` @@ -74,3 +72,5 @@ diskimage.bin: loader.bin kernel.bin clean: rm -f *.o *.d *.bin kernel.bin.data kernel.bin.pad intr-stubs.S + +-include *.d