aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhpa <hpa>2001-12-13 07:34:25 +0000
committerhpa <hpa>2001-12-13 07:34:25 +0000
commit0081c187002a264d211abcc6f32179a51230e0ba (patch)
tree2662e58373bb6a67681ecf5c59fa200b8577d015
parent86d8533fbfd63673f020718c72835642c0b855fb (diff)
downloadsyslinux.git-0081c187002a264d211abcc6f32179a51230e0ba.tar.gz
syslinux.git-0081c187002a264d211abcc6f32179a51230e0ba.tar.xz
syslinux.git-0081c187002a264d211abcc6f32179a51230e0ba.zip
Print a copyright string in memdisk; clean up the handling of dates
somewhat.
-rw-r--r--Makefile20
-rw-r--r--memdisk/Makefile5
-rw-r--r--memdisk/setup.c5
3 files changed, 18 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index d764825c..1f101696 100644
--- a/Makefile
+++ b/Makefile
@@ -46,6 +46,16 @@ OBSOLETE = pxelinux.bin
# Things to install in /usr/bin
INSTALL_BIN = syslinux gethostip ppmtolss16 lss16toppm
+# The DATE is set on the make command line when building binaries for
+# official release. Otherwise, substitute a hex string that is pretty much
+# guaranteed to be unique to be unique from build to build.
+ifndef HEXDATE
+HEXDATE := $(shell perl now.pl ldlinux.asm pxelinux.asm isolinux.asm)
+endif
+ifndef DATE
+DATE := $(HEXDATE)
+endif
+
all: $(BTARGET) $(ITARGET) samples memdisk
ls -l $(BTARGET) $(ITARGET) memdisk/memdisk
@@ -60,16 +70,6 @@ samples:
memdisk:
$(MAKE) -C memdisk all
-# The DATE is set on the make command line when building binaries for
-# official release. Otherwise, substitute a hex string that is pretty much
-# guaranteed to be unique to be unique from build to build.
-ifndef HEXDATE
-HEXDATE := $(shell perl now.pl ldlinux.asm pxelinux.asm)
-endif
-ifndef DATE
-DATE := $(HEXDATE)
-endif
-
ldlinux.bin: ldlinux.asm
$(NASM) -f bin -dVERSION="'$(VERSION)'" -dDATE_STR="'$(DATE)'" \
-dHEXDATE="$(HEXDATE)" \
diff --git a/memdisk/Makefile b/memdisk/Makefile
index 70d6f69d..9dfa9b68 100644
--- a/memdisk/Makefile
+++ b/memdisk/Makefile
@@ -11,9 +11,12 @@
##
## -----------------------------------------------------------------------
+VERSION := $(shell cat ../version)
+
CC = gcc
CFLAGS = -Wall -O2 -fomit-frame-pointer -march=i386 \
- -malign-functions=0 -malign-jumps=0 -malign-loops=0
+ -malign-functions=0 -malign-jumps=0 -malign-loops=0 \
+ -DVERSION=\"$(VERSION)\" -DDATE=\"$(DATE)\"
LDFLAGS =
AS = as
LD = ld
diff --git a/memdisk/setup.c b/memdisk/setup.c
index 1d1c2d57..04c2aaac 100644
--- a/memdisk/setup.c
+++ b/memdisk/setup.c
@@ -15,6 +15,8 @@
#include "e820.h"
#include "conio.h"
+#define COPYYEAR "2001"
+
extern const char _binary_memdisk_bin_start[], _binary_memdisk_bin_end[];
extern const char _binary_memdisk_bin_size[]; /* Weird, I know */
@@ -392,7 +394,8 @@ uint32_t setup(void)
int total_size;
/* Show signs of life */
- puts("Memdisk: Hello, World!\n");
+ puts("MEMDISK " VERSION " " DATE
+ " Copyright " COPYYEAR " H. Peter Anvin\n");
if ( !shdr->ramdisk_image || !shdr->ramdisk_size ) {
puts("MEMDISK: No ramdisk image specified!\n");