aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2014-06-03 15:22:31 -0400
committerKevin O'Connor <kevin@koconnor.net>2014-06-05 10:58:29 -0400
commitec44fac1f69bd3d513204a6192623de511b11144 (patch)
treecbaa0d417d43750ee16598ffd8b5494b83a54af6
parentca34ce5aaa358f096c5ef968833b32dab90ddcdf (diff)
downloadseabios-hppa-ec44fac1f69bd3d513204a6192623de511b11144.zip
seabios-hppa-ec44fac1f69bd3d513204a6192623de511b11144.tar.gz
seabios-hppa-ec44fac1f69bd3d513204a6192623de511b11144.tar.bz2
build: Avoid absolute paths during "whole-program" compiling.
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>
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index fb4e683..edc8d8d 100644
--- 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