hdctools: build: fix linking order (and LDFLAGS vs LDLIBS)

Linked libraries should not be specified via LDFLAGS because this messes
up the linking behavior -- all libraries must come after the objects, and
all linker flags must come before the objects.

Rename LIBFTDI_LDFLAGS to LIBFTDI_LDLIBS to reflect this, and then move
all the local libraries into the standard LDLIBS variable.

BUG=None
TEST=`emerge hdctools` still works and installs same files (even with -Wl,--as-needed)

Change-Id: I14e96db2d59aef807cc0d773694497b0099798a2
Reviewed-on: https://gerrit.chromium.org/gerrit/18287
Reviewed-by: Todd Broch <tbroch@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
5 files changed