deater / dos33fsprogs

Tools for manipulating Apple II dos33 filesystems
http://www.deater.net/weave/vmwprod/apple/dos33fs.html
Other
142 stars 23 forks source link

utils/{gr,hgr}-utils/Makefile: Use pkg-config for compile/link flags #21

Open 0cjs opened 1 year ago

0cjs commented 1 year ago

Calls to $(CC) assumed that png.h, -lpng etc. were all in the default paths used by the compiler. However, this is not the case on some systems, such as MacOS using the MacPorts package system.

Add calls to pkg-config to add the appropriate paths to CFLAGS if necessary, and introduce LDFLAGS for linker library paths.

This assumes that pkg-config is available; it usually is (particularly on systems using GCC), but further work may be required if this is required to run on systems where it's not.

This also assumes Gnu Make; again further work may be required if this needs to be made compatible with Berkeley Make.

This has been tested on Debian 11 and on MacOS 10.14.6 with MacPorts 2.8.1

0cjs commented 1 year ago

Just checking in to see if this can get merged.