mirror of
https://github.com/jeremysrand/md2teach.git
synced 2025-01-02 19:29:21 +00:00
Improve the build to better support building the babel fish translator. Fix the bugs in the filter code for the translator. Based on testing, I think it is working now and matches any file with a name *.md.
This commit is contained in:
parent
1572698a42
commit
b89ad278dc
@ -3,7 +3,18 @@
|
||||
# Apple //GS Build Engine for ORCA and Merlin
|
||||
#
|
||||
|
||||
all:
|
||||
include make/head.mk
|
||||
|
||||
DISKIMAGE=$(TARGETDIR)/md2teach.2mg
|
||||
ARCHIVE=$(TARGETDIR)/md2teach.shk
|
||||
DESTBOOTIMAGE=$(TARGETDIR)/$(BOOTIMAGE)
|
||||
|
||||
MAMEARGS=apple2gs -skip_gameinfo -speed 3 -mouse -window -resolution 1408x1056 -ramsize 4M -sl7 cffa202
|
||||
EMULATOR=mame
|
||||
|
||||
gen:
|
||||
|
||||
build:
|
||||
make -f shell.mk
|
||||
make -f babelfish.mk
|
||||
|
||||
@ -13,3 +24,5 @@ clean:
|
||||
|
||||
execute:
|
||||
make -f shell.mk execute
|
||||
make/createDiskImage "$(DISKIMAGE)" $(DESTBOOTIMAGE) "$(TARGETDIR)/Markdown" "$(TARGETDIR)/md2teach" "$(TARGETDIR)/outfile.txt" test.md
|
||||
make/launchEmulator "$(DISKIMAGE)" "$(DESTBOOTIMAGE)"
|
||||
|
@ -9,7 +9,7 @@ include make/head.mk
|
||||
# where to find files, etc.
|
||||
|
||||
# The name of your system or binary file to build goes here:
|
||||
PGM=markdown
|
||||
PGM=notused
|
||||
|
||||
# Set the target type you would like to build. The options are:
|
||||
# shell - A shell command for ORCA, GNO or other GS shell
|
||||
@ -175,10 +175,26 @@ gen:
|
||||
# clean your build.
|
||||
genclean:
|
||||
|
||||
$(TARGETDIR)/filter.bin: $(OBJDIR)/babelfish/filter.ROOT
|
||||
|
||||
FILTERTARGET=$(TARGETDIR)/filter.bin
|
||||
INITTARGET=$(TARGETDIR)/init.bin
|
||||
REZFLAGS+= rez='-d TARGETDIR="$(TARGETDIR)"'
|
||||
|
||||
$(OBJDIR)/babelfish/markdown.r: $(FILTERTARGET) $(INITTARGET)
|
||||
|
||||
$(FILTERTARGET): $(OBJDIR)/babelfish/filter.ROOT
|
||||
cd $(OBJDIR); $(LINK) $(LDFLAGS) babelfish/filter keep="$(abspath $@)"
|
||||
|
||||
target: $(TARGETDIR)/filter.bin
|
||||
$(INITTARGET): $(OBJDIR)/babelfish/init.ROOT
|
||||
cd $(OBJDIR); $(LINK) $(LDFLAGS) babelfish/init keep="$(abspath $@)"
|
||||
|
||||
$(TARGETDIR)/Markdown: $(OBJDIR)/babelfish/markdown.r
|
||||
$(MKDIR) $(TARGETDIR)
|
||||
$(RM) $@
|
||||
$(CP) $< $@
|
||||
$(CHTYP) -t $(FILETYPE) $(AUXTYPE) $@
|
||||
|
||||
target: $(TARGETDIR)/Markdown
|
||||
true
|
||||
|
||||
# Do not change anything else below here...
|
||||
|
@ -37,16 +37,17 @@ offset_fileName gequ 10
|
||||
|
||||
filter start
|
||||
|
||||
_d equ 1
|
||||
ptr equ 5
|
||||
_rtlb equ 7
|
||||
DirPtr equ 11
|
||||
retval equ 15
|
||||
_b equ 1
|
||||
ptr equ _b+2
|
||||
_d equ ptr+4
|
||||
_rtlb equ _d+1
|
||||
DirPtr equ _rtlb+3
|
||||
retval equ DirPtr+4
|
||||
|
||||
phb ;even up the stack
|
||||
pha
|
||||
pha
|
||||
phd
|
||||
pha
|
||||
pha
|
||||
tsc
|
||||
tcd
|
||||
|
||||
@ -60,14 +61,17 @@ retval equ 15
|
||||
lda [<DirPtr],y
|
||||
sta <ptr+2
|
||||
|
||||
lda [<ptr]
|
||||
ldy #2
|
||||
lda [<ptr],y
|
||||
cmp #4
|
||||
blt exit
|
||||
tay
|
||||
|
||||
short m
|
||||
|
||||
dey
|
||||
iny
|
||||
iny
|
||||
iny
|
||||
lda [<ptr],y
|
||||
cmp #'d'
|
||||
beq checkM
|
||||
@ -85,7 +89,7 @@ checkM anop
|
||||
checkDot anop
|
||||
dey
|
||||
lda [<ptr],y
|
||||
cmp #'m'
|
||||
cmp #'.'
|
||||
bne noMatch
|
||||
|
||||
long m
|
||||
@ -97,10 +101,10 @@ noMatch anop
|
||||
long m
|
||||
|
||||
exit anop
|
||||
pla
|
||||
pla
|
||||
pld
|
||||
pla
|
||||
pla
|
||||
pla
|
||||
sta 3,s
|
||||
pla
|
||||
sta 3,s
|
||||
|
@ -10,5 +10,7 @@
|
||||
keep init
|
||||
|
||||
init start
|
||||
phb
|
||||
plb
|
||||
rtl
|
||||
end
|
||||
|
@ -8,8 +8,8 @@
|
||||
|
||||
|
||||
#include "types.rez"
|
||||
#include "babelfish_defs.h"
|
||||
#include "babelfish_rez.h"
|
||||
#include "babelfish/babelfish_defs.h"
|
||||
#include "babelfish/babelfish_rez.h"
|
||||
|
||||
|
||||
resource rVersion(TrVersion)
|
||||
@ -43,8 +43,8 @@ resource rTrData(TrData)
|
||||
};
|
||||
|
||||
|
||||
read rCodeResource(TrFilter, locked, convert) "filter.bin";
|
||||
read rCodeResource(TrInit, locked, convert) "init.bin";
|
||||
read rCodeResource(TrFilter, locked, convert) TARGETDIR "/filter.bin";
|
||||
read rCodeResource(TrInit, locked, convert) TARGETDIR "/init.bin";
|
||||
|
||||
|
||||
resource rText(TrImportInfo)
|
||||
|
@ -15,7 +15,7 @@ shift
|
||||
FILE="$1"
|
||||
shift
|
||||
|
||||
BOOTCOPYPATH=""
|
||||
BOOTCOPYPATH="System/SHS.Babelfish"
|
||||
|
||||
PROGRAM=`basename "$FILE"`
|
||||
TMPDIR=/tmp/a2gs_mount.$$
|
||||
|
@ -197,8 +197,6 @@ executeGUI: all
|
||||
|
||||
executeShell: all
|
||||
$(ORCA) --mem $(TARGETDIR)/$(PGM) -d test.md $(TARGETDIR)/outfile.txt
|
||||
make/createDiskImage "$(DISKIMAGE)" $(DESTBOOTIMAGE) "$(TARGETDIR)/$(PGM)" "$(TARGETDIR)/outfile.txt" test.md
|
||||
make/launchEmulator "$(DISKIMAGE)" "$(DESTBOOTIMAGE)"
|
||||
|
||||
$(OBJDIR)/%.a: %.c
|
||||
$(COMPILE) $< $(@:.a=) $(CFLAGS) --noroot
|
||||
|
Loading…
Reference in New Issue
Block a user