Initial filesystem stub code.
[pintos-anon] / src / Makefile.inc
index 20e96d7d9887056747b6388c0246d91ea8fea37b..338bb25eac42efbd802e0f3ead5d49f69a812083 100644 (file)
@@ -1,5 +1,10 @@
+# -*- makefile -*-
+
 SHELL = /bin/sh
-VPATH = $(TOP_SRCDIR)/threads:$(TOP_SRCDIR)/devices:$(TOP_SRCDIR)/lib
+VPATH := $(TOP_SRCDIR)/threads
+VPATH := $(VPATH):$(TOP_SRCDIR)/devices
+VPATH := $(VPATH):$(TOP_SRCDIR)/lib
+VPATH := $(VPATH):$(TOP_SRCDIR)/filesys
 
 -include *.d
 
@@ -9,21 +14,21 @@ CFLAGS = -g -O3 -MMD $(WARNINGS) $(INCLUDES) $(DEFINES)
 ASFLAGS = $(INCLUDES) $(DEFINES)
 
 # Core kernel.
-THREADS_SRC  = start.S # Must be first.
-THREADS_SRC += init.c  # Start-up code.
-THREADS_SRC += thread.c        # Thread management core.
-THREADS_SRC += switch.S        # Thread switch routine.
+THREADS_SRC  = start.S         # Must be linked first.
+THREADS_SRC += init.c          # Start-up code.
+THREADS_SRC += thread.c                # Thread management core.
+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 += palloc.c        # Page allocator.
-THREADS_SRC += malloc.c        # Subpage allocator.
+THREADS_SRC += synch.c         # Synchronization.
+THREADS_SRC += palloc.c                # Page allocator.
+THREADS_SRC += malloc.c                # Subpage allocator.
 
 # Device driver code.
-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  = timer.c         # Timer device.
+DEVICES_SRC += kbd.c           # Keyboard device.
+DEVICES_SRC += vga.c           # Video device.
+DEVICES_SRC += serial.c                # Serial port device.
 
 # Library code.
 LIB_SRC  = debug.c             # Debug helpers.
@@ -31,6 +36,12 @@ LIB_SRC += lib.c             # Standard C library.
 LIB_SRC += random.c            # Pseudo-random numbers.
 LIB_SRC += list.c              # Doubly-linked lists.
 LIB_SRC += bitmap.c            # Bitmaps.
+LIB_SRC += backdoor.c          # Backdoor IPC.
+
+# Filesystem code.
+FILESYS_SRC  = filesys.c       # Filesystem core.
+FILESYS_SRC += file.c          # Individual files.
+FILESYS_SRC += filesys-stub.c  # Stub helper code.
 
 # Objects.
 OBJECTS = $(patsubst %.c,%.o,$(patsubst %.S,%.o,$(SOURCES)))
@@ -41,7 +52,6 @@ intr-stubs.S: $(TOP_SRCDIR)/threads/intr-stubs.pl
        $< > $@.tmp && mv $@.tmp $@
 
 kernel.o: $(OBJECTS)
-       echo $(OBJECTS)
        ld -T $(TOP_SRCDIR)/threads/kernel.lds -o $@ $^ \
                `$(CC) -print-libgcc-file-name`