snapshot (not working)
[rrq/rrqforth.git] / Makefile
index 39e68f2b2adf940a953fa6520b32b14fc9ad48c7..2a4d3bbbe7fe92c7b9089e3e50a27f35fe528474 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,24 @@
 BINARY = rrqforth
 
-default: rrqforth
+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
-       git log --pretty=format:"msg db 'RRQ Forth version %h at %aI'" $< > $@
-       echo "\ndb 10" >> $@
+       @echo "db '$(VERSION)'\ndb 10" > $@
 
-rrqforth: main.fasm | version
+rrqforth: main.fasm | 
        fasm $^ $@
        chmod a+x $@
 
+rrqforth.fas: main.fasm rrqforth
+       fasm $< -s $@
+
+X: rrqforth.fas
+       ./symbols.lsp $< > $@
+
 clean:
-       rm -f version rrqforth
+       rm -f version rrqforth rrqforth.fas