aboutsummaryrefslogtreecommitdiffstats
path: root/memdisk
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2008-07-07 15:21:56 -0700
committerH. Peter Anvin <hpa@zytor.com>2008-07-07 15:21:56 -0700
commit07ff8e874b0bd1d1c4fa893c94063fbedf6e3315 (patch)
tree38fdb21cf0feb6a7c68acdc767833a9b25edb504 /memdisk
parentfd40500625723610a9abe7fb20775da4d88ca4dc (diff)
downloadsyslinux-elf-07ff8e874b0bd1d1c4fa893c94063fbedf6e3315.tar.gz
syslinux-elf-07ff8e874b0bd1d1c4fa893c94063fbedf6e3315.tar.xz
syslinux-elf-07ff8e874b0bd1d1c4fa893c94063fbedf6e3315.zip
Centralize more of the version number machinery
Centralize more (most) of the version number machinery to version.pl.
Diffstat (limited to 'memdisk')
-rw-r--r--memdisk/Makefile7
-rw-r--r--memdisk/memdisk.asm2
-rw-r--r--memdisk/setup.c5
3 files changed, 8 insertions, 6 deletions
diff --git a/memdisk/Makefile b/memdisk/Makefile
index 1ce43c2a..005ab1d4 100644
--- a/memdisk/Makefile
+++ b/memdisk/Makefile
@@ -10,7 +10,8 @@
##
## -----------------------------------------------------------------------
-VERSION := $(shell cat ../version)
+topdir = ..
+include $(topdir)/version.mk
TMPFILE = $(shell mktemp /tmp/gcc_ok.XXXXXX)
@@ -25,14 +26,14 @@ FREE := $(call gcc_ok,-ffreestanding,) $(call gcc_ok,-fno-stack-protector,)
CFLAGS = $(M32) $(FREE) -g -W -Wall -Wno-sign-compare \
-Os -fomit-frame-pointer -march=i386 -mregparm=3 $(ALIGN) \
- -DVERSION='"$(VERSION)"' -DDATE='"$(DATE)"'
+ -DDATE='"$(DATE)"'
SFLAGS = $(M32) -march=i386 -D__ASSEMBLY__
LDFLAGS = $(M32) -g
INCLUDE = -I../com32/include
LD = ld -m elf_i386
NASM = nasm
NASMOPT = -O9999
-NFLAGS = -dVERSION='"$(VERSION)"' -dDATE='"$(DATE)"' -dWITH_EDD
+NFLAGS = -dDATE='"$(DATE)"' -dWITH_EDD
NINCLUDE =
OBJCOPY = objcopy
PERL = perl
diff --git a/memdisk/memdisk.asm b/memdisk/memdisk.asm
index 15d662d2..eb4370ab 100644
--- a/memdisk/memdisk.asm
+++ b/memdisk/memdisk.asm
@@ -918,7 +918,7 @@ Mover_dummy2: dd 0, 0, 0, 0 ; More space for the BIOS
alignb 4, db 0
MemDisk_Info equ $ ; Pointed to by installation check
MDI_Bytes dw MDI_Len ; Total bytes in MDI structure
-MDI_Version db VER_MINOR, VER_MAJOR ; MEMDISK version
+MDI_Version db VERSION_MINOR, VERSION_MAJOR ; MEMDISK version
PatchArea equ $ ; This gets filled in by the installer
diff --git a/memdisk/setup.c b/memdisk/setup.c
index 32dd8ed5..b9466335 100644
--- a/memdisk/setup.c
+++ b/memdisk/setup.c
@@ -15,11 +15,12 @@
#include "conio.h"
#include "version.h"
#include "memdisk.h"
+#include "../version.h"
const char memdisk_version[] =
-"MEMDISK " VERSION " " DATE;
+"MEMDISK " VERSION_STR " " DATE;
const char copyright[] =
-"Copyright " FIRSTYEAR "-" COPYYEAR " H. Peter Anvin";
+"Copyright " FIRSTYEAR "-" YEAR_STR " H. Peter Anvin";
extern const char _binary_memdisk_bin_start[], _binary_memdisk_bin_end[];
extern const char _binary_memdisk_bin_size[]; /* Weird, I know */