added some decoration labels (not really used)
[rrq/rrqforth.git] / Makefile
index 2a4d3bbbe7fe92c7b9089e3e50a27f35fe528474..7e3b60456bfff45338cf5024f087551a81d4b0dc 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,24 +1,10 @@
-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 $@
-
-X: rrqforth.fas
-       ./symbols.lsp $< > $@
-
 clean:
-       rm -f version rrqforth rrqforth.fas
+       rm -f rrqforth{,.fas,.map}