I am trying to compile this tool. Below is the beginning of its Makefile:
CC = gcc
CFLAGS = -Wall -O2 -D TRACES
DFLAGS = -g -Wall -o0
CPPFLAGS= $(INCL
The problem is the use of the tilde to mean "Home directory". A shell will do tilde expansion only if the tilde is the first nonquoted character in a word. Makefiles never do tilde expansion. Thus, in
gcc -L~/include ...
the shell does not perform tilde expansion and gcc will look for a directory named "~/include" in the current directory. But in
gcc -L ~/include ...
the shell does perform tilde expansion and gcc sees
gcc -L /usr/username/include ...
instead, which works as expected. The right thing to do is to never use tilde expansion for the home directory, but simply use $HOME appropriately in the Makefile, e.g.
INCLUDE_DIR = $$HOME/include