From: nhmall Date: Sat, 23 Nov 2019 17:19:33 +0000 (-0500) Subject: more cross-compile djgpp build tweaks X-Git-Tag: NetHack-3.7.0_WIP~248 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=69136fbb9866792c1fd805a021cd461da40fa3a6;p=nethack more cross-compile djgpp build tweaks --- diff --git a/sys/msdos/Makefile1.cross b/sys/msdos/Makefile1.cross index dc530d80b..e2e6daede 100644 --- a/sys/msdos/Makefile1.cross +++ b/sys/msdos/Makefile1.cross @@ -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) diff --git a/sys/msdos/Makefile2.cross b/sys/msdos/Makefile2.cross index 9c12ca7f2..7a99be2b4 100644 --- a/sys/msdos/Makefile2.cross +++ b/sys/msdos/Makefile2.cross @@ -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 \ diff --git a/sys/msdos/msdos-cross-compile.sh b/sys/msdos/msdos-cross-compile.sh index 7769ceccd..df298b2de 100644 --- a/sys/msdos/msdos-cross-compile.sh +++ b/sys/msdos/msdos-cross-compile.sh @@ -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 diff --git a/sys/msdos/tile2bin.c b/sys/msdos/tile2bin.c index 4c7a3228d..5d10248e4 100644 --- a/sys/msdos/tile2bin.c +++ b/sys/msdos/tile2bin.c @@ -17,7 +17,7 @@ #include "tile.h" #include "pctiles.h" -#include +/* #include */ #ifndef MONITOR_HEAP #include #endif