RBASIC on Linux

From Bitchin100 DocGarden
Revision as of 20:26, 14 October 2009 by Jhoger (talk | contribs) (New page: Here is a GNU makefile for a simple RBASIC project. Instructions are embedded in the makefile for tailoring to your own installation and project. Note that for .EXE's to launch under WINE...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Here is a GNU makefile for a simple RBASIC project. Instructions are embedded in the makefile for tailoring to your own installation and project.

Note that for .EXE's to launch under WINE on Debian, I had to make them executable. You can leave them non-executable if you prefix commands with 'wine'.

mv RBASICXP.exe RBASIC.EXE
chmod +x RBASICXP.EXE
chmod +x A100.EXE
# Skeleton Makefile for RBASIC projects on Linux.
#
# Copyright (C) 2009 DevWrights
# Author: John R. Hogerhuis (jhoger@pobox.com)
#
# 0. Install Wine, srecord, and GNU Make, and unzip RBASIC somewhere
# 1. Copy this into your project directory with your *.100 source file
# 2. Edit WINTOOLSPATH, TOOLSPATH to point to RBASIC
#    WINTOOLSPATH must be a path WINE will grok.
#    TOOLSPATH must be a path BASH will grok.
# 3. make clean
# 4. make
# 5. Burn the resulting .BX with REXMGR or load it as an OptROM with
#    VirtualT.

WINTOOLSPATH=Z:\\home\\john\\tools\\RBASIC
TOOLSPATH=~/tools/RBASIC

RBASIC=$(TOOLSPATH)/RBASICXP.EXE
ASM=$(TOOLSPATH)/A100.EXE
ASMOPT=/I$(WINTOOLSPATH)\\

PROGRAM=SYSDAT

ALL: $(PROGRAM).BX $(PROGRAM).BIN

%.asm : %.100
	$(RBASIC) $<

%.asm : %.200
	$(RBASIC) /2 $<

%.HEX : %.asm
	$(ASM) $(ASMOPT) $<

%.BX : %.HEX
	srec_cat -Output $@ -Binary $< -Intel

%.BIN : %.BX
	cp $< $@

clean:
	-rm -f $(PROGRAM).HEX
	-rm -f $(PROGRAM).PRN
	-rm -f $(PROGRAM).SYM
	-rm -f $(PROGRAM).asm
	-rm -f $(PROGRAM).BX
	-rm -f $(PROGRAM).BIN