Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pygrt/C_extension/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ LIBS_NAME := lib$(LNAME).a
LIBD_NAME := lib$(LNAME).so

VERSION := v$(shell cat version )
DATE := $(shell date +%Y-%m-%d)


# link options for FFTW
Expand Down Expand Up @@ -47,7 +48,7 @@ CFLAGS2 :=
# at least for now, it's not a big problem.
CFLAGS := -O3 -std=gnu99 \
-fPIC -Wall -Wextra -I$(shell realpath $(INC_DIR)) $(CFLAGS2) \
-DGRT_VERSION=\"$(VERSION)\" -D_GNU_SOURCE $(ARCH) $(FOMPFLAGS)
-DGRT_VERSION=\"$(VERSION)\" -DGRT_DATE=\"$(DATE)\" -D_GNU_SOURCE $(ARCH) $(FOMPFLAGS)
# -fdump-tree-all -g -ffast-math -O3 -fno-associative-math -march=native -mtune=native
# -Wconversion -Wsign-conversion -Wfloat-conversion -Wcast-qual -Wcast-align

Expand Down
6 changes: 3 additions & 3 deletions pygrt/C_extension/include/grt/common/logo.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ printf(BOLD_GREEN "\n"
"║ Code Homepage: https://github.com/Dengda98/PyGRT ║\n"
"║ License: GPL-3.0 license ║\n"
"║ Version: %-20s ║\n"
"║ Last Update: %-20s ║\n"
"║ ║\n"
"║ ║\n"
"║ A Command-Line Tool for Computing Synthetic Seismograms ║\n"
"║ in Horizontally Layered Halfspace Model, ║\n"
"║ using Generalized Reflection-Transmission Method(GRTM) ║\n"
"║ and Discrete Wavenumber Method(DWM). ║\n"
"║ based on Generalized Reflection-Transmission Method (GRTM) ║\n"
"║ ║\n"
"╚═══════════════════════════════════════════════════════════════╝\n"
DEFAULT_RESTORE, GRT_VERSION);
DEFAULT_RESTORE, GRT_VERSION, GRT_DATE);

}
5 changes: 5 additions & 0 deletions pygrt/C_extension/include/grt/common/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@
#define GRT_VERSION "none" ///< 默认值,编译时会被替换

#endif

#ifndef GRT_DATE
#define GRT_DATE "none" ///< 默认值,编译时会被替换

#endif
Loading