@echo "Please don't call the install target directly, it doesn't work."
@exit 1
-all-local: external loader boot bits
+all-local: external loader boot bits patch
mkdir -p out
mkdir -p out@prefix@
mkdir -p out@libdir@/module
{ NULL, NULL, unselectable, 0, NULL, NULL, 0, 0 }, // cursor_min and cursor_max are stored in the last two.
};
+
+#define quote(x) #x
+#define string(x) quote(x)
+
+static struct options_s build_d[] = {
+ lnh("Build Info"),
+ ln (" Commit hash"),
+ ln (" " string(REVISION) " (" string(BRANCH) ")"),
+ ln (" Compiler"),
+ ln (" " string(COMPILER_ID) ),
+ ln (" Build configuration" ),
+ ln (" " string(CONFIGURE_OPTIONS) ),
+ { NULL, NULL, unselectable, 0, NULL, NULL, 0, 0 }, // cursor_min and cursor_max are stored in the last two.
+};
+
static struct options_s main_s[] = {
{ "Configuration",
"Configuration options for the CFW.",
{ "Readme",
"Mini-readme.\nWhy are you opening help on this, though?\nThat's kind of silly.",
option, help_d, (void(*)(void*))show_menu, NULL, 0, 0 },
+ { "Build Info",
+ "Information such as GCC version for build, commit hash, flags, etc",
+ option, build_d, (void(*)(void*))show_menu, NULL, 0, 0 },
{ "Reboot",
"Reboots the console.",
option, 0, reset, NULL, 0, 0 },
SIZE_OPTIMIZATION = -Wl,--gc-sections -ffunction-sections
-REVISION := $(shell git rev-parse HEAD | head -c10)+$(shell git rev-list --count HEAD)
+REVISION := $(shell git rev-parse HEAD)
+COMMIT_COUNT := $(shell git rev-list --count HEAD)
+BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
AM_CFLAGS= -std=gnu11 -Os -g -ffast-math \
-Wpedantic -Wall -Wextra -Wcast-align -Wcast-qual \
-Wshadow -Wsign-conversion -Wstrict-overflow=5 -Wswitch-default \
-Wundef -Wno-unused -Werror -Wno-error=cast-align -Wno-error=strict-overflow -Wno-error=pedantic \
$(THUMBFLAGS) $(SIZE_OPTIMIZATION) $(INCPATHS) $(C9FLAGS) \
- -fno-builtin -std=gnu11 -DREVISION=\"$(REVISION)\" \
+ -fno-builtin -std=gnu11 -DREVISION=$(REVISION) -DBRANCH=$(BRANCH) -DCOMMIT_COUNT=$(COMMIT_COUNT) \
-DFW_NAME=\"corbenik\" $(PATHARGS) -DMALLOC_DEBUG=1
# -fsanitize=undefined
AC_INIT([Corbenik], [0.3.0], [https://github.com/chaoskagami/corbenik], [corbenik])
+
+export CONFIGURE_OPTIONS="$@"
+
AM_INIT_AUTOMAKE([foreign no-dist-gzip dist-xz subdir-objects])
# Find AR and RANLIB for lto support before initializing libtool
test "$enable_chainloader" = "no" && CHAINLOADER=0
AC_DEFINE_UNQUOTED([CHAINLOADER], [$CHAINLOADER])
+COMPILER_ID="$($CC --version | head -n1)"
+AC_DEFINE_UNQUOTED([COMPILER_ID], [$COMPILER_ID])
+
+AC_DEFINE_UNQUOTED([CONFIGURE_OPTIONS], [$CONFIGURE_OPTIONS])
+
AC_CONFIG_FILES([Makefile boot/Makefile external/Makefile include/Makefile])
AC_CONFIG_SUBDIRS([external/libctr9])
ocflags: ${OCFLAGS}
Chainloader: ${CHAINLOADER}
+
+Configure: ${CONFIGURE_OPTIONS}
+Compiler ID: ${COMPILER_ID}
"