From mboxrd@z Thu Jan 1 00:00:00 1970 From: chris@basementcode.com (Christopher Harvey) Date: Thu, 08 Sep 2011 09:29:22 -0500 Subject: adding preprocessor defines in module makefiles Message-ID: <1446fdf130ff6118b2c776094dd4155f@basementcode.com> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Hi, I'm trying to build a kernel module for fun, and I can't figure out a clean way to add preprocessor defines that correspond to Kconfig values. I'm trying to set CONFIG_SND_DEBUG specifically. My module has only one file, and I've tried adding #define CONFIG_SND_DEBUG as the first line in the .c file, but now I'm getting the following warning: WARNING: "__snd_printk" [/home/chris/snd/snd-foo.ko] undefined! I haven't compiled the kernel running on my system with the CONFIG_SND_DEBUG option but I haven't been able to see a reason why that should change anything for my module. thanks, Chris