clean up makefile a bit

Random fixes:
 - drop -fPIC as that is for shared library code, not applications
 - move -D/-I paths out of CXXFLAGS and into CPPFLAGS
 - add -D_LARGEFILE_SOURCE to go with -D_FILE_OFFSET_BITS=64
 - add the pkg-config's CPPFLAGS to CPPFLAGS
 - rename LINK_FLAGS to LDLIBS
 - simplify redundant output dir logic
 - respect LDFLAGS when linking
 - respect CPPFLAGS when compiling

BUG=None
TEST=`make` still worked

Change-Id: I492e0fac09bbd908f53ec1becad25570b40ffa0d
1 file changed