Re:What I Learned from porting my projects to FreeBSD
by AHTERIX5000 on Monday October 29, 2018 @04:46AM
(#18325900)
Yeah, CMake and autotools solve different problems than make. I'm definitely not a fan of either one but if I need to really distribute and compile something on more than one OS there isn't much of a choice.
The posted makefile example fails right away on multiple platforms since headers are often in somewhere else than in /usr/include directly, for example in Debian the right (atm) path would be /usr/include/libpng16 and Makefile does not handle that.
Re:What I Learned from porting my projects to FreeBSD
by enriquto on Monday October 29, 2018 @05:25AM
(#18326043)
> The posted makefile example fails right away on multiple platforms since headers are often in somewhere else
And that's the intended behavior. Finding system headers around your disk is not a problem that a build system must try to solve. This is the task of a distribution or a packaging system, which is a different problem as you say.
Re:What I Learned from porting my projects to FreeBSD
by AHTERIX5000 on Monday October 29, 2018 @05:38AM
(#18326107)
Yeah I agree, it's not the ideal situation but it is the real world. Simple makefiles do not work often and there are systems that can solve the problem. Not elegant, brilliantly designed tools but ones that work anyway.
(The combination I've always had to deal with is Linux, OS X and Windows/VC++ - but any combination that includes both Windows/VC++ and a POSIX-type OS is probably enough to make it worthwhile. The POSIX/non-POSIX differences are rather annoying to deal with otherwise, and that quite apart from how most Windows programmers will quite reasonably want to use a Visual Studio project rather than a Makefile.)
506c