Hello,
I am a bit lost here. We recently started a project using GNU Build
System in order to make our package installable everywhere without mysteries
of package-specific builds.
Now I am facing a problem I will try to explain with an easier to
understand example.
Suppose I am making an application and it currently supports Linux
system. Now suppose I am to add Windows access and this would imply adding
some source files for windows-specific routines and removing some
linux-specific routines. Some of the work can be done via preprocessor
macros. But if some .c files are not to be compiled at all, I could either
remove the entire file via macros, but I doubt I will get any .o out of
these empty files, and I will not want to include these .o's in the linking
phase.
In other words, there will be new .c files that should be compiled only
for the windows version and some .c files exclusive to the linux version.
Suppose also I want to specify this at configure-time (e.g.
"./configure" builds linux, "./configure --enable-win32" builds windows).
I know I can do this on configure.ac, but I don't know, at configure
time, how would I change the Makefile's dependencies for each of these two
builds. Any directions on how to do this (pointing a relatively simple
package that does this also can help a lot) are very well accepted!
Thank you,
Fabricio Murta