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.
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.
../../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 $@ $<