新增: ath9k PCIe WiFi驱动(被动扫描/beacon解析), shell命令行(help/clear/echo/version/date/reboot/halt), Consolas 18px TTF字体, render_ascii.py 修改: dkm_net_api扩展scan接口, FirstInit无WiFi设备时跳过, DSK加载shell.elf, 非首次启动直接进shell
26 lines
795 B
Makefile
26 lines
795 B
Makefile
CC := clang
|
|
LD := ld.lld
|
|
|
|
ROOT := ../..
|
|
OUT := $(ROOT)/SYSTEM/system/deshab64/shell.elf
|
|
|
|
CFLAGS := -target x86_64-unknown-none -std=c11 -ffreestanding -fno-builtin -fno-stack-protector -fpie -mno-red-zone -mno-sse -mno-sse2 -mno-mmx -msoft-float -m64 -Wall -Wextra -I../UTSM/include -O2
|
|
LDFLAGS := -nostdlib -static -pie -z max-page-size=0x1000 -T linker.ld
|
|
|
|
C_SOURCES := main.c
|
|
OBJECTS := $(C_SOURCES:.c=.o)
|
|
|
|
.PHONY: all clean
|
|
|
|
all: $(OUT)
|
|
|
|
$(OUT): $(OBJECTS) linker.ld
|
|
@if not exist "$(ROOT)\SYSTEM\system\deshab64" mkdir "$(ROOT)\SYSTEM\system\deshab64"
|
|
$(LD) $(LDFLAGS) -o $@ $(OBJECTS)
|
|
|
|
%.o: %.c
|
|
$(CC) $(CFLAGS) -c $< -o $@
|
|
|
|
clean:
|
|
powershell -NoProfile -Command "Get-ChildItem -Path . -Recurse -Filter *.o | Remove-Item -Force; if (Test-Path '$(OUT)') { Remove-Item '$(OUT)' -Force }"
|