Browse Source

Makefile: support translations in the en/ folder

master
vampirefrog 2 years ago
parent
commit
ac9603e543
  1. 70
      Makefile

70
Makefile

@ -41,76 +41,56 @@ all: \
translations: mxdrv17.en.s
mxdrv/%.s: mxdrv/%.[xr] mxdrv/%.lab
dis_include=$(DIS_INCLUDE) $(DIS) $(DIS_DEBUG) -h -k -m68030 -q1 -B -M -w16 -o120 -g"$(patsubst %.s,%.lab,$@)" --overwrite "$<" "$@"
sed -i -e 's/; Code Generate date .\+/;/' "$@"
sed -i -e 's/; Time Stamp .\+/;/' $@
sed -i -e 's/; Commandline\s[^ ]\+\s/; Commandline dis /' $@
iplrom30.s: iplrom30.dat iplrom30.lab iplrom30.tab
dis_include=$(DIS_INCLUDE) $(DIS) $(DIS_DEBUG) -b2 -h -i -m68030 -m68882 -zfe0000,ff0038 -q1 -B -M -w16 --exclude-fefunc-mac -Tiplrom30.tab -giplrom30.lab --overwrite $< $@
sed -i -e 's/; Code Generate date .\+/;/' $@
sed -i -e 's/; Time Stamp .\+/;/' $@
sed -i -e 's/; Commandline\s[^ ]\+\s/; Commandline dis /' $@
iplromxv.s: iplromxv.dat iplromxv.lab iplromxv.tab
dis_include=$(DIS_INCLUDE) $(DIS) $(DIS_DEBUG) -b2 -h -i -m68030 -m68882 -zfe0000,ff0010 -q1 -B -M -w16 --exclude-fefunc-mac -Tiplromxv.tab -giplromxv.lab --overwrite $< $@
sed -i -e 's/; Code Generate date .\+/;/' $@
sed -i -e 's/; Time Stamp .\+/;/' $@
sed -i -e 's/; Commandline\s[^ ]\+\s/; Commandline dis /' $@
%.en.s: %.s %.en.sed
en/%.s: %.s en/%.sed
sed -f $(patsubst %.s,%.sed,$@) < $< > $@
%.en.sed: %.en.strings xlate
en/%.sed: %.en.strings xlate
mkdir -p $(shell dirname $@)
cat $< | ./xlate > $@
%.en.x: %.en.o
en/%.x: en/%.o
$(HLK) $< -o $@
%.en.o: %.en.s
en/%.o: en/%.s
$(HAS) $< -o $@
%.s: %.[xr] %.lab
dis_include=$(DIS_INCLUDE) $(DIS) $(DIS_DEBUG) -b2 -h -m68000 --sp -q1 -B -M -o$(COLUMNS) -g$(patsubst %.s,%.lab,$@) --overwrite $< $@
sed -i -f const.sed $@
sed -i -e 's/; Code Generate date .\+/;/' $@
sed -i -e 's/; Commandline\s[^ ]\+\s/; Commandline dis /' $@
sed -i -f clean-s.sed $@
# Useful for new .x files
%.new.s: %.[xr]
dis_include=$(DIS_INCLUDE) $(DIS) $(DIS_DEBUG) -b2 -h -m68000 --sp -q1 -B -M -o$(COLUMNS) -e$(patsubst %.s,%.lab,$@) --overwrite $< $@
sed -i -e 's/; Code Generate date .\+/;/' $@
sed -i -e 's/; Time Stamp .\+/;/' $@
sed -i -e 's/; Commandline\s[^ ]\+\s/; Commandline dis /' $@
sed -i -f clean-s.sed $@
mxdrv/%.s: mxdrv/%.[xr] mxdrv/%.lab
dis_include=$(DIS_INCLUDE) $(DIS) $(DIS_DEBUG) -h -k -m68030 -q1 -B -M -w16 -o120 -g"$(patsubst %.s,%.lab,$@)" --overwrite "$<" "$@"
sed -i -f clean-s.sed $@
iplrom30.s: iplrom30.dat iplrom30.lab iplrom30.tab
dis_include=$(DIS_INCLUDE) $(DIS) $(DIS_DEBUG) -b2 -h -i -m68030 -m68882 -zfe0000,ff0038 -q1 -B -M -w16 --exclude-fefunc-mac -Tiplrom30.tab -giplrom30.lab --overwrite $< $@
sed -i -f clean-s.sed $@
iplromxv.s: iplromxv.dat iplromxv.lab iplromxv.tab
dis_include=$(DIS_INCLUDE) $(DIS) $(DIS_DEBUG) -b2 -h -i -m68030 -m68882 -zfe0000,ff0010 -q1 -B -M -w16 --exclude-fefunc-mac -Tiplromxv.tab -giplromxv.lab --overwrite $< $@
sed -i -f clean-s.sed $@
mdxp.s: mdxp.r mdxp.lab
dis_include=$(DIS_INCLUDE) $(DIS) $(DIS_DEBUG) -b2 -h -m68000 --sp -q1 -B -M -o$(COLUMNS) -g$(patsubst %.s,%.lab,$@) --overwrite $< $@
sed -i -e 's/; Code Generate date .\+/;/' $@
sed -i -e 's/; Time Stamp .\+/;/' $@
sed -i -e 's/; Commandline\s[^ ]\+\s/; Commandline dis /' $@
sed -i -f clean-s.sed $@
human.s: human.sys human.lab
dis_include=$(DIS_INCLUDE) $(DIS) $(DIS_DEBUG) -b2 -h -m68030 --sp -q1 -B -M -o$(COLUMNS) -g$(patsubst %.s,%.lab,$@) --overwrite $< $@
sed -i -f const.sed $@
sed -i -e 's/; Code Generate date .\+/;/' $@
sed -i -e 's/; Time Stamp .\+/;/' $@
sed -i -e 's/; Commandline\s[^ ]\+\s/; Commandline dis /' $@
sed -i -f clean-s.sed $@
opmdrv3.s: opmdrv3.x opmdrv3.lab opmdrv3.tab
dis_include=$(DIS_INCLUDE) $(DIS) $(DIS_DEBUG) -b2 -h -m68000 --sp -q1 -B -M -o$(COLUMNS) -w16 -g$(patsubst %.s,%.lab,$@) -T$(patsubst %.s,%.tab,$@) --overwrite $< $@
sed -i -f const.sed $@
sed -i -e 's/; Code Generate date .\+/;/' $@
sed -i -e 's/; Time Stamp .\+/;/' $@
sed -i -e 's/; Commandline\s[^ ]\+\s/; Commandline dis /' $@
sed -i -f clean-s.sed $@
xlate: xlate.c
gcc xlate.c -o xlate
mxdrv/mxcen.x: mxdrv/mxc.en.s
$(HAS) $< -o mxdrv/mxden.o
$(HLK) mxdrv/mxden.o -o mxdrv/mxcen.x
clean:
rm -f *.s *.o mxdrv/*.o mxdrv/*/*.o mxdrv/*.s mxdrv/*/*.s *.en.sed mxdrv/*.en.sed mxdrv/*/*.en.sed
rm -f *.o mxdrv/*.o mxdrv/*/*.o
rm -f en/*.o en/mxdrv/*.o en/mxdrv/*/*.o
rm -f en/*.sed en/mxdrv/*.sed en/mxdrv/*/*.sed

Loading…
Cancel
Save