Move kernel sources to platform specific subdirs
diff --git a/src/kernel/x86_32/x86_32.jmk b/src/kernel/x86_32/x86_32.jmk
new file mode 100644
index 0000000..875331c
--- /dev/null
+++ b/src/kernel/x86_32/x86_32.jmk
@@ -0,0 +1,59 @@
+# -*- tcl -*-
+
+ldflags -T[pwd]/link.ld -melf_i386
+asmflags -felf -Fdwarf
+set qemuflags "-drive file=hd0_ext2.img,format=raw"
+
+depends sys $root/src/libsys libsys.a
+depends initrd $root/boot/initrd initrd.img
+depends ata_pio dri/ata_pio ata_pio.a
+depends pci dri/pci pci.a
+depends ide dri/ide ide.a
+depends ext2 dri/fs/ext2 ext2.a
+
+option FS ext2
+
+srcs boot.s \
+	main.c \
+	descriptor_tables.c \
+	io.c \
+	vga.c \
+	gdt_flush.s \
+	tss_flush.s \
+	idt.s \
+	log.c \
+	irq.c \
+	pic.c \
+	timer.c \
+	paging.c \
+	switch_table.s \
+	kheap.c \
+	alloc.c \
+	vfs.c \
+	multiboot.c \
+	vfs_initrd.c \
+	syscall.c \
+	task.c \
+	task_api.s \
+	faults.c \
+	sync.c
+
+objs [lib ext2] \
+	[lib ide] \
+	[lib ata_pio] \
+	[lib pci] \
+	[lib sys]
+
+rule debug-wait kernel.elf {
+	shell "qemu-system-i386 -s -S $::qemuflags -kernel kernel.efl"
+}
+rule debug kernel.elf {
+	shell "qemu-system-i386 -s -S $::qemuflags -kernel kernel.efl"
+	shell "echo run target remote localhost:1234 to connect to qemu"
+	shell "gdb $::first_src"
+	shell "pkill qemu-system-i386"
+}
+
+rule qemu "kernel.elf hd0_$::options(FS).img" {
+	shell "qemu-system-i386 $::qemuflags -d cpu_reset -monitor stdio -kernel kernel.elf -no-reboot"
+}