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

View File

@@ -319,7 +319,7 @@ $(DAT)/nhdat: $(U)dlb_main $(DAT)/data $(DAT)/rumors \
cd $(DAT); \
pwd; \
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 bogusmon engrave epitaph tribute msdoshlp.txt >>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
$(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
$(U)makedefs -s
@@ -560,30 +555,30 @@ clean:
spotless: clean
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_lex.c ]; then rm $(U)dgn_lex.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)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)tilemap ]; then rm $(U)tilemap; fi;
# if [ -f $(U)tile2bmp ]; then rm $(U)tile2bmp; fi;
# if [ -f $(U)tile2bin ]; then rm $(U)tile2bin; fi;
# if [ -f $(U)til2bin2 ]; then rm $(U)til2bin2; fi;
# if [ -f $(U)thintile ]; then rm $(U)thintile; fi;
## if [ -f $(U)tile2bin ]; then rm $(U)tile2bin; fi;
## if [ -f $(U)til2bin2 ]; then rm $(U)til2bin2; fi;
## if [ -f $(U)thintile ]; then rm $(U)thintile; 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)/onames.h ]; then rm $(INCL)/onames.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)/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)/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 $(SRC)/vis_tab.c ]; then rm $(SRC)/vis_tab.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)/data ]; then rm $(DAT)/data; 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 ]; then rm $(DAT)/dungeon; fi;
## if [ -f $(DAT)/dungeon.pdf ]; then rm $(DAT)/dungeon.pdf; fi;
## if [ -f $(DAT)/dungeon ]; then rm $(DAT)/dungeon; fi;
# if [ -f $(DAT)/oracles ]; then rm $(DAT)/oracles; fi;
## if [ -f $(DAT)/quest.dat ]; then rm $(DAT)/quest.dat; fi;
# if [ -f $(DAT)/bogusmon ]; then rm $(DAT)/bogusmon; fi;

View File

@@ -38,10 +38,10 @@ GAMEDIR =../msdos-binary
# your machine.
#
ADD_CURSES=Y
PDCURSES_TOP=../../pdcurses
PDCURSES_TOP=../lib/pdcurses
# 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
@@ -83,9 +83,9 @@ WSHR = ../win/share
# Executables.
ifndef DJGPP_TOP
ifdef TRAVIS_BUILD_DIR
DJGPP_TOP = TRAVIS_BUILD_DIR/djgpp
DJGPP_TOP = TRAVIS_BUILD_DIR/lib/djgpp
else
DJGPP_TOP = $(HOME)/djgpp
DJGPP_TOP = $(HOME)/lib/djgpp
endif
endif

View File

@@ -1,9 +1,15 @@
#!/bin/sh
#set -x
if [ -z "$TRAVIS_BUILD_DIR" ]; then
export DJGPP_TOP=$(pwd)/djgpp
export DJGPP_TOP=$(pwd)/lib/djgpp
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
DJGPP_URL="https://github.com/andrewwutw/build-djgpp/releases/download/v2.9/"
@@ -25,7 +31,11 @@ DJGPP_URL="$DJGPP_URL$DJGPP_FILE"
# export
cd util
if [ ! -d lib]; then
mkdir -p lib
fi
cd lib
if [ ! -f "$DJGPP_FILE" ]; then
if [ "$(uname)" = "Darwin" ]; then
#Mac
@@ -34,45 +44,38 @@ if [ ! -f "$DJGPP_FILE" ]; then
wget --no-hsts "$DJGPP_URL"
fi
fi
cd ../
if [ ! -d ../djgpp/i586-pc-msdosdjgpp ]; then
tar xjf "util/$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
if [ ! -d djgpp/i586-pc-msdosdjgpp ]; then
tar xjf "$DJGPP_FILE"
rm $DJGPP_FILE
fi
# DOS-extender for use with djgpp
cd djgpp
if [ ! -d cwsdpmi ]; then
if [ ! -d djgpp/cwsdpmi ]; then
if [ "$(uname)" = "Darwin" ]; then
#Mac
curl http://sandmann.dotster.com/cwsdpmi/csdpmi7b.zip -o csdpmi7b.zip
else
wget --no-hsts http://sandmann.dotster.com/cwsdpmi/csdpmi7b.zip
fi
cd djgpp
mkdir -p cwsdpmi
cd cwsdpmi
unzip ../csdpmi7b.zip
cd ../
cd ../../
rm csdpmi7b.zip
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 ../
#echo after dos extender
cd src
mkdir -p ../msdos-binary
@@ -93,16 +96,13 @@ make -f ../sys/msdos/Makefile2.cross
unset GCC_EXEC_PREFIX
#pwd
#ls ../djgpp/cwsdpmi/bin
#ls .
if [ -f ../djgpp/cwsdpmi/bin/CWSDPMI.EXE ]; then
cp ../djgpp/cwsdpmi/bin/CWSDPMI.EXE ../msdos-binary/CWSDPMI.EXE;
if [ -f ../lib/djgpp/cwsdpmi/bin/CWSDPMI.EXE ]; then
cp ../lib/djgpp/cwsdpmi/bin/CWSDPMI.EXE ../msdos-binary/CWSDPMI.EXE;
fi
# ls -l ../msdos-binary
cd ../msdos-binary
zip -9 ../NH370DOS.ZIP *
zip -9 ../lib/NH370DOS.ZIP *
cd ../
# ls -l NH370DOS.ZIP
ls -l lib/NH370DOS.ZIP

View File

@@ -55,7 +55,3 @@ CHGRP=true
VARDIRPERM = 0755
VARFILEPERM = 0600
GAMEPERM = 0755
CC=clang
CFLAGS+=-fsanitize=address -fno-omit-frame-pointer
LFLAGS+=-fsanitize=address -fno-omit-frame-pointer