Files
LinehuandCursor 8554a82677 feat(panic): FUCK [panic] mode=strict|fallback + realtest image variant
- UTSM panic_full returns in fallback mode (logs [PANIC:FALLBACK] + code + hit
  count); panic_halt keeps always-halt sites (CPU exception, VMM-E11 LA57,
  VMM-E15 DSK jump, UTSM-E42 test hook). Call sites given safe continuations.
- Mode passed to DSK/FirstInit/login/desktop via DSK_BOOT_FLAG_PANIC_FALLBACK;
  DKM kernel_api.panic / kern.log.panic return to driver; ext4 fatal aborts the
  op via setjmp/longjmp and DSK falls back to FAT32 ESP.
- build.ps1/Makefile: dev=strict, release=fallback, new realtest (release
  options + strict); default -Variant all; serialized iso packing under -j.
- Fix '*/' inside comments (dkm.h, kernel_api.h, bus.c) that broke the build.
- Includes pending work: dkm_bus service bus, mt7920/wlan drivers, desktop
  files/startmenu/prank, pe-tools, diskinfo, docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-12 23:57:19 +08:00

47 lines
1.4 KiB
Makefile
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Makefile.linux — Deshab 桌面 Linux SDL2 宿主构建
#
# 用法(在 Linux 下,CODE/desktop/ 目录):
# make -f Makefile.linux # 编译 desktop_host
# make -f Makefile.linux run # 编译并运行(默认读 ../../ISO/deshab.img)
# make -f Makefile.linux clean
#
# 依赖:gcc/clang、libsdl2-dev(apt install libsdl2-dev)
# 产物:desktop_host(普通 Linux 可执行文件)
#
# 与裸机 MAKEFILE 完全独立:不带 -ffreestanding/-mno-sse/-target,
# 不使用 linker.ld;通过 -DDESHAB_HOST 启用 host_main.c + main.c 中的宿主分支。
CC ?= gcc
SDL_CFLAGS := $(shell sdl2-config --cflags 2>/dev/null)
SDL_LIBS := $(shell sdl2-config --libs 2>/dev/null)
ROOT := ../..
IMG := $(ROOT)/ISO/deshab.img
CFLAGS := -DDESHAB_HOST -O2 -Wall -Wextra -g \
-I. -I../UTSM/include -I../tools -I../firstInit \
$(SDL_CFLAGS)
LDFLAGS := $(SDL_LIBS) -lm
TARGET := desktop_host
SRCS := main.c input.c wm.c compositor.c apps_builtin.c appreg.c \
launcher.c lxc.c shell.c pages.c f32io.c ascii_font.c \
zhfont.c host_main.c prank.c files.c
OBJS := $(SRCS:.c=.o)
.PHONY: all run clean
all: $(TARGET)
$(TARGET): $(OBJS)
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LDFLAGS)
%.o: %.c host_main.h
$(CC) $(CFLAGS) -c $< -o $@
run: $(TARGET)
./$(TARGET) --img $(IMG)
clean:
rm -f $(OBJS) $(TARGET)