From 3dba4c236d1f25dfeb88b01c13b1e87e407a5b11 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sat, 29 Jan 2011 11:26:54 -0500 Subject: [PATCH] Support non-local build directory - allow "make OUT=abc/" to work. Don't require the build directory to be the "out/" directory of the SeaBIOS source. --- Makefile | 3 ++- src/config.h | 2 +- src/romlayout.S | 4 ++-- vgasrc/vgaentry.S | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index f8f8fc4..b19281d 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,8 @@ cc-option = $(shell if test -z "`$(1) $(2) -S -o /dev/null -xc \ /dev/null 2>&1`"; then echo "$(2)"; else echo "$(3)"; fi ;) # Default compiler flags -COMMONCFLAGS = -Os -MD -Wall -Wno-strict-aliasing -Wold-style-definition \ +COMMONCFLAGS = -I$(OUT) -Os -MD \ + -Wall -Wno-strict-aliasing -Wold-style-definition \ $(call cc-option,$(CC),-Wtype-limits,) \ -m32 -march=i386 -mregparm=3 -mpreferred-stack-boundary=2 \ -mrtd -minline-all-stringops \ diff --git a/src/config.h b/src/config.h index 6356941..467ea89 100644 --- a/src/config.h +++ b/src/config.h @@ -1,7 +1,7 @@ #ifndef __CONFIG_H #define __CONFIG_H -#include "../out/autoconf.h" +#include "autoconf.h" // Configuration definitions. diff --git a/src/romlayout.S b/src/romlayout.S index 3dfec78..f540c1e 100644 --- a/src/romlayout.S +++ b/src/romlayout.S @@ -11,13 +11,13 @@ ****************************************************************/ .code16gcc -.include "out/ccode.16.s" +#include "ccode.16.s" #include "config.h" // CONFIG_* #include "ioport.h" // PORT_A20 #include "bregs.h" // CR0_* #include "cmos.h" // CMOS_RESET_CODE -#include "../out/asm-offsets.h" // BREGS_* +#include "asm-offsets.h" // BREGS_* #include "entryfuncs.S" // ENTRY_* diff --git a/vgasrc/vgaentry.S b/vgasrc/vgaentry.S index b99cf6f..fbfa9f7 100644 --- a/vgasrc/vgaentry.S +++ b/vgasrc/vgaentry.S @@ -10,7 +10,7 @@ ****************************************************************/ .code16gcc -.include "out/vgaccode.16.s" +#include "vgaccode.16.s" #include "entryfuncs.S" // ENTRY_* -- 2.25.1