While trying to install a program from source I found that it installed libraries to /usr/lib/[program]/ and because this is on a 64-bit system it didn't work. I had to copy the libraries to /usr/lib64/[program]. Note that the library files are python and therefore architecture-independent.
The Makefile has:
libdir = /usr/lib
How can I make libdir equal lib64 on 64-bit systems and lib on 32-bit?
Try this:
MACHINE := $(shell uname -m)
ifeq ($(MACHINE), x86_64)
libdir = /usr/lib64
endif
ifeq ($(MACHINE), i686)
libdir = /usr/lib
endif
This is a fine solution, but if you get into situations where you have more variables to set you might consider using constructed variable names instead. I find them easier to read but YMMV.
libdir.x86_64 = /usr/lib64
libdir.i686 = /usr/lib
MACHINE := $(shell uname -m)
libdir = $(libdir.$(MACHINE))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With