hdctools: build: fix CFLAGS/CPPFLAGS handling, and unify compile/link steps
We shouldn't ignore the CFLAGS from the build env, so use ?= to initialize
the -O2 -g settings.
CPPFLAGS is for preprocessor flags like -D/-I, so use that variable for
those settings and split them out of CFLAGS completely. This also lets
us respect the build env CPPFLAGS settings.
Since none of the current compile rules respect CPPFLAGS, we have to fix
that. But rather than just adding $(CPPFLAGS) everywhere, unify these
compile steps into a single COMPILE.c variable. And since that looks
pretty, go ahead and unify all the link steps into a single LINK.c too.
TEST=`emerge hdctools` still works and installs same files
Commit-Ready: Mike Frysinger <firstname.lastname@example.org>
Reviewed-by: Mike Frysinger <email@example.com>
Tested-by: Mike Frysinger <firstname.lastname@example.org>
5 files changed