Add a little demo/test code for the `threads' project.
[pintos-anon] / src / Makefile.build
index 8fe960a4684204a80711d8e3fcd7e1c259dbb2c9..e77230089f0eaa4a605da627b3971c8c1445c864 100644 (file)
@@ -25,6 +25,7 @@ threads_SRC += threads/paging.c               # Page tables.
 threads_SRC += threads/palloc.c                # Page allocator.
 threads_SRC += threads/malloc.c                # Subpage allocator.
 threads_SRC += threads/start.S         # Startup code.
+threads_SRC += threads/test.c          # Test code.
 
 # Device driver code.
 devices_SRC  = devices/timer.c         # Timer device.
@@ -32,6 +33,7 @@ devices_SRC += devices/kbd.c          # Keyboard device.
 devices_SRC += devices/vga.c           # Video device.
 devices_SRC += devices/serial.c                # Serial port device.
 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.
@@ -80,8 +82,8 @@ kernel.bin: kernel.o
        ../../pad 4096 < $@.tmp > $@
        rm $@.tmp
 
-threads/loader.o: kernel.bin
-threads/loader.o: DEFINES += -DKERNEL_LOAD_PAGES=`perl -e 'print +(-s "kernel.bin") / 4096;'`
+threads/loader.o: threads/loader.S kernel.bin
+       $(CC) -c $< -o $@ $(ASFLAGS) -DKERNEL_LOAD_PAGES=`perl -e 'print +(-s "kernel.bin") / 4096;'`
 
 loader.bin: threads/loader.o
        ld -N -e start -Ttext 0x7c00 --oformat binary -o $@ $<