projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improve error message.
[pintos-anon]
/
src
/
Makefile.inc
diff --git
a/src/Makefile.inc
b/src/Makefile.inc
index 6ed310ea91b24035a12545a6d05456c9edcacaa8..472d34b1c1afaadbb7ada2eae661941a55230806 100644
(file)
--- 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
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)
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 += 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.
# 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
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
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;'`
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
clean:
rm -f *.o *.d *.bin kernel.bin.data kernel.bin.pad intr-stubs.S
+
+-include *.d