aboutsummaryrefslogtreecommitdiffstats
path: root/com32/sysdump/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'com32/sysdump/Makefile')
-rw-r--r--com32/sysdump/Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/com32/sysdump/Makefile b/com32/sysdump/Makefile
index 4ac235a8..bffee3a2 100644
--- a/com32/sysdump/Makefile
+++ b/com32/sysdump/Makefile
@@ -17,6 +17,7 @@
topdir = ../..
include ../MCONFIG
+-include $(topdir)/version.mk
LIBS = ../libutil/libutil_com.a ../lib/libcom32.a $(LIBGCC)
LNXLIBS = ../libutil/libutil_lnx.a
@@ -24,13 +25,17 @@ LNXLIBS = ../libutil/libutil_lnx.a
MODULES = sysdump.c32
TESTFILES =
-OBJS = $(patsubst %.c,%.o,$(wildcard *.c))
+SRCS = $(wildcard *.c)
+OBJS = $(patsubst %.c,%.o,$(SRCS))
# 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) $(topdir)/now.pl $(SRCS) $(wildcard *.h))
+endif
ifndef DATE
-DATE := $(shell sh ../gen-id.sh $(VERSION) $(HEXDATE))
+DATE := $(shell sh $(topdir)/gen-id.sh $(VERSION) $(HEXDATE))
endif
CFLAGS += -DDATE='"$(DATE)"'