]> granicus.if.org Git - nethack/commitdiff
make sys/msdos/msdos-cross-compile.sh build msdos NetHack entirely
authornhmall <nhmall@nethack.org>
Fri, 14 Aug 2020 22:23:31 +0000 (18:23 -0400)
committernhmall <nhmall@nethack.org>
Fri, 14 Aug 2020 22:23:31 +0000 (18:23 -0400)
- should work on linux or MacOS to build an msdos zipfile distribution
- no longer requires env variables be set ahead of it because it will set some
  defaults within
- you must have zip and unzip on your system though
- you have to "make fetch-lua" first if you haven't already done that
- script takes care of obtaining the djgpp-cross-compiler etc, then
  uses it to build msdos NetHack
- to clean and rebuild from scratch:
  make -f sys/msdos/Makefile1.cross clean

sys/msdos/Makefile1.cross
sys/msdos/msdos-cross-compile.sh

index 9bf2a52f58ded5335b0b326831fb2e220788060d..eb62bd3377d4ee739aebabe8bcad0d1550e47f14 100644 (file)
@@ -569,7 +569,8 @@ $(HOST_O)panic.o: $(CONFIG_H) $(U)panic.c
 #==========================================
 
 clean:
-       rm ./host_o/*.o
+       -rm $(HOBJ)/*.o
+       -rm ./msdos_o/*.o
        if [ -f $(HOST_O)prereq.tag ];     then rm $(HOST_O)prereq.tag; fi;
        if [ -f hobj.tag ];                then rm hobj.tag; fi;
        if [ -f $(HOST_O)utility.tag ];    then rm $(HOST_O)utility.tag; fi;
index 6580664ebb74df26231cf87613615fdcd3c5b8ba..fc3fc31dbba57ab10ff1be25046e717338223194 100644 (file)
@@ -7,6 +7,14 @@ else
        export DJGPP_TOP="$TRAVIS_BUILD_DIR/lib/djgpp"
 fi
 
+if [ -z "$GCCVER" ]; then
+       export GCCVER=gcc1010
+fi
+
+if [ -z "$LUA_VERSION" ]; then
+       export LUA_VERSION=5.4.0
+fi
+
 if [ ! -d "$(pwd)/lib" ]; then
        echo "Set up for Unix build and 'make fetch-lua' first."
        exit 1
@@ -17,9 +25,15 @@ DJGPP_URL="https://github.com/andrewwutw/build-djgpp/releases/download/v3.0/"
 if [ "$(uname)" = "Darwin" ]; then
     #Mac
     DJGPP_FILE="djgpp-osx-$GCCVER.tar.bz2"
+    if [ -z "HINTS" ]; then
+        export HINTS=macOS.2020
+    fi
 elif [ "$(expr substr $(uname -s) 1 5)" = "Linux" ]; then
     #Linux
     DJGPP_FILE="djgpp-linux64-$GCCVER.tar.bz2"
+    if [ -z "$HINTS" ]; then
+        export HINTS=linux.2020
+    fi
 elif [ "$(expr substr $(uname -s) 1 10)" = "MINGW32_NT" ]; then
     #mingw
     DJGPP_FILE="djgpp-mingw-$GCCVER-standalone.zip"