X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;f=Makefile;h=6693689df93537c73359ff20423c9197e3d72c12;hb=4dcbbfcdec1f956b9fe016b4e742f8c57837ab2c;hp=2a4d3bbbe7fe92c7b9089e3e50a27f35fe528474;hpb=c86e619db399a883dd2a2ac5d9d6ef4815dd581c;p=rrq%2Frrqforth.git diff --git a/Makefile b/Makefile index 2a4d3bb..6693689 100644 --- a/Makefile +++ b/Makefile @@ -1,24 +1,16 @@ -BINARY = rrqforth +INCS := $(shell grep ^include rrqforth.asm | tr -d "'" | sed 's/include//' ) -default: X - -VFMT := "RRQ Forth version %h at %aI" -VERSION := $(shell git log -1 --pretty=format:'$(VFMT)' main.fasm) - -main.fasm: machine.fasm readline.fasm syscalls.fasm - -version: main.fasm - @echo "db '$(VERSION)'\ndb 10" > $@ - -rrqforth: main.fasm | - fasm $^ $@ +# compile into 3 things: binary, symbolic information and debug support +rrqforth: rrqforth.asm $(INCS) + fasm $< -s $@.fas + ./fas2txt.lsp $@.fas > $@.map chmod a+x $@ -rrqforth.fas: main.fasm rrqforth - fasm $< -s $@ +clean: + rm -f rrqforth{,.fas,.map} -X: rrqforth.fas - ./symbols.lsp $< > $@ +ADOCS := $(shell echo adoc/*.adoc ) +DOCS = reference.adoc wordindex.adoc separator.adoc $(ADOCS) -clean: - rm -f version rrqforth rrqforth.fas +reference.html: $(DOCS) + asciidoc -bhtml ${@:.html=.adoc} > $@