Add doc generation

master
Mathieu Maret 1 month ago
parent 72d566986c
commit 535290cf40
  1. 1
      .gitignore
  2. 8
      Makefile

1
.gitignore vendored

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

@ -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:

Loading…
Cancel
Save