> 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!
Use conditionals. http://www.gnu.org/software/automake/manual/html_node/Usage-of-Conditionals.html something like if COND_WINDOWS prog_SOURCES+=win32.c endif if COND_LINUX prog_SOURCES+=linux.c endif - Daniel