In a C/Java project, what is an appropriate way to manage the build?
In a C/Java project, what is an appropriate way to manage the build?
I was initially thinking building everything C with Autotools and everything in Java with Apache Ant and then have each builder "exec" the other.
Another approach could be to do everything in Autotools. I'd prefer autotools over ant because I'm not aware of any Autoconf like applications for Ant.
The project is a JNI project that has equal/symmetrical responsibility between the languages, in other words, it should be usable by Java-on开发者_高级运维ly developers and C-only developers as well as Java-and-C developers.
Thanks, Chenz
I would recommend CMake which is multi-platform and multi-language.
You can start with:
project(myJavaProject Java)
Before using these I would recommend starting over with learning how to use makefiles for C projects and Ant for Java. However, when you have become accustomed to these and you start managing larger projects Autotools and Ant+Ivy will be more than enough although I would recommend Maven. It will solve most of your problems and the learning curve pays off quickly (in addition it eases the deployment of projects). In any case there are many choices and what you will choose depends upon your time, needs, preferences & will to learn ;).
精彩评论