Move ioctl() command enums into user-space headers

Also some changes to the makefile