]> xenbits.xensource.com Git - seabios.git/commitdiff
build: Avoid absolute paths during "whole-program" compiling.
authorKevin O'Connor <kevin@koconnor.net>
Tue, 3 Jun 2014 19:22:31 +0000 (15:22 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Thu, 5 Jun 2014 14:58:29 +0000 (10:58 -0400)
The build currently does a textual include of all files in order to
use the -fwhole-compile optimization.  Update it to use relative file
paths instead of absolute file paths.  This makes the section names in
the resulting binary more readable.  It also makes the build easier on
some Windows hosts.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Makefile

index fb4e683d57e92ddad97569e02cd2e2ac19d0d3a9..edc8d8d0c6041358fb0bb940fbef088eaec3db5b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -111,8 +111,8 @@ endif
 # Do a whole file compile by textually including all C code.
 define whole-compile
 @echo "  Compiling whole program $3"
-$(Q)printf '$(foreach i,$2,#include "$(CURDIR)/$i"\n)' > $3.tmp.c
-$(Q)$(CC) $1 $(CFLAGSWHOLE) -c $3.tmp.c -o $3
+$(Q)printf '$(foreach i,$2,#include "$i"\n)' > $3.tmp.c
+$(Q)$(CC) -I. $1 $(CFLAGSWHOLE) -c $3.tmp.c -o $3
 endef
 
 %.strip.o: %.o