Search code examples
linuxgccdevice-driver

View Linux module source file after preprocessed


When compiling with gcc we can view preprocessed source files with option -E. How can we apply this to the Makefile of kernel modules (external compile). The source files contain a lot of #ifdef #else #endif, is there a way to quick check which parts of code are actually included in the compiled file. Any suggestions are appreciated. Thanks in advanced.


Solution

  • Add CFLAGS=-E to your make invocation.