mirror of
https://github.com/open-simh/simh.git
synced 2026-01-13 15:27:46 +00:00
Adding initial support to display the git commit id in the simulator code.
This commit is contained in:
parent
9e421ada27
commit
f8e68b70b5
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
.git-commit-id
|
||||
#ignore thumbnails created by windows
|
||||
Thumbs.db
|
||||
#Ignore files built by Visual Studio
|
||||
@ -41,3 +42,4 @@ ipch/
|
||||
Visual Studio Projects/*
|
||||
|
||||
|
||||
|
||||
|
||||
13
makefile
13
makefile
@ -296,6 +296,9 @@ ifeq ($(WIN32),) #*nix Environments (&& cygwin)
|
||||
ifneq (binexists,$(shell if $(TEST) -e BIN; then echo binexists; fi))
|
||||
MKDIRBIN = mkdir -p BIN
|
||||
endif
|
||||
ifneq (,$(shell cat .git-commit-id))
|
||||
GIT_COMMIT_ID=$(shell cat .git-commit-id)
|
||||
endif
|
||||
else
|
||||
#Win32 Environments (via MinGW32)
|
||||
GCC = gcc
|
||||
@ -338,7 +341,11 @@ else
|
||||
ifneq ($(USE_NETWORK),)
|
||||
NETWORK_OPT += -DUSE_SHARED
|
||||
endif
|
||||
ifneq (,$(shell if exist .git-commit-id type .git-commit-id))
|
||||
GIT_COMMIT_ID==$(shell if exist .git-commit-id type .git-commit-id)
|
||||
endif
|
||||
endif
|
||||
CFLAGS_GIT = -DSIM_GIT_COMMIT_ID="$(GIT_COMMIT_ID)"
|
||||
ifneq ($(DEBUG),)
|
||||
CFLAGS_G = -g -ggdb -g3
|
||||
CFLAGS_O = -O0
|
||||
@ -406,6 +413,10 @@ ifneq (clean,$(MAKECMDGOALS))
|
||||
ifneq (,$(NETWORK_FEATURES))
|
||||
$(info *** $(NETWORK_FEATURES).)
|
||||
endif
|
||||
ifneq (,$(GIT_COMMIT_ID))
|
||||
$(info ***)
|
||||
$(info *** git commit id is $(GIT_COMMIT_ID).)
|
||||
endif
|
||||
$(info ***)
|
||||
endif
|
||||
ifneq ($(DONT_USE_ROMS),)
|
||||
@ -419,7 +430,7 @@ endif
|
||||
|
||||
CC_STD = -std=c99
|
||||
CC_OUTSPEC = -o $@
|
||||
CC = $(GCC) $(CC_STD) -U__STRICT_ANSI__ $(CFLAGS_G) $(CFLAGS_O) -I . $(OS_CCDEFS) $(ROMS_OPT)
|
||||
CC = $(GCC) $(CC_STD) -U__STRICT_ANSI__ $(CFLAGS_G) $(CFLAGS_O) $(CFLAGS_GIT) -I . $(OS_CCDEFS) $(ROMS_OPT)
|
||||
LDFLAGS = $(OS_LDFLAGS) $(NETWORK_LDFLAGS) $(LDFLAGS_O)
|
||||
|
||||
#
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user