Basically, I need to amalgamate the source code into a single file . gcc -E
almost does the job for me, except for the fact that I don't need to print the codes from system headers.
That is it should print my code as well as any codes from 3rd party library used but nothing from a system library.
I was wondering if I can tweak gcc -E
such that it suppresses printing the codes from system headers.
In case that's already achievable by a combination of some other options, you can mention that as well.
I have gone through this answer. this hack doesn't work because the 3rd party libraries themselves call system headers which need to be suppressed as well.