Nicer way to generate kernel.lds.s.
[pintos-anon] / src / Makefile.inc
index 3ac0c6ed7b81cd0a3441ede44d2b247d22568450..df6b01046a306f9efb4e20fd60d0819df8009ca0 100644 (file)
@@ -39,6 +39,7 @@ 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 += hash.c              # Hash tables.
 
 # Filesystem code.
 FILESYS_SRC  = filesys.c       # Filesystem core.
@@ -50,6 +51,7 @@ FILESYS_SRC += fsutil.c               # Utilities.
 # User process code.
 USERPROG_SRC  = addrspace.c    # Address spaces.
 USERPROG_SRC += exception.c    # User exception handler.
+USERPROG_SRC += syscall.c      # System call handler.
 USERPROG_SRC += gdt.c          # GDT initialization.
 USERPROG_SRC += tss.c          # TSS management.
 
@@ -61,8 +63,8 @@ all: diskimage.bin
 intr-stubs.S: $(TOP_SRCDIR)/threads/intr-stubs.pl $(TOP_SRCDIR)/threads/loader.h
        $< > $@
 
+kernel.lds.s: CPPFLAGS += -P -C
 kernel.lds.s: $(TOP_SRCDIR)/threads/kernel.lds.S $(TOP_SRCDIR)/threads/loader.h
-       $(CPP) -x assembler-with-cpp -P $< -o $@
 
 kernel.o: $(OBJECTS) kernel.lds.s
        ld -T kernel.lds.s -o $@ $(OBJECTS) `$(CC) -print-libgcc-file-name`