From adf85cbc1756e56c1f52f56235a3c08b3c5b8e05 Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Thu, 13 Dec 2007 16:18:53 +0900 Subject: Build system simplification/standardisation This change makes kexec-tools work more like a standard configure-make- make-install-type project: * Remove $(OBJDIR) stuff. To do an out-of-tree build, just configure from a different directory. * Use the implicit Makefile rules more, and just edit the compiler flags for specific targets. * Simplify compiler/linker flags - no need for EXTRA_* * Add TARGET_CC, and improve checks for BUILD_CC too. * Set arch-specific flags in arch-specific makefiles, not conditional on $(ARCH). * Generate dependency files in the main compile, rather than as a separate step. * Don't #include sha256.c, but re-build it into the purgatory. Still a work-in-progress. Signed-off-by: Jeremy Kerr Signed-off-by: Simon Horman --- util/Makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'util') diff --git a/util/Makefile b/util/Makefile index d6e8e79..5105652 100644 --- a/util/Makefile +++ b/util/Makefile @@ -1,4 +1,8 @@ -BIN_TO_HEX:= $(OBJDIR)/bin/bin-to-hex -$(BIN_TO_HEX): util/bin-to-hex.c - mkdir -p $(@D) - $(BUILD_CC) $(BUILD_CFLAGS) $< -o $@ +BIN_TO_HEX:= bin/bin-to-hex + +$(BIN_TO_HEX): $(srcdir)/util/bin-to-hex.c + @$(MKDIR) -p $(@D) + $(LINK.o) -o $@ $^ + +$(BIN_TO_HEX): CC=$(BUILD_CC) +$(BIN_TO_HEX): CFLAGS=$(BUILD_CFLAGS) -- cgit