Add doc generation
This commit is contained in:
parent
72d566986c
commit
535290cf40
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,3 +3,4 @@ disk.img
|
||||
kernel
|
||||
kernel.sym
|
||||
userspace/user
|
||||
docs/*.html
|
||||
|
8
Makefile
8
Makefile
@ -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…
Reference in New Issue
Block a user