-BINARY = rrqforth
+INCS := $(shell grep ^include rrqforth.asm | tr -d "'" | sed 's/include//' )
-default: rrqforth
-
-version: main.fasm
- git log --pretty=format:"msg db 'RRQ Forth version %h at %aI'" $< > $@
- echo "\ndb 10" >> $@
-
-rrqforth: main.fasm | version
- 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 $@
clean:
- rm -f version rrqforth
+ rm -f rrqforth{,.fas,.map}