On 2019-03-12 12:08+0100 Valerio Messina via Msys2-users wrote:

hi,
I want to use a single Makefile for three platforms (Linux64, MinGw64, MinGw32) to generate a simple binary (using SDL2).
The source is a single .c file, so use Automake, Autoconf is too heavy.

Hi Valerio:

I am sure you could get a pure GNU Make approach to work.  However
*for those familiar with CMake* the task you describe (build an
executable that links to an external library in a cross-platform way)
is straightforward and could be implemented in just a few lines of
CMake code with your choice of CMake back-ends (including GNU Make).

I assume you are not familiar with CMake because you haven't mentioned
it as a possibility.  So because of that unfamiliarity doing this task
with CMake would likely cost you just as much time as a pure GNU make
approach.  But you would learn a lot that I guarantee would be helpful
to you in other projects (at least that is my experience with CMake
over the last decade) so it would be time well spent.

Alan
__________________________
Alan W. Irwin

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


_______________________________________________
Msys2-users mailing list
Msys2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/msys2-users

Reply via email to