linux-hosted msdos cross-compiler updates

This commit is contained in:
nhmall
2019-11-25 22:47:54 -05:00
parent 1b2b330e9f
commit 7fcccdf5c6
4 changed files with 45 additions and 54 deletions
+11 -16
View File
@@ -319,7 +319,7 @@ $(DAT)/nhdat: $(U)dlb_main $(DAT)/data $(DAT)/rumors \
cd $(DAT); \ cd $(DAT); \
pwd; \ pwd; \
cp $(MSYS)/msdoshlp.txt .; \ cp $(MSYS)/msdoshlp.txt .; \
ls -1 data oracles options quest.dat rumors help hh >dlb.lst; \ ls -1 data oracles options rumors help hh >dlb.lst; \
ls -1 cmdhelp history opthelp wizhelp license >>dlb.lst; \ ls -1 cmdhelp history opthelp wizhelp license >>dlb.lst; \
ls -1 bogusmon engrave epitaph tribute msdoshlp.txt >>dlb.lst; \ ls -1 bogusmon engrave epitaph tribute msdoshlp.txt >>dlb.lst; \
ls -1 *.lua >>dlb.lst; \ ls -1 *.lua >>dlb.lst; \
@@ -363,11 +363,6 @@ $(DAT)/rumors: $(HOST_O)utility.tag $(DAT)/rumors.tru $(DAT)/rumors.fal
$(DAT)/oracles: $(HOST_O)utility.tag $(DAT)/oracles.txt $(DAT)/oracles: $(HOST_O)utility.tag $(DAT)/oracles.txt
$(U)makedefs -h $(U)makedefs -h
ifndef LUA_QTEXT_FILE
$(DAT)/quest.dat: $(HOST_O)utility.tag $(DAT)/quest.txt
$(U)makedefs -q
endif
$(DAT)/bogusmon: $(HOST_O)utility.tag $(DAT)/bogusmon.txt $(DAT)/bogusmon: $(HOST_O)utility.tag $(DAT)/bogusmon.txt
$(U)makedefs -s $(U)makedefs -s
@@ -560,30 +555,30 @@ clean:
spotless: clean spotless: clean
if [ -f $(INCL)/pm.h ]; then rm $(INCL)/pm.h; fi; if [ -f $(INCL)/pm.h ]; then rm $(INCL)/pm.h; fi;
# if [ -f $(U)dgn_flex.c ]; then rm $(U)dgn_flex.c; fi; ## if [ -f $(U)dgn_flex.c ]; then rm $(U)dgn_flex.c; fi;
# if [ -f $(U)dgn_lex.c ]; then rm $(U)dgn_lex.c; fi; ## if [ -f $(U)dgn_lex.c ]; then rm $(U)dgn_lex.c; fi;
# if [ -f $(U)makedefs ]; then rm $(U)makedefs; fi; # if [ -f $(U)makedefs ]; then rm $(U)makedefs; fi;
# if [ -f $(U)dgn_comp ]; then rm $(U)dgn_comp; fi; ## if [ -f $(U)dgn_comp ]; then rm $(U)dgn_comp; fi;
# if [ -f $(U)recover.exe ]; then rm $(U)recover.exe; fi; # if [ -f $(U)recover.exe ]; then rm $(U)recover.exe; fi;
# if [ -f $(U)tilemap ]; then rm $(U)tilemap; fi; # if [ -f $(U)tilemap ]; then rm $(U)tilemap; fi;
# if [ -f $(U)tile2bmp ]; then rm $(U)tile2bmp; fi; # if [ -f $(U)tile2bmp ]; then rm $(U)tile2bmp; fi;
# if [ -f $(U)tile2bin ]; then rm $(U)tile2bin; fi; ## if [ -f $(U)tile2bin ]; then rm $(U)tile2bin; fi;
# if [ -f $(U)til2bin2 ]; then rm $(U)til2bin2; fi; ## if [ -f $(U)til2bin2 ]; then rm $(U)til2bin2; fi;
# if [ -f $(U)thintile ]; then rm $(U)thintile; fi; ## if [ -f $(U)thintile ]; then rm $(U)thintile; fi;
# if [ -f $(U)dlb_main ]; then rm $(U)dlb_main; fi; # if [ -f $(U)dlb_main ]; then rm $(U)dlb_main; fi;
# if [ -f $(INCL)/vis_tab.h ]; then rm $(INCL)/vis_tab.h; fi; # if [ -f $(INCL)/vis_tab.h ]; then rm $(INCL)/vis_tab.h; fi;
# if [ -f $(INCL)/onames.h ]; then rm $(INCL)/onames.h; fi; # if [ -f $(INCL)/onames.h ]; then rm $(INCL)/onames.h; fi;
# if [ -f $(INCL)/pm.h ]; then rm $(INCL)/pm.h; fi; # if [ -f $(INCL)/pm.h ]; then rm $(INCL)/pm.h; fi;
# if [ -f $(INCL)/date.h ]; then rm $(INCL)/date.h; fi; # if [ -f $(INCL)/date.h ]; then rm $(INCL)/date.h; fi;
# if [ -f $(INCL)/dgn_comp.h ]; then rm $(INCL)/dgn_comp.h; fi; ## if [ -f $(INCL)/dgn_comp.h ]; then rm $(INCL)/dgn_comp.h; fi;
# if [ -f $(INCL)/lev_comp.h ]; then rm $(INCL)/lev_comp.h; fi; ## if [ -f $(INCL)/lev_comp.h ]; then rm $(INCL)/lev_comp.h; fi;
# if [ -f $(SRC)/vis_tab.c ]; then rm $(SRC)/vis_tab.c; fi; # if [ -f $(SRC)/vis_tab.c ]; then rm $(SRC)/vis_tab.c; fi;
# if [ -f $(SRC)/tile.c ]; then rm $(SRC)/tile.c; fi; # if [ -f $(SRC)/tile.c ]; then rm $(SRC)/tile.c; fi;
# if [ -f $(DAT)/options ]; then rm $(DAT)/options; fi; # if [ -f $(DAT)/options ]; then rm $(DAT)/options; fi;
# if [ -f $(DAT)/data ]; then rm $(DAT)/data; fi; # if [ -f $(DAT)/data ]; then rm $(DAT)/data; fi;
# if [ -f $(DAT)/rumors ]; then rm $(DAT)/rumors; fi; # if [ -f $(DAT)/rumors ]; then rm $(DAT)/rumors; fi;
# if [ -f $(DAT)/dungeon.pdf ]; then rm $(DAT)/dungeon.pdf; fi; ## if [ -f $(DAT)/dungeon.pdf ]; then rm $(DAT)/dungeon.pdf; fi;
# if [ -f $(DAT)/dungeon ]; then rm $(DAT)/dungeon; fi; ## if [ -f $(DAT)/dungeon ]; then rm $(DAT)/dungeon; fi;
# if [ -f $(DAT)/oracles ]; then rm $(DAT)/oracles; fi; # if [ -f $(DAT)/oracles ]; then rm $(DAT)/oracles; fi;
## if [ -f $(DAT)/quest.dat ]; then rm $(DAT)/quest.dat; fi; ## if [ -f $(DAT)/quest.dat ]; then rm $(DAT)/quest.dat; fi;
# if [ -f $(DAT)/bogusmon ]; then rm $(DAT)/bogusmon; fi; # if [ -f $(DAT)/bogusmon ]; then rm $(DAT)/bogusmon; fi;
+4 -4
View File
@@ -38,10 +38,10 @@ GAMEDIR =../msdos-binary
# your machine. # your machine.
# #
ADD_CURSES=Y ADD_CURSES=Y
PDCURSES_TOP=../../pdcurses PDCURSES_TOP=../lib/pdcurses
# Set top of djgpp if not specified through ENV variables prior to make: # Set top of djgpp if not specified through ENV variables prior to make:
#DJGPP_TOP = $(HOME)/djgpp #DJGPP_TOP = $(HOME)/lib/djgpp
#--------------------------------------------------------------- #---------------------------------------------------------------
# Location of LUA # Location of LUA
@@ -83,9 +83,9 @@ WSHR = ../win/share
# Executables. # Executables.
ifndef DJGPP_TOP ifndef DJGPP_TOP
ifdef TRAVIS_BUILD_DIR ifdef TRAVIS_BUILD_DIR
DJGPP_TOP = TRAVIS_BUILD_DIR/djgpp DJGPP_TOP = TRAVIS_BUILD_DIR/lib/djgpp
else else
DJGPP_TOP = $(HOME)/djgpp DJGPP_TOP = $(HOME)/lib/djgpp
endif endif
endif endif
+30 -30
View File
@@ -1,9 +1,15 @@
#!/bin/sh #!/bin/sh
#set -x #set -x
if [ -z "$TRAVIS_BUILD_DIR" ]; then if [ -z "$TRAVIS_BUILD_DIR" ]; then
export DJGPP_TOP=$(pwd)/djgpp export DJGPP_TOP=$(pwd)/lib/djgpp
else else
export DJGPP_TOP="$TRAVIS_BUILD_DIR/djgpp" export DJGPP_TOP="$TRAVIS_BUILD_DIR/lib/djgpp"
fi
if [ ! -d "$(pwd)/lib" ]; then
echo "Set up for Unix build and 'make fetch-lua' first."
exit 1
fi fi
DJGPP_URL="https://github.com/andrewwutw/build-djgpp/releases/download/v2.9/" DJGPP_URL="https://github.com/andrewwutw/build-djgpp/releases/download/v2.9/"
@@ -25,7 +31,11 @@ DJGPP_URL="$DJGPP_URL$DJGPP_FILE"
# export # export
cd util if [ ! -d lib]; then
mkdir -p lib
fi
cd lib
if [ ! -f "$DJGPP_FILE" ]; then if [ ! -f "$DJGPP_FILE" ]; then
if [ "$(uname)" = "Darwin" ]; then if [ "$(uname)" = "Darwin" ]; then
#Mac #Mac
@@ -34,45 +44,38 @@ if [ ! -f "$DJGPP_FILE" ]; then
wget --no-hsts "$DJGPP_URL" wget --no-hsts "$DJGPP_URL"
fi fi
fi fi
cd ../
if [ ! -d djgpp/i586-pc-msdosdjgpp ]; then
if [ ! -d ../djgpp/i586-pc-msdosdjgpp ]; then tar xjf "$DJGPP_FILE"
tar xjf "util/$DJGPP_FILE" rm $DJGPP_FILE
fi
#echo after tar
# cd ../
#pwd
# PDCurses
if [ ! -d "../pdcurses" ]; then
echo "Getting ../pdcurses from https://github.com/wmcbrine/PDCurses.git"
git clone --depth 1 https://github.com/wmcbrine/PDCurses.git ../pdcurses
fi fi
# DOS-extender for use with djgpp # DOS-extender for use with djgpp
cd djgpp if [ ! -d djgpp/cwsdpmi ]; then
if [ ! -d cwsdpmi ]; then
if [ "$(uname)" = "Darwin" ]; then if [ "$(uname)" = "Darwin" ]; then
#Mac #Mac
curl http://sandmann.dotster.com/cwsdpmi/csdpmi7b.zip -o csdpmi7b.zip curl http://sandmann.dotster.com/cwsdpmi/csdpmi7b.zip -o csdpmi7b.zip
else else
wget --no-hsts http://sandmann.dotster.com/cwsdpmi/csdpmi7b.zip wget --no-hsts http://sandmann.dotster.com/cwsdpmi/csdpmi7b.zip
fi fi
cd djgpp
mkdir -p cwsdpmi mkdir -p cwsdpmi
cd cwsdpmi cd cwsdpmi
unzip ../csdpmi7b.zip unzip ../csdpmi7b.zip
cd ../ cd ../../
rm csdpmi7b.zip rm csdpmi7b.zip
fi fi
# PDCurses
if [ ! -d "pdcurses" ]; then
echo "Getting ../pdcurses from https://github.com/wmcbrine/PDCurses.git" ; \
git clone --depth 1 https://github.com/wmcbrine/PDCurses.git pdcurses
fi
cd ../ cd ../
#echo after dos extender #echo after dos extender
cd src cd src
mkdir -p ../msdos-binary mkdir -p ../msdos-binary
@@ -93,16 +96,13 @@ make -f ../sys/msdos/Makefile2.cross
unset GCC_EXEC_PREFIX unset GCC_EXEC_PREFIX
#pwd #pwd
#ls ../djgpp/cwsdpmi/bin if [ -f ../lib/djgpp/cwsdpmi/bin/CWSDPMI.EXE ]; then
#ls . cp ../lib/djgpp/cwsdpmi/bin/CWSDPMI.EXE ../msdos-binary/CWSDPMI.EXE;
if [ -f ../djgpp/cwsdpmi/bin/CWSDPMI.EXE ]; then
cp ../djgpp/cwsdpmi/bin/CWSDPMI.EXE ../msdos-binary/CWSDPMI.EXE;
fi fi
# ls -l ../msdos-binary # ls -l ../msdos-binary
cd ../msdos-binary cd ../msdos-binary
zip -9 ../NH370DOS.ZIP * zip -9 ../lib/NH370DOS.ZIP *
cd ../ cd ../
# ls -l NH370DOS.ZIP ls -l lib/NH370DOS.ZIP
-4
View File
@@ -55,7 +55,3 @@ CHGRP=true
VARDIRPERM = 0755 VARDIRPERM = 0755
VARFILEPERM = 0600 VARFILEPERM = 0600
GAMEPERM = 0755 GAMEPERM = 0755
CC=clang
CFLAGS+=-fsanitize=address -fno-omit-frame-pointer
LFLAGS+=-fsanitize=address -fno-omit-frame-pointer