]> granicus.if.org Git - nethack/commitdiff
more cross-compile djgpp build tweaks
authornhmall <nhmall@nethack.org>
Sat, 23 Nov 2019 17:19:33 +0000 (12:19 -0500)
committernhmall <nhmall@nethack.org>
Sat, 23 Nov 2019 17:19:33 +0000 (12:19 -0500)
sys/msdos/Makefile1.cross
sys/msdos/Makefile2.cross
sys/msdos/msdos-cross-compile.sh
sys/msdos/tile2bin.c

index dc530d80b7dacbd40795337871079bbdf35aa874..e2e6daede677eaca852f569f41e5bd1369aad379 100644 (file)
@@ -5,7 +5,7 @@
 #       Makefile1.cross (this file) is for the host-side obj files and 
 #       utilities that will run on the host platform only.
 #
-#       Makefile2.cross is for the target platform obj files
+#       Makefile2.cross is the the target platform obj files
 #       and utilities.
 #
 #   Makefile2 utilizes the djgpp cross-compiler from Andrew Wu:
@@ -143,8 +143,8 @@ TEXTIO      = $(HOST_O)tiletext.o $(HOST_O)tiletxt.o $(HOST_O)drawing.o $(HOST_O
 TEXTIO2     = $(HOST_O)tiletex2.o $(HOST_O)tiletxt2.o $(HOST_O)drawing.o $(HOST_O)decl.o $(HOST_O)monst.o \
                $(HOST_O)objects.o
 
-PLANAR_TIB  = $(DAT)/NETHACK1.TIB
-OVERVIEW_TIB = $(DAT)/NETHACKO.TIB
+#PLANAR_TIB  = $(DAT)/NETHACK1.TIB
+#OVERVIEW_TIB = $(DAT)/NETHACKO.TIB
 TILE_BMP    = $(DAT)/NHTILES.BMP
 
 TILEUTIL    = $(TILOBJ) $(U)tile2bin $(U)til2bin2 $(TILE_BMP) $(PLANAR_TIB) $(OVERVIEW_TIB)
index 9c12ca7f242d1d45f3257e883d2422d537c7ce0e..7a99be2b4f3cb57105fab89c99455544d7073891 100644 (file)
@@ -363,7 +363,7 @@ LUAOBJFILES2 =  $(O)ldebug.o $(O)ldo.o $(O)ldump.o $(O)lfunc.o         \
                $(O)lgc.o $(O)linit.o $(O)liolib.o $(O)llex.o
 LUAOBJFILES3 =  $(O)lmathlib.o $(O)lmem.o $(O)loadlib.o $(O)lobject.o  \
                $(O)lopcodes.o $(O)loslib.o $(O)lparser.o $(O)lstate.o
-LUAOBJFILES3 =  $(O)lstring.o $(O)lstrlib.o $(O)ltable.o $(O)ltablib.o \
+LUAOBJFILES4 =  $(O)lstring.o $(O)lstrlib.o $(O)ltable.o $(O)ltablib.o \
                $(O)ltm.o $(O)lundump.o $(O)lutf8lib.o $(O)lvm.o $(O)lzio.o
 
 #LUAOBJFILES =   $(O)lapi.o $(O)lauxlib.o $(O)lbaselib.o $(O)lbitlib.o  \
@@ -374,7 +374,7 @@ LUAOBJFILES3 =  $(O)lstring.o $(O)lstrlib.o $(O)ltable.o $(O)ltablib.o \
 #              $(O)lopcodes.o $(O)loslib.o $(O)lparser.o $(O)lstate.o \
 #              $(O)lstring.o $(O)lstrlib.o $(O)ltable.o $(O)ltablib.o \
 #              $(O)ltm.o $(O)lundump.o $(O)lutf8lib.o $(O)lvm.o $(O)lzio.o
-               
+       
 LUALIBOBJS = $(LUAOBJFILES1) $(LUAOBJFILES2) $(LUAOBJFILES3) $(LUAOBJFILES4)
 endif
 
@@ -746,11 +746,12 @@ endif
 #==========================================
 
 $(O)pdcurses.a : $(PDCLIBOBJS) $(PDCOBJS)
-       ar rcS $@ $(PDCLIBOBJS1)
-       ar rcS $@ $(PDCLIBOBJS2)
-       ar rcS $@ $(PDCLIBOBJS3)
-       ar rcS $@ $(PDCLIBOBJS4)
-       ar rcs $@ $(PDCOBJS)
+       if [ -f $@ ]; then rm $@; fi;
+       $(TARGET_AR) rcS $@ $(PDCLIBOBJS1)
+       $(TARGET_AR) rcS $@ $(PDCLIBOBJS2)
+       $(TARGET_AR) rcS $@ $(PDCLIBOBJS3)
+       $(TARGET_AR) rcS $@ $(PDCLIBOBJS4)
+       $(TARGET_AR) rcs $@ $(PDCOBJS)
 
 #==========================================
 #  Other Util Dependencies.
@@ -794,10 +795,11 @@ $(O)luac.o: $(LUASRC)/luac.c
 #==========================================
 
 $(LUALIB): $(LUALIBOBJS)
+       if [ -f $@ ]; then rm $@; fi;
        $(TARGET_AR) rcS $@ $(LUAOBJFILES1)
        $(TARGET_AR) rcS $@ $(LUAOBJFILES2)
        $(TARGET_AR) rcS $@ $(LUAOBJFILES3)
-       $(TARGET_AR) rcS $@ $(LUAOBJFILES4)
+       $(TARGET_AR) rcs $@ $(LUAOBJFILES4)
 
 #$(LUADLL): $(LUALIBOBJS)
 #      $(TARGET_CC) -shared -Wl,--export-all-symbols \
index 7769ceccd068cb4f2327c9f814c00981605e65b7..df298b2de984b28228a0ac76736ec21a64836e9a 100644 (file)
@@ -10,18 +10,23 @@ if [ ! -d ../djgpp/i586-pc-msdosdjgpp ]; then
     if [ "$(uname)" = "Darwin" ]; then
        #Mac
        wget --no-hsts https://github.com/andrewwutw/build-djgpp/releases/download/v2.9/djgpp-osx-gcc550.tar.bz2
+       cd ../
+       tar xjf util/djgpp-osx-gcc550.tar.bz2
     elif [ "$(expr substr $(uname -s) 1 5)" = "Linux" ]; then
        #Linux
        wget --no-hsts https://github.com/andrewwutw/build-djgpp/releases/download/v2.9/djgpp-linux64-gcc550.tar.bz2
+        cd ../
+       tar xjf util/djgpp-linux64-gcc550.tar.bz2
     elif [ "$(expr substr $(uname -s) 1 10)" = "MINGW32_NT" ]; then        
        #mingw
        wget --no-hsts https://github.com/andrewwutw/build-djgpp/releases/download/v2.9/djgpp-mingw-gcc550-standalone.zip
-    fi
-    if [ ! -d djgpp/i586-pc-msdosdjgpp ]; then
-       tar xjf util/djgpp-linux64-gcc550.tar.bz2
+       cd ../
+       tar xjf util/djgpp-mingw-gcc550-standalone.zip
     fi
 fi
+echo after tar
 cd ../
+pwd
 #  PDCurses
 if [ ! -d "../pdcurses" ]; then
        echo "Getting ../pdcurses from https://github.com/wmcbrine/PDCurses.git"
@@ -37,7 +42,10 @@ if [ ! -d cwsdpmi ]; then
        cd ../
        rm csdpmi7b.zip
 fi
-cd ../src
+cd ../
+echo after dos extender
+pwd
+cd src
 pwd
 mkdir -p ../msdos-binary
 cp ../dat/data.base ../dat/data.bas
index 4c7a3228d1cff39602df4d0589677df5a39bac1f..5d10248e4e5bf98211f11e26afefb09490e60364 100644 (file)
@@ -17,7 +17,7 @@
 #include "tile.h"
 #include "pctiles.h"
 
-#include <dos.h>
+/* #include <dos.h> */
 #ifndef MONITOR_HEAP
 #include <stdlib.h>
 #endif