You see that the line
gcc -lm density.c -o density
is in the makefile.
We know alreadyy that you see nothing if you execute on the commandline
g++ -lm density.c -o density
But what do you see if you execute
gcc -lm density.c -o density
Please report. Meanwile i will look at the makefile.