# 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:
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)
$(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 \
# $(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
#==========================================
$(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.
#==========================================
$(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 \
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"
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