LudovicRousseau / pcsc-tools

Some tools to be used with smart cards and PC/SC
https://pcsc-tools.apdu.fr/
GNU General Public License v2.0
190 stars 62 forks source link

Make Makefile more friendly to packaging #5

Closed gdsotirov closed 7 years ago

gdsotirov commented 7 years ago

Allow additional CFLAGS and have all the installation paths in variables, so easily overrideable from environment (e.g. with make -e).

LudovicRousseau commented 7 years ago

Using CFLAGS="whatever" make should already use your defined value of CFLAGS. No?

Also I would use BINDIR ?= /bin so that it is easy to overwrite it using: BINDIR=foobar make https://www.gnu.org/software/make/manual/make.html#index-_003f_003d

Comments?

LudovicRousseau commented 7 years ago

Partly applied in https://github.com/LudovicRousseau/pcsc-tools/commit/22b65fe210f920750033f75e648c07bb152d5290

gdsotirov commented 7 years ago

For the ?= operator no comments at all - it's even better like this. But I used different variable for CFLAGS, because of make -e. I think without it it would be OK, but I'll check it tomorrow and write back.

gdsotirov commented 7 years ago

So now with the ?= operator and without -e flag everything is OK - I'm able to set both CFLAGS and INSTALL_* variables. Thanks for applying the patch. The issue could be closed.