I have a script that generates c++ source files of previousy unknown number and name which then need to be compiled into one library. So far, I do this with a simple (shell) for loop in my Makefile:
compile:
for f in `ls -1 *.cpp` ; do g++ -c ...
...
There will be no other c++ sources in the directory, so I just compile everything that's there.
Now I want to change my build system to autoconf/automake and I'm wondering what the 'right' way of doing this would be. The tutorials I've found only cover the case where you know the number and names of the sources that will be generated.
Is there, for example, a way to access the compiler name and all the flags that autoconf/automake put together for me, so that I can insert them in my own compile command?
Thanks in advance.