Add doc generation

This commit is contained in:
Mathieu Maret 2022-09-03 23:04:31 +02:00
parent 72d566986c
commit 535290cf40
2 changed files with 8 additions and 1 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@ disk.img
kernel
kernel.sym
userspace/user
docs/*.html

View File

@ -22,6 +22,8 @@ gasmobj=$(gasmsrc:%.S=%.o)
csrc=$(shell find $(SUBDIRS) -type f -name "*.c")# $(wildcard *.c)
cobj=$(csrc:%.c=%.o)
deps=$(csrc:%.c=%.d) $(gasmsrc:%.S=%.d)
docsrc=$(wildcard docs/*.md)
docobj=$(docsrc:%.md=%.html)
kernel kernel.sym &: $(asmobj) $(gasmobj) $(cobj) linker.ld
$(LD) $(LDFLAGS) $(asmobj) $(gasmobj) $(cobj) -o kernel -T linker.ld $(LIBGCC)
@ -41,6 +43,8 @@ userspace: FORCE
FORCE:
@
doc: $(docobj)
disk.img: disk.sfdisk userspace
qemu-img create -f raw $@ 32M
sfdisk $@ < $<
@ -57,6 +61,8 @@ disk.img: disk.sfdisk userspace
%.o: %.S
$(CC) $(CFLAGS) $(CPPFLAGS) -c "$<" -o "$@"
%.html: %.md
markdown -o $@ $<
test: CFLAGS += -DRUN_TEST
test: clean kernel disk.img
@ -77,7 +83,7 @@ screenshot:
shutter --window=qemu -o screenshot_1.png -e && zopflipng screenshot_1.png screenshot_1.png
clean:
$(RM) kernel $(asmobj) $(gasmobj) $(cobj) $(deps) fd.iso kernel.sym
$(RM) kernel $(asmobj) $(gasmobj) $(cobj) $(deps) fd.iso kernel.sym $(docobj)
$(RM) -r isodir
.PHONY: