This commit is contained in:
2026-10-02 22:42:24 +02:00
parent 71b5ea79be
commit 055d2c5f12
3 changed files with 34 additions and 26 deletions
+20 -13
View File
@@ -4,7 +4,7 @@ PROJECT_DIR ?= $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
BUILD_DIR ?= $(PROJECT_DIR)/build BUILD_DIR ?= $(PROJECT_DIR)/build
FORGE_SRC ?= $(PROJECT_DIR)/forge-steel FORGE_SRC ?= $(PROJECT_DIR)/forge-steel
TARGET ?= forge TARGET ?= forge
RUN_ARGS ?= --project=$(PROJECT_DIR)/project --internal-size=576 --auto-save RUN_ARGS ?= --project=$(PROJECT_DIR)/project --internal-size=576 -nmr -t=10 --auto-save
VERSION ?= invar-$(shell grep -Eo '[0-9]+\.[0-9]+\.[0-9]+' $(FORGE_SRC)/configure.ac) VERSION ?= invar-$(shell grep -Eo '[0-9]+\.[0-9]+\.[0-9]+' $(FORGE_SRC)/configure.ac)
SOURCES ?= $(FORGE_SRC)/src/*.h $(FORGE_SRC)/src/*.c $(FORGE_SRC)/hashmap.c/hashmap.c $(FORGE_SRC)/log.c/src/log.c SOURCES ?= $(FORGE_SRC)/src/*.h $(FORGE_SRC)/src/*.c $(FORGE_SRC)/hashmap.c/hashmap.c $(FORGE_SRC)/log.c/src/log.c
CFLAGS ?= -Ofast -Ofast -march=native -flto -funroll-loops -fprefetch-loop-arrays -fno-exceptions -fopenmp -I$(FORGE_SRC)/include -DGLFW_INCLUDE_NONE -DGLFW_NATIVE_INCLUDE_NONE -DLOG_USE_COLOR -DVERSION=\"$(VERSION)\" -DOPENGL_MAJOR_VERSION=3 -DOPENGL_MINOR_VERSION=1 CFLAGS ?= -Ofast -Ofast -march=native -flto -funroll-loops -fprefetch-loop-arrays -fno-exceptions -fopenmp -I$(FORGE_SRC)/include -DGLFW_INCLUDE_NONE -DGLFW_NATIVE_INCLUDE_NONE -DLOG_USE_COLOR -DVERSION=\"$(VERSION)\" -DOPENGL_MAJOR_VERSION=3 -DOPENGL_MINOR_VERSION=1
@@ -15,18 +15,19 @@ LDLIBS ?= -lm -lGL -lglfw -lasound
test: test:
echo $(PROJECT_DIR) echo $(PROJECT_DIR)
forge-steel/src/main.c: # forge-steel/src/main.c:
$(MAKE) -s submodule-init # $(MAKE) -s submodule-init
#
forge-steel/hashmap.c/hashmap.c: # forge-steel/hashmap.c/hashmap.c:
$(MAKE) -s submodule-init # $(MAKE) -s submodule-init
#
forge-steel/log.c/src/log.c: # forge-steel/log.c/src/log.c:
$(MAKE) -s submodule-init # $(MAKE) -s submodule-init
#
forge-steel/include/linmath.h: # forge-steel/include/linmath.h:
$(MAKE) -s submodule-init # $(MAKE) -s submodule-init
# $(BUILD_DIR)/$(TARGET): forge-steel/src/main.c forge-steel/hashmap.c/hashmap.c forge-steel/log.c/src/log.c forge-steel/include/linmath.h
$(BUILD_DIR)/$(TARGET): forge-steel/src/main.c forge-steel/hashmap.c/hashmap.c forge-steel/log.c/src/log.c forge-steel/include/linmath.h $(BUILD_DIR)/$(TARGET): forge-steel/src/main.c forge-steel/hashmap.c/hashmap.c forge-steel/log.c/src/log.c forge-steel/include/linmath.h
mkdir -p $(BUILD_DIR) mkdir -p $(BUILD_DIR)
$(CC) $(SOURCES) $(CFLAGS) $(LDLIBS) -o $(BUILD_DIR)/$(TARGET) $(CC) $(SOURCES) $(CFLAGS) $(LDLIBS) -o $(BUILD_DIR)/$(TARGET)
@@ -58,6 +59,12 @@ setup-rasp-config:
remove-motd: remove-motd:
sudo rm -rf /etc/motd sudo rm -rf /etc/motd
.PHONY: disable-cloud-init
disable-cloud-init:
sudo systemctl disable cloud-init.service
sudo systemctl mask cloud-init.service
sudo touch /etc/cloud/cloud-init.disabled
.PHONY: setup-services .PHONY: setup-services
setup-services: setup-services:
sudo ln -fs $(PROJECT_DIR)/system/getty@tty1.service /etc/systemd/system/getty@tty1.service sudo ln -fs $(PROJECT_DIR)/system/getty@tty1.service /etc/systemd/system/getty@tty1.service
@@ -94,6 +101,6 @@ start-weston:
.PHONY: host-install .PHONY: host-install
host-install: host-install:
sudo chmod a+rwx /run/media/$(shell whoami)/rootfs/opt/ sudo chmod a+rwx /run/media/$(shell whoami)/rootfs/opt/
cp -r . /run/media/$(shell whoami)/rootfs/opt/ rsync -a $(PWD) /run/media/$(shell whoami)/rootfs/opt/
sudo umount -R /run/media/$(shell whoami)/rootfs sudo umount -R /run/media/$(shell whoami)/rootfs
sudo umount -R /run/media/$(shell whoami)/bootfs sudo umount -R /run/media/$(shell whoami)/bootfs
+4 -2
View File
@@ -275,7 +275,7 @@ KEY_TEMPO_DOWN=1264
KEY_TEMPO_UP=1265 KEY_TEMPO_UP=1265
# Number of load states keys # Number of load states keys
KEY_LOAD_COUNT=15 KEY_LOAD_COUNT=16
# 1 to 9 then 0 keys # 1 to 9 then 0 keys
KEY_LOAD_1=1320 KEY_LOAD_1=1320
@@ -293,9 +293,10 @@ KEY_LOAD_12=1332
KEY_LOAD_13=1333 KEY_LOAD_13=1333
KEY_LOAD_14=1334 KEY_LOAD_14=1334
KEY_LOAD_15=1259 KEY_LOAD_15=1259
KEY_LOAD_16=1330
# Number of save states keys # Number of save states keys
KEY_SAVE_COUNT=15 KEY_SAVE_COUNT=16
# 1 to 9 then 0 keys with shift # 1 to 9 then 0 keys with shift
KEY_SAVE_1=11320 KEY_SAVE_1=11320
@@ -313,3 +314,4 @@ KEY_SAVE_12=11332
KEY_SAVE_13=11333 KEY_SAVE_13=11333
KEY_SAVE_14=11334 KEY_SAVE_14=11334
KEY_SAVE_15=11259 KEY_SAVE_15=11259
KEY_SAVE_16=11330
+10 -11
View File
@@ -1,22 +1,21 @@
#ifndef INC_SENTENCES #ifndef INC_SENTENCES
#define INC_SENTENCES #define INC_SENTENCES
#define SENTENCE_COUNT 9 #define SENTENCE_COUNT 8
#define SENTENCE_MAX_LENGTH 20 #define SENTENCE_MAX_LENGTH 20
const int sentences[] = int[SENTENCE_COUNT * SENTENCE_MAX_LENGTH]( const int sentences[] = int[SENTENCE_COUNT * SENTENCE_MAX_LENGTH](
0x4C, 0x45, 0x20, 0x46, 0x4F, 0x4C, 0x4C, 0x45, 0x20, 0x4E, 0x55, 0x49, 0x54, 0x20, 0x44, 0x55, 0x20, 0x34, 0x30, 0x00, 0x46, 0x6F, 0x6C, 0x6C, 0x65, 0x20, 0x4E, 0x75, 0x69, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x46, 0x4F, 0x4C, 0x4C, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x75, 0x20, 0x51, 0x75, 0x61, 0x72, 0x61, 0x6E, 0x74, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x4E, 0x55, 0x49, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4C, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x44, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x6F, 0x6C, 0x6C, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x34, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4E, 0x75, 0x69, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x35, 0x33, 0xB0, 0x20, 0x4D, 0x49, 0x45, 0x54, 0x54, 0x45, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x6C, 0x61, 0x20, 0x66, 0x6F, 0x6C, 0x6C, 0x65, 0x20, 0x6E, 0x75, 0x69, 0x74, 0x20, 0x64, 0x75, 0x20, 0x34, 0x30, 0x00, 0x51, 0x75, 0x61, 0x72, 0x61, 0x6E, 0x74, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x46, 0x4F, 0x4C, 0x4C, 0x45, 0x20, 0x4E, 0x55, 0x49, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x35, 0x33, 0xF8, 0x20, 0x4D, 0x69, 0x65, 0x74, 0x74, 0x65, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
0x44, 0x55, 0x20, 0x34, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
); );
const int lengths[] = int[SENTENCE_COUNT]( const int lengths[] = int[SENTENCE_COUNT](
19, 5, 4, 2, 2, 11, 19, 10, 5 10, 11, 2, 5, 4, 2, 8, 11
); );
#endif #endif