summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2015-06-03 19:17:12 -0400
committerKevin O'Connor <kevin@koconnor.net>2015-06-03 19:22:38 -0400
commit624e812764beda88b47c0018b1cee3b86d5c59eb (patch)
tree2e1286a36fb05a9f5f78f9267c3825410f6523a1 /Makefile
parentbe050664fdd1699fe7bcf3a9b6faff07172a83d6 (diff)
downloadqemu-seabios-624e812764beda88b47c0018b1cee3b86d5c59eb.tar.gz
build: Support "make VERSION=xyz" to override the default build version
Add a build option to explicitly set the version information compiled into the seabios and seavgabios binaries. This may assist in reproducible builds or to better link builds to distribution packages. If the new "VERSION=" parameter is not provided then the default build version remains unchanged. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 96aec48..f97b1bd 100644
--- a/Makefile
+++ b/Makefile
@@ -155,7 +155,7 @@ $(OUT)romlayout.o: src/romlayout.S $(OUT)autoconf.h $(OUT)asm-offsets.h
$(OUT)romlayout16.lds: $(OUT)ccode32flat.o $(OUT)code32seg.o $(OUT)ccode16.o $(OUT)romlayout.o scripts/layoutrom.py scripts/buildversion.sh
@echo " Building ld scripts"
- $(Q)./scripts/buildversion.sh $(OUT)version.c
+ $(Q)BUILD_VERSION="$(VERSION)" ./scripts/buildversion.sh $(OUT)version.c
$(Q)$(CC) $(CFLAGS32FLAT) -c $(OUT)version.c -o $(OUT)version.o
$(Q)$(LD) $(LD32BIT_FLAG) -r $(OUT)ccode32flat.o $(OUT)version.o -o $(OUT)code32flat.o
$(Q)$(LD) $(LD32BIT_FLAG) -r $(OUT)ccode16.o $(OUT)romlayout.o -o $(OUT)code16.o
@@ -227,7 +227,7 @@ $(OUT)vgaentry.o: vgasrc/vgaentry.S $(OUT)autoconf.h $(OUT)asm-offsets.h
$(OUT)vgarom.o: $(OUT)vgaccode16.o $(OUT)vgaentry.o $(OUT)vgasrc/vgalayout.lds scripts/buildversion.sh
@echo " Linking $@"
- $(Q)./scripts/buildversion.sh $(OUT)vgaversion.c VAR16
+ $(Q)BUILD_VERSION="$(VERSION)" ./scripts/buildversion.sh $(OUT)vgaversion.c VAR16
$(Q)$(CC) $(CFLAGS16) -c $(OUT)vgaversion.c -o $(OUT)vgaversion.o
$(Q)$(LD) --gc-sections -T $(OUT)vgasrc/vgalayout.lds $(OUT)vgaccode16.o $(OUT)vgaentry.o $(OUT)vgaversion.o -o $@