65 lines
2.1 KiB
Groff
Executable File
65 lines
2.1 KiB
Groff
Executable File
# ==============================================================================
|
|
# OREBOLT OS v1.5 -- Hardware Library + Payload Matrix
|
|
# ==============================================================================
|
|
# Builds liborebolt.a (static archive) from src/modules/*.c and runs
|
|
# inject_payloads.sh to regenerate the 150-payload HID macro matrix under
|
|
# overlay/data/payloads/{linux,macos,windows}/.
|
|
#
|
|
# v1.5 changes:
|
|
# * Bumped from v1.4.
|
|
# * No source changes to liborebolt.a -- stubs remain for hardware-
|
|
# specific modules (mod_core_hid, mod_panic_*, etc.) until real
|
|
# hardware register definitions are available.
|
|
# * bitchat mesh still compiled with -DAGPL_BITCHAT.
|
|
# ==============================================================================
|
|
|
|
CROSS ?= mipsel-linux-musl-
|
|
CC := $(CROSS)gcc
|
|
AR := $(CROSS)ar
|
|
RANLIB := $(CROSS)ranlib
|
|
|
|
KERNEL_HEADERS ?= /opt/fiio-m3k-linux
|
|
HARDWARE_GPIO ?= 0
|
|
|
|
ARCHFLAGS := -march=mips32r2 -mhard-float -Os -fPIC -fno-strict-aliasing -Wall
|
|
INCLUDES := -Iinclude -Isrc/modules \
|
|
-I$(KERNEL_HEADERS)/include/uapi \
|
|
-I$(KERNEL_HEADERS)/arch/mips/include \
|
|
-I$(KERNEL_HEADERS)/arch/mips/include/asm/mach-jz4760
|
|
|
|
CFLAGS := $(ARCHFLAGS) $(INCLUDES) \
|
|
-DHARDWARE_GPIO=$(HARDWARE_GPIO)
|
|
|
|
OREBOLT_SRCS := \
|
|
src/modules/mod_core_hid.c \
|
|
src/modules/mod_forensics.c \
|
|
src/modules/mod_panic_hardware_purge.c \
|
|
src/modules/mod_panic_purge.c \
|
|
src/modules/mod_radio_input_multiplex.c \
|
|
src/modules/mod_ui_frame_graphics.c \
|
|
src/modules/mod_bitchat_mesh.c
|
|
|
|
OREBOLT_OBJS := $(OREBOLT_SRCS:.c=.o)
|
|
|
|
.PHONY: all clean payloads
|
|
|
|
all: liborebolt.a payloads
|
|
|
|
liborebolt.a: $(OREBOLT_OBJS)
|
|
@echo ">>> Archiving liborebolt.a..."
|
|
$(AR) rcs $@ $(OREBOLT_OBJS)
|
|
$(RANLIB) $@
|
|
|
|
src/modules/mod_bitchat_mesh.o: src/modules/mod_bitchat_mesh.c
|
|
$(CC) $(CFLAGS) -DAGPL_BITCHAT -c $< -o $@
|
|
|
|
%.o: %.c
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
|
|
|
payloads:
|
|
@echo ">>> Regenerating 150-payload HID matrix..."
|
|
@chmod +x inject_payloads.sh
|
|
@./inject_payloads.sh
|
|
|
|
clean:
|
|
rm -f $(OREBOLT_OBJS) liborebolt.a |