Use runtime options instead of conditional compilation for MLFQS,
[pintos-anon] / src / Makefile.build
index baf4d83d565384926de500522ea71518964a126d..e124011ac646210885fc7c311080ede3e6bfd3d3 100644 (file)
@@ -7,8 +7,7 @@ VPATH = ../..
 
 # Compiler and assembler options.
 DEFINES += -DKERNEL
-CPPFLAGS = -nostdinc -I../.. -I- -I../../lib -I../../lib/kernel        \
-          -include constants.h
+CPPFLAGS = -nostdinc -I../.. -I- -I../../lib -I../../lib/kernel
 
 # Core kernel.
 threads_SRC  = threads/init.c          # Main program.
@@ -31,11 +30,11 @@ devices_SRC += devices/disk.c               # IDE disk device.
 devices_SRC += devices/intq.c          # Interrupt queue.
 
 # Library code shared between kernel and user programs.
-lib_SRC  = lib/debug.c         # Debug helpers.
-lib_SRC += lib/random.c                # Pseudo-random numbers.
-lib_SRC += lib/stdio.c         # I/O library.
-lib_SRC += lib/stdlib.c                # Utility functions.
-lib_SRC += lib/string.c                # String functions.
+lib_SRC  = lib/debug.c                 # Debug helpers.
+lib_SRC += lib/random.c                        # Pseudo-random numbers.
+lib_SRC += lib/stdio.c                 # I/O library.
+lib_SRC += lib/stdlib.c                        # Utility functions.
+lib_SRC += lib/string.c                        # String functions.
 
 # Kernel-specific library code.
 lib_kernel_SRC += lib/kernel/list.c    # Doubly-linked lists.
@@ -67,10 +66,7 @@ DEPENDS = $(patsubst %.o,%.d,$(OBJECTS))
 
 all: os.dsk
 
-threads/intr-stubs.S: threads/intr-stubs.pl threads/loader.h
-       $< > $@
-
-threads/kernel.lds.s: CPPFLAGS += -P -C
+threads/kernel.lds.s: CPPFLAGS += -P
 threads/kernel.lds.s: threads/kernel.lds.S threads/loader.h
 
 kernel.o: threads/kernel.lds.s $(OBJECTS) 
@@ -92,7 +88,7 @@ os.dsk: loader.bin kernel.bin
 
 clean:
        $(RM) -f $(OBJECTS) $(DEPENDS) 
-       $(RM) -f threads/intr-stubs.S threads/loader.o
+       $(RM) -f threads/loader.o
        $(RM) -f kernel.o kernel.lds.s
        $(RM) -f kernel.bin loader.bin