1

I'm beginning to work on a project. It's based on an open-source library. The library is composed of many files/repertories.
My problem : a would like to link the lib statically ( i mean to include the lib directly into the program).

I'm working with minigp32 (thx to bille2smile) and visual-mingw.

How can I compile the main source, including all the files of the libs. Do I have to write a makefile manualy and write for each file a rule (approx ~50 files, with tens of included files) or is there a tool which can do this automatically ? (just by reading the #include lines in the sources)

Thx

2

Yes, there is a tool which do this, it's gcc ... but you have to write a little script for full automatisation...

'gcc -M source.c' will generate a rule of this type:

source.o : include1.h include2.h ....