]> granicus.if.org Git - nethack/commitdiff
linux-hosted msdos cross-compiler updates
authornhmall <nhmall@nethack.org>
Tue, 26 Nov 2019 03:47:54 +0000 (22:47 -0500)
committernhmall <nhmall@nethack.org>
Tue, 26 Nov 2019 03:47:54 +0000 (22:47 -0500)
sys/msdos/Makefile1.cross
sys/msdos/Makefile2.cross
sys/msdos/msdos-cross-compile.sh
sys/unix/hints/linux

index 06053ab710c8cb086b38ab9f6a4b1f26b210853d..d00d1985208bfef3ad531271fa6335f01e824564 100644 (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;
index dcb148a6edfb2b3bf5965165e902b6d8133c6ebc..f9a848e13b337ce543a6c85c454989e247f116ab 100644 (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
 
index 1edf7b147f7881fb2bb43c9f9f0ed3353ace4c4e..7516d193707107564363a199bfeb6fb40c69fc46 100644 (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
-cd ../
 
+#  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
 
index bcafe1cf1af51e6af413e9484b48ee045309f4a8..dcdee332dd5a792541fe0ea00a891dd1f8e227fa 100644 (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