You've got two things mixed up--user level drivers and kernel loadable modules. An executable program is what you want, not a module, so don't define MODULE. Just compile your executable with -O and the undefined references should go away.