I want to build a static library from c and cpp sources. The CC flags and CXX can't be defined separately so, I create two targets with different flags, one for c source files and one for cpp files.
With this way I have two separate targets, two separate static libs, but I want only one.
To overcome this problem, I found two possible solutions:
1. Set the same target library filename for two targets and remove the delete command from compiler settings before execution of linker. Builds ok but requires a manual delete of library before building of two targets.
2. Let the filename of two libraries different. Create a new target with all .o files from both targets that builds the final library file.
Both methods working but I ask if there is a more "correct" way to do this....