X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2FMakefile.inc;h=472d34b1c1afaadbb7ada2eae661941a55230806;hb=ec97d00bf0e1f36b17643a91a530a2ebf899fd6d;hp=19b911c2e8f4ef264353d7bb29b8443ddf8f91d1;hpb=3fc16f6e9abc98a3bd5427eb210669860609a224;p=pintos-anon diff --git a/src/Makefile.inc b/src/Makefile.inc index 19b911c..472d34b 100644 --- a/src/Makefile.inc +++ b/src/Makefile.inc @@ -5,8 +5,7 @@ VPATH := $(TOP_SRCDIR)/threads VPATH := $(VPATH):$(TOP_SRCDIR)/devices VPATH := $(VPATH):$(TOP_SRCDIR)/lib VPATH := $(VPATH):$(TOP_SRCDIR)/filesys - --include *.d +VPATH := $(VPATH):$(TOP_SRCDIR)/userprog DEFINES += -DCNACHOS86 WARNINGS = -Wall -W -Wstrict-prototypes -Wmissing-prototypes @@ -21,6 +20,7 @@ THREADS_SRC += switch.S # Thread switch routine. THREADS_SRC += interrupt.c # Interrupt core. THREADS_SRC += intr-stubs.S # Interrupt stubs. THREADS_SRC += synch.c # Synchronization. +THREADS_SRC += paging.c # Page tables. THREADS_SRC += palloc.c # Page allocator. THREADS_SRC += malloc.c # Subpage allocator. @@ -29,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. @@ -43,22 +44,24 @@ FILESYS_SRC = filesys.c # Filesystem core. FILESYS_SRC += file.c # Individual files. FILESYS_SRC += filesys-stub.c # Stub helper code. +# User process code. +USERPROG_SRC = addrspace.c # Address spaces. + # Objects. 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;'` @@ -69,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