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