mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2026-04-26 03:51:46 +00:00
Make Git hash only dev or debug
This commit is contained in:
parent
af15844a69
commit
60e81e2bd2
1 changed files with 6 additions and 9 deletions
15
Makefile
15
Makefile
|
|
@ -334,15 +334,6 @@ OPT_FLAGS += $(BITS)
|
|||
|
||||
TARGET := sm64.$(VERSION)
|
||||
|
||||
# Stuff for showing the git hash and build time in dev builds
|
||||
# Originally from https://stackoverflow.com/questions/44038428/include-git-commit-hash-and-or-branch-name-in-c-c-source
|
||||
ifneq ($(shell git rev-parse --abbrev-ref HEAD),main)
|
||||
GIT_HASH=$(shell git rev-parse --short HEAD)
|
||||
COMPILE_TIME=$(shell date -u +'%Y-%m-%d %H:%M:%S UTC')
|
||||
C_DEFINES += -DGIT_HASH="\"$(GIT_HASH)\"" -DCOMPILE_TIME="\"$(COMPILE_TIME)\""
|
||||
endif
|
||||
|
||||
|
||||
# GRUCODE - selects which RSP microcode to use.
|
||||
# f3d_old - default for JP and US versions
|
||||
# f3d_new - default for EU and Shindou versions
|
||||
|
|
@ -1024,6 +1015,12 @@ ifeq ($(IS_DEV_OR_DEBUG),0)
|
|||
ifeq ($(OSX_BUILD),0)
|
||||
LDFLAGS += -Wl,--build-id=none
|
||||
endif
|
||||
|
||||
# Stuff for showing the git hash and build time in dev builds
|
||||
# Originally from https://stackoverflow.com/questions/44038428/include-git-commit-hash-and-or-branch-name-in-c-c-source
|
||||
GIT_HASH=$(shell git rev-parse --short HEAD)
|
||||
COMPILE_TIME=$(shell date -u +'%Y-%m-%d %H:%M:%S UTC')
|
||||
C_DEFINES += -DGIT_HASH="\"$(GIT_HASH)\"" -DCOMPILE_TIME="\"$(COMPILE_TIME)\""
|
||||
endif
|
||||
|
||||
# Enable ASLR
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue