Actually, I need to build binaries for different languages – Java, Pascal (Delphi/FPC), C++, C#, etc under Windows / Linux platforms.
How this could be done? I am using CMake for C projects for now like this:
cmake --build . with CMakeLists.txt providen.
Every
*makesystem is not usefull for Java project becausemakebasically assumes one of “One file in, one file out” (e.g..cto.o) or “N files in, one file out” (e.g.*.oto one of.a,.dll,.exe). With these “primitives” a build is performed.But the Java compiler requires inherently “complete sourcetree in, comlete class-tree out”.
Those two paradigmata don’t match and trying to do will introduce more little nasty problems than its worth sooner or later. Been there, done that.
The best you can do is to call Ant or Maven (or whatever) from within a toplevel Makefile.
Edit: Not to forget two more things:
Compiling Java stuff with
makeis a dark, arcane art. You will not find many people who know both Java and make and who can solve problems with that combination. Ant/Maven and Java is a standard combination. There is simply no problem finding help or advises with that combination.Many frameworks in Java require special compilation steps. In almost all cases there are plugins for Ant and Maven available. Using make you will have to reinvent the wheel every time again.