follow-up on msdos cross-compile
Obtain gdb.exe during the execution of sys/msdosfetch-cross-compiler.sh ahead of the build, so that the Makefile just has to move it into place.
This commit is contained in:
@@ -135,31 +135,61 @@ if [ ! -d djgpp/djgpp-patch ]; then
|
|||||||
cd ../../
|
cd ../../
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# get a copy of symify to insert in the final zip package
|
# create a directory hold native DOS executables that might get deployed
|
||||||
# to make bug reports more useful
|
if [ ! -d djgpp/target ]; then
|
||||||
# curl --output djdev205.zip http://www.mirrorservice.org/sites/ftp.delorie.com/pub/djgpp/current/v2/djdev205.zip
|
|
||||||
if [ ! -d djgpp/symify ]; then
|
|
||||||
echo "Getting djdev205.zip" ;
|
|
||||||
cd djgpp
|
cd djgpp
|
||||||
mkdir -p symify
|
mkdir -p target
|
||||||
cd symify
|
cd ../
|
||||||
if [ "$(uname)" = "Darwin" ]; then
|
fi
|
||||||
#Mac
|
if [ -d djgpp/target ]; then
|
||||||
|
cd djgpp/target
|
||||||
|
# symify to make bug reports more useful
|
||||||
|
if [ ! -f symify.exe ]; then
|
||||||
|
if [ ! -f djdev205.zip ]; then
|
||||||
|
echo "Getting djdev205.zip" ;
|
||||||
|
if [ "$(uname)" = "Darwin" ]; then
|
||||||
|
#Mac
|
||||||
curl --output djdev205.zip http://www.mirrorservice.org/sites/ftp.delorie.com/pub/djgpp/current/v2/djdev205.zip
|
curl --output djdev205.zip http://www.mirrorservice.org/sites/ftp.delorie.com/pub/djgpp/current/v2/djdev205.zip
|
||||||
export cmdstatus=$?
|
export cmdstatus=$?
|
||||||
else
|
else
|
||||||
wget --quiet --no-hsts http://www.mirrorservice.org/sites/ftp.delorie.com/pub/djgpp/current/v2/djdev205.zip
|
wget --quiet --no-hsts http://www.mirrorservice.org/sites/ftp.delorie.com/pub/djgpp/current/v2/djdev205.zip
|
||||||
export cmdstatus=$?
|
export cmdstatus=$?
|
||||||
|
fi
|
||||||
|
if [ $cmdstatus -eq 0 ]; then
|
||||||
|
echo "fetch of djdev205.zip was successful"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
ls -l
|
if [ -f djdev205.zip ]; then
|
||||||
if [ $cmdstatus -eq 0 ]; then
|
echo "unzipping djdev205.zip"
|
||||||
echo "fetch of symify was successful"
|
unzip -p djdev205.zip bin/symify.exe >./symify.exe
|
||||||
unzip -p djdev205.zip bin/symify.exe >./simify.exe
|
|
||||||
fi
|
fi
|
||||||
cd ../../
|
fi
|
||||||
|
# gdb
|
||||||
|
if [ ! -f gdb.exe ]; then
|
||||||
|
if [ ! -f gdb801b.zip ]; then
|
||||||
|
echo "getting gdb801b.zip" ;
|
||||||
|
if [ "$(uname)" = "Darwin" ]; then
|
||||||
|
#Mac
|
||||||
|
curl --output gdb801b.zip http://www.mirrorservice.org/sites/ftp.delorie.com/pub/djgpp/current/v2gnu/gdb801b.zip
|
||||||
|
export cmdstatus=$?
|
||||||
|
else
|
||||||
|
wget --quiet --no-hsts http://www.mirrorservice.org/sites/ftp.delorie.com/pub/djgpp/current/v2gnu/gdb801b.zip
|
||||||
|
export cmdstatus=$?
|
||||||
|
fi
|
||||||
|
if [ $cmdstatus -eq 0 ]; then
|
||||||
|
echo "fetch of gdb801b.zip was successful"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [ -f gdb801b.zip ]; then
|
||||||
|
echo "unzipping gdb801b.zip"
|
||||||
|
unzip -p gdb801b.zip bin/gdb.exe >./gdb.exe
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
echo "Native DOS executables:"
|
||||||
|
ls -l *.exe
|
||||||
|
cd ../../
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
FONT_VERSION="4.49"
|
FONT_VERSION="4.49"
|
||||||
FONT_FILE="terminus-font-$FONT_VERSION"
|
FONT_FILE="terminus-font-$FONT_VERSION"
|
||||||
FONT_LFILE="$FONT_FILE.1"
|
FONT_LFILE="$FONT_FILE.1"
|
||||||
|
|||||||
@@ -65,10 +65,10 @@ dospkg: dodata dosfonts $(GAMEBIN) $(TARGETPFX)recover.exe ../dat/nhtiles.bmp
|
|||||||
cp $(DOSFONT)/ter-u28b.psf $(TARGETPFX)pkg/TER-U28B.PSF
|
cp $(DOSFONT)/ter-u28b.psf $(TARGETPFX)pkg/TER-U28B.PSF
|
||||||
cp $(DOSFONT)/ter-u32b.psf $(TARGETPFX)pkg/TER-U32B.PSF
|
cp $(DOSFONT)/ter-u32b.psf $(TARGETPFX)pkg/TER-U32B.PSF
|
||||||
cp ../lib/djgpp/cwsdpmi/bin/CWSDPMI.EXE $(TARGETPFX)pkg/CWSDPMI.EXE
|
cp ../lib/djgpp/cwsdpmi/bin/CWSDPMI.EXE $(TARGETPFX)pkg/CWSDPMI.EXE
|
||||||
( if [ -f ../lib/djgpp/symify/simify.exe ]; then \
|
( if [ -f ../lib/djgpp/target/symify.exe ]; then \
|
||||||
cp ../lib/djgpp/symify/simify.exe $(TARGETPFX)pkg/SYMIFY.EXE; \
|
cp ../lib/djgpp/target/symify.exe $(TARGETPFX)pkg/SYMIFY.EXE; \
|
||||||
else \
|
else \
|
||||||
pwd; echo "../lib/djgpp/symify/symify.exe not found"; \
|
pwd; echo "../lib/djgpp/target/symify.exe not found"; \
|
||||||
fi; )
|
fi; )
|
||||||
-touch $(TARGETPFX)pkg/RECORD
|
-touch $(TARGETPFX)pkg/RECORD
|
||||||
cd $(TARGETPFX)pkg ; zip -9 ../NH370DOS.ZIP * ; cd ../../..
|
cd $(TARGETPFX)pkg ; zip -9 ../NH370DOS.ZIP * ; cd ../../..
|
||||||
@@ -82,12 +82,12 @@ dodata:
|
|||||||
ifdef dosbox
|
ifdef dosbox
|
||||||
# make CROSS_TO_MSDOS=1 dosbox=~/dosbox deploy-to-dosbox
|
# make CROSS_TO_MSDOS=1 dosbox=~/dosbox deploy-to-dosbox
|
||||||
ifdef MAKEFILE_TOP
|
ifdef MAKEFILE_TOP
|
||||||
deploy-to-dosbox:
|
deploy-to-dosbox:
|
||||||
( cd src; make $(DEPLOY); cd .. )
|
( cd src; make $(DEPLOY); cd .. )
|
||||||
endif
|
endif
|
||||||
.PHONY: deploytodosbox
|
.PHONY: deploytodosbox
|
||||||
|
|
||||||
deploytodosbox: ../targets/msdos/NH370DOS.ZIP $(dosboxnhfolder) $(dosboxnhsrc) \
|
deploytodosbox: $(TARGETPFX)NH370DOS.ZIP $(dosboxnhfolder) $(dosboxnhsrc) \
|
||||||
$(dosboxnhsrc)/src $(dosboxnhsrc)/include \
|
$(dosboxnhsrc)/src $(dosboxnhsrc)/include \
|
||||||
$(dosboxnhsrc)/sys/msdos $(dosboxnhsrc)/sys/share \
|
$(dosboxnhsrc)/sys/msdos $(dosboxnhsrc)/sys/share \
|
||||||
$(dosboxnhsrc)/win/share $(dosboxnhsrc)/win/curses \
|
$(dosboxnhsrc)/win/share $(dosboxnhsrc)/win/curses \
|
||||||
@@ -95,7 +95,8 @@ deploytodosbox: ../targets/msdos/NH370DOS.ZIP $(dosboxnhfolder) $(dosboxnhsrc) \
|
|||||||
$(dosboxnhfolder)/NETHACK.EXE \
|
$(dosboxnhfolder)/NETHACK.EXE \
|
||||||
$(dosboxnhfolder)/GDB.EXE $(dosboxnhfolder)/nhgdb.bat
|
$(dosboxnhfolder)/GDB.EXE $(dosboxnhfolder)/nhgdb.bat
|
||||||
@echo DOS NetHack deployed to dosbox at $(dosboxnhfolder)
|
@echo DOS NetHack deployed to dosbox at $(dosboxnhfolder)
|
||||||
|
$(TARGETPFX)NH370DOS.ZIP: dospkg
|
||||||
|
# ( cd ..; make CROSS_TO_MSDOS=1 WANT_DEBUG=1 dospkg; cd src)
|
||||||
$(dosboxnhfolder):
|
$(dosboxnhfolder):
|
||||||
mkdir -p $@
|
mkdir -p $@
|
||||||
$(dosboxnhsrc): $(dosboxnhfolder)
|
$(dosboxnhsrc): $(dosboxnhfolder)
|
||||||
@@ -131,10 +132,11 @@ $(dosboxnhfolder)/NETHACK.EXE: $(TARGETPFX)NH370DOS.ZIP
|
|||||||
unzip -o $(TARGETPFX)NH370DOS.ZIP -d $(dosboxnhfolder)
|
unzip -o $(TARGETPFX)NH370DOS.ZIP -d $(dosboxnhfolder)
|
||||||
find $(dosboxnhfolder) -type f -name "$(dosboxconfigfile)" \
|
find $(dosboxnhfolder) -type f -name "$(dosboxconfigfile)" \
|
||||||
| xargs sed -i 's/#OPTIONS=video:autodetect/OPTIONS=video:autodetect/g'
|
| xargs sed -i 's/#OPTIONS=video:autodetect/OPTIONS=video:autodetect/g'
|
||||||
$(dosboxnhfolder)/GDB.EXE: $(dosboxnhfolder)
|
$(dosboxnhfolder)/GDB.EXE: $(dosboxnhfolder) $(dostargetexes)/gdb801b.zip
|
||||||
curl --output gdb801b.zip $(dosgdburl)
|
cp --preserve=timestamps $(dostargetexes)/gdb.exe $@
|
||||||
unzip -p gdb801b.zip bin/gdb.exe >$@
|
$(dostargetexes)/gdb801b.zip:
|
||||||
rm gdb801b.zip
|
curl --output $(dostargetexes)/gdb801b.zip $(dosgdburl)
|
||||||
|
unzip -p $(dostargetexes)/gdb801b.zip bin/gdb.exe >$@
|
||||||
$(dosboxnhfolder)/nhgdb.bat: $(FLDR)src/Makefile
|
$(dosboxnhfolder)/nhgdb.bat: $(FLDR)src/Makefile
|
||||||
echo "gdb -ex 'directory nhsrc/src nhsrc/include nhsrc/sys/msdos nhsrc/sys/share nhsrc/win/share nhsrc/win/curses nhsrc/win/tty nhsrc/util' NETHACK.EXE"> $@
|
echo "gdb -ex 'directory nhsrc/src nhsrc/include nhsrc/sys/msdos nhsrc/sys/share nhsrc/win/share nhsrc/win/curses nhsrc/win/tty nhsrc/util' NETHACK.EXE"> $@
|
||||||
endif # dosbox
|
endif # dosbox
|
||||||
|
|||||||
@@ -150,6 +150,7 @@ endif
|
|||||||
ifdef MAKEFILE_TOP
|
ifdef MAKEFILE_TOP
|
||||||
FLDR=
|
FLDR=
|
||||||
endif
|
endif
|
||||||
|
dostargetexes=$(FLDR)lib/djgpp/target
|
||||||
WANT_DEBUG=1
|
WANT_DEBUG=1
|
||||||
DEPLOY=deploytodosbox
|
DEPLOY=deploytodosbox
|
||||||
endif # dosbox
|
endif # dosbox
|
||||||
|
|||||||
Reference in New Issue
Block a user