finish up translations and setup doc server stuff

This commit is contained in:
ngn
2025-01-10 00:16:06 +03:00
parent ac307de76c
commit 5fb3c03e40
30 changed files with 591 additions and 104 deletions

35
doc/Makefile Normal file
View File

@ -0,0 +1,35 @@
# dirs
DIRS = $(shell find src/* -type d)
DISTDIR = dist
OUTDIRS = $(patsubst src/%,$(DISTDIR)/%,$(DIRS))
# sources
HSRCS = $(wildcard inc/*.h)
CSRCS = $(shell find -type f -name '*.c')
OBJS = $(patsubst ./src/%.c,./$(DISTDIR)/%.o,$(CSRCS))
# compiler flags
CFLAGS = -O3 -fstack-protector-strong -fcf-protection=full -fstack-clash-protection
LIBS = -lctorm -lcmark
INCLUDE = -I./inc
all: doc.elf
doc.elf: $(OBJS)
echo $(OBJS) $(OUTDIRS)
gcc $(CFLAGS) -o $@ $^ $(LIBS)
$(DISTDIR)/%.o: src/%.c
@mkdir -pv $(OUTDIRS)
gcc $(CFLAGS) $(INCLUDE) -c -o $@ $^ $(LIBS)
format:
clang-format -i -style=file $(CSRCS) $(HSRCS)
clean:
rm -rf $(DISTDIR)
run:
./doc.elf
.PHONY: format clean run