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 ../../
|
||||
fi
|
||||
|
||||
# get a copy of symify to insert in the final zip package
|
||||
# to make bug reports more useful
|
||||
# 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" ;
|
||||
# create a directory hold native DOS executables that might get deployed
|
||||
if [ ! -d djgpp/target ]; then
|
||||
cd djgpp
|
||||
mkdir -p symify
|
||||
cd symify
|
||||
if [ "$(uname)" = "Darwin" ]; then
|
||||
#Mac
|
||||
mkdir -p target
|
||||
cd ../
|
||||
fi
|
||||
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
|
||||
export cmdstatus=$?
|
||||
else
|
||||
else
|
||||
wget --quiet --no-hsts http://www.mirrorservice.org/sites/ftp.delorie.com/pub/djgpp/current/v2/djdev205.zip
|
||||
export cmdstatus=$?
|
||||
fi
|
||||
if [ $cmdstatus -eq 0 ]; then
|
||||
echo "fetch of djdev205.zip was successful"
|
||||
fi
|
||||
fi
|
||||
ls -l
|
||||
if [ $cmdstatus -eq 0 ]; then
|
||||
echo "fetch of symify was successful"
|
||||
unzip -p djdev205.zip bin/symify.exe >./simify.exe
|
||||
if [ -f djdev205.zip ]; then
|
||||
echo "unzipping djdev205.zip"
|
||||
unzip -p djdev205.zip bin/symify.exe >./symify.exe
|
||||
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
|
||||
|
||||
|
||||
FONT_VERSION="4.49"
|
||||
FONT_FILE="terminus-font-$FONT_VERSION"
|
||||
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-u32b.psf $(TARGETPFX)pkg/TER-U32B.PSF
|
||||
cp ../lib/djgpp/cwsdpmi/bin/CWSDPMI.EXE $(TARGETPFX)pkg/CWSDPMI.EXE
|
||||
( if [ -f ../lib/djgpp/symify/simify.exe ]; then \
|
||||
cp ../lib/djgpp/symify/simify.exe $(TARGETPFX)pkg/SYMIFY.EXE; \
|
||||
( if [ -f ../lib/djgpp/target/symify.exe ]; then \
|
||||
cp ../lib/djgpp/target/symify.exe $(TARGETPFX)pkg/SYMIFY.EXE; \
|
||||
else \
|
||||
pwd; echo "../lib/djgpp/symify/symify.exe not found"; \
|
||||
pwd; echo "../lib/djgpp/target/symify.exe not found"; \
|
||||
fi; )
|
||||
-touch $(TARGETPFX)pkg/RECORD
|
||||
cd $(TARGETPFX)pkg ; zip -9 ../NH370DOS.ZIP * ; cd ../../..
|
||||
@@ -82,12 +82,12 @@ dodata:
|
||||
ifdef dosbox
|
||||
# make CROSS_TO_MSDOS=1 dosbox=~/dosbox deploy-to-dosbox
|
||||
ifdef MAKEFILE_TOP
|
||||
deploy-to-dosbox:
|
||||
deploy-to-dosbox:
|
||||
( cd src; make $(DEPLOY); cd .. )
|
||||
endif
|
||||
.PHONY: deploytodosbox
|
||||
|
||||
deploytodosbox: ../targets/msdos/NH370DOS.ZIP $(dosboxnhfolder) $(dosboxnhsrc) \
|
||||
deploytodosbox: $(TARGETPFX)NH370DOS.ZIP $(dosboxnhfolder) $(dosboxnhsrc) \
|
||||
$(dosboxnhsrc)/src $(dosboxnhsrc)/include \
|
||||
$(dosboxnhsrc)/sys/msdos $(dosboxnhsrc)/sys/share \
|
||||
$(dosboxnhsrc)/win/share $(dosboxnhsrc)/win/curses \
|
||||
@@ -95,7 +95,8 @@ deploytodosbox: ../targets/msdos/NH370DOS.ZIP $(dosboxnhfolder) $(dosboxnhsrc) \
|
||||
$(dosboxnhfolder)/NETHACK.EXE \
|
||||
$(dosboxnhfolder)/GDB.EXE $(dosboxnhfolder)/nhgdb.bat
|
||||
@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):
|
||||
mkdir -p $@
|
||||
$(dosboxnhsrc): $(dosboxnhfolder)
|
||||
@@ -131,10 +132,11 @@ $(dosboxnhfolder)/NETHACK.EXE: $(TARGETPFX)NH370DOS.ZIP
|
||||
unzip -o $(TARGETPFX)NH370DOS.ZIP -d $(dosboxnhfolder)
|
||||
find $(dosboxnhfolder) -type f -name "$(dosboxconfigfile)" \
|
||||
| xargs sed -i 's/#OPTIONS=video:autodetect/OPTIONS=video:autodetect/g'
|
||||
$(dosboxnhfolder)/GDB.EXE: $(dosboxnhfolder)
|
||||
curl --output gdb801b.zip $(dosgdburl)
|
||||
unzip -p gdb801b.zip bin/gdb.exe >$@
|
||||
rm gdb801b.zip
|
||||
$(dosboxnhfolder)/GDB.EXE: $(dosboxnhfolder) $(dostargetexes)/gdb801b.zip
|
||||
cp --preserve=timestamps $(dostargetexes)/gdb.exe $@
|
||||
$(dostargetexes)/gdb801b.zip:
|
||||
curl --output $(dostargetexes)/gdb801b.zip $(dosgdburl)
|
||||
unzip -p $(dostargetexes)/gdb801b.zip bin/gdb.exe >$@
|
||||
$(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"> $@
|
||||
endif # dosbox
|
||||
|
||||
@@ -150,6 +150,7 @@ endif
|
||||
ifdef MAKEFILE_TOP
|
||||
FLDR=
|
||||
endif
|
||||
dostargetexes=$(FLDR)lib/djgpp/target
|
||||
WANT_DEBUG=1
|
||||
DEPLOY=deploytodosbox
|
||||
endif # dosbox
|
||||
|
||||
Reference in New Issue
Block a user