BUILDPATH = ./../../sys/pic32
H         = ./../../sys/include
M         = ./../../sys/pic32
S         = ./../../sys/kernel

vpath %.c $(M):$(S)
vpath %.S $(M):$(S)

KERNOBJ += _startup.o adc.o clock.o devsw.o exception.o gpio.o init_main.o init_sysent.o kern_clock.o kern_descrip.o kern_exec.o kern_exit.o kern_fork.o kern_glob.o kern_mman.o kern_proc.o kern_prot.o kern_prot2.o kern_resource.o kern_sig.o kern_sig2.o kern_subr.o kern_synch.o kern_sysctl.o kern_time.o machdep.o mem.o picga.o rd_sd.o rdisk.o signal.o spi_bus.o subr_log.o subr_prf.o subr_rmap.o swap.o sys_generic.o sys_inode.o sys_pipe.o sys_process.o syscalls.o sysctl.o tty.o tty_conf.o tty_subr.o tty_tty.o ufs_alloc.o ufs_bio.o ufs_bmap.o ufs_dsort.o ufs_fio.o ufs_inode.o ufs_mount.o ufs_namei.o ufs_subr.o ufs_syscalls.o ufs_syscalls2.o usb_console.o usb_device.o usb_function_cdc.o vers.o vfs_vnops.o vm_sched.o vm_swap.o vm_swp.o 

DEFS += -DADC_ENABLED=YES
DEFS += -DBUS_KHZ=80000
DEFS += -DCONSOLE_USB
DEFS += -DCPU_KHZ=80000
DEFS += -DGPIO_ENABLED=YES
DEFS += -DHALTREBOOT=YES
DEFS += -DHZ=500
DEFS += -DKERNEL
DEFS += -DLED_DISK_PIN=4
DEFS += -DLED_DISK_PORT=TRISE
DEFS += -DLED_KERNEL_PIN=5
DEFS += -DLED_KERNEL_PORT=TRISE
DEFS += -DNPROC=10
DEFS += -DPICGA_BUS=3
DEFS += -DPICGA_CS_PIN=4
DEFS += -DPICGA_CS_PORT=TRISD
DEFS += -DPICGA_ENABLED=YES
DEFS += -DSD0_CS_PIN=9
DEFS += -DSD0_CS_PORT=TRISG
DEFS += -DSD0_PORT=2
DEFS += -DSD1_CS_PIN=4
DEFS += -DSD1_CS_PORT=TRISB
DEFS += -DSD1_PORT=2
DEFS += -DUCB_METER
DEFS += -DUSB_AUTOBOOT=YES
DEFS += -DUSB_MAX_EP_NUMBER=3
DEFS += -DUSB_NUM_STRING_DESCRIPTORS=3

BLREBOOT = -p
include ./../../sys/pic32/kernel-post.mk
