make msdos lib/djgpp/target folder more hierarchical

Instead of flat, have bin, lib and include folders for
the native DOS pieces.

If you have been cross-compiling for MSDOS, you will
need to carry out the following to bring things up-to-date:

    sys/msdos/fetch-cross-compiler.sh
    make CROSS_TO_MSDOS=1 WANT_DEBUG=1 package
This commit is contained in:
nhmall
2024-12-29 12:11:03 -05:00
parent 6c895ab6f6
commit 7b4445f040
3 changed files with 28 additions and 14 deletions

View File

@@ -139,12 +139,22 @@ if [ ! -d djgpp/djgpp-patch ]; then
cd ../../
fi
# create a directory to hold some native DOS executables that might get deployed
# create a directories to hold some native DOS pieces that might get deployed
if [ ! -d djgpp/target ]; then
cd djgpp
mkdir -p target
cd ../
fi
if [ ! -d djgpp/target/bin ]; then
mkdir -p djgpp/target/bin
fi
if [ ! -d djgpp/target/lib ]; then
mkdir -p djgpp/target/lib
fi
if [ ! -d djgpp/target/include ]; then
mkdir -p djgpp/target/include
fi
# These 4 arrays must have their elements kept in synch.
#
@@ -160,8 +170,9 @@ ziplocal=(
)
# name of file after extraction from zip file
exesought=(
"symify.exe"
"gdb.exe"
"bin/symify.exe"
"bin/gdb.exe"
)
# stored full path inside zip file
exepathinzip=(
@@ -196,11 +207,14 @@ if [ -d djgpp/target ]; then
fi
count=$(( $count + 1 ))
done
echo "Native DOS executables in lib/djgpp/target:"
ls -l *.exe
#
cd ../../
fi
FONT_VERSION="4.49"
FONT_FILE="terminus-font-$FONT_VERSION"
FONT_LFILE="$FONT_FILE.1"

View File

@@ -65,10 +65,10 @@ dospkg: dodata dosfonts $(GAMEBIN) $(TARGETPFX)recover.exe ../dat/nhtiles.bmp
cp $(DOSFONT)/ter-u28b.psf $(TARGETPFX)pkg/TER-U28B.PSF
cp $(DOSFONT)/ter-u32b.psf $(TARGETPFX)pkg/TER-U32B.PSF
cp ../lib/djgpp/cwsdpmi/bin/CWSDPMI.EXE $(TARGETPFX)pkg/CWSDPMI.EXE
( if [ -f ../lib/djgpp/target/symify.exe ]; then \
cp ../lib/djgpp/target/symify.exe $(TARGETPFX)pkg/SYMIFY.EXE; \
( if [ -f ../lib/djgpp/target/bin/symify.exe ]; then \
cp ../lib/djgpp/target/bin/symify.exe $(TARGETPFX)pkg/SYMIFY.EXE; \
else \
pwd; echo "../lib/djgpp/target/symify.exe not found"; \
pwd; echo "../lib/djgpp/target/bin/symify.exe not found"; \
fi; )
ifeq "$(WANT_DEBUG)" "1"
( if [ -f $(GDBEXE) ]; \

View File

@@ -133,6 +133,13 @@ override TARGET_CC = $(TOOLTOP1)/i586-pc-msdosdjgpp-gcc
override TARGET_CXX = $(TOOLTOP1)/i586-pc-msdosdjgpp-g++
override TARGET_AR = $(TOOLTOP1)/i586-pc-msdosdjgpp-gcc-ar
override TARGET_STUBEDIT = ../lib/djgpp/i586-pc-msdosdjgpp/bin/stubedit
ifdef MAKEFILE_SRC
FLDR=../
endif
ifdef MAKEFILE_TOP
FLDR=
endif
dostargetexes=$(FLDR)lib/djgpp/target/bin/
#
ifdef DOSBOX
dosbox=$(DOSBOX)
@@ -144,13 +151,6 @@ dosboxnhfolder=$(dosboxtop)/$(dosboxgameid)
dosboxnhsrc=$(dosboxnhfolder)/NHSRC
dosboxconfigfile=NETHACK.CNF
dosgdburl=http://www.mirrorservice.org/sites/ftp.delorie.com/pub/djgpp/current/v2gnu/gdb801b.zip
ifdef MAKEFILE_SRC
FLDR=../
endif
ifdef MAKEFILE_TOP
FLDR=
endif
dostargetexes=$(FLDR)lib/djgpp/target
WANT_DEBUG=1
DEPLOY=deploytodosbox
endif # dosbox
@@ -231,7 +231,7 @@ override PACKAGE = dospkg
override PREGAME += mkdir -p $(TARGETDIR) ; make $(TARGETPFX)exceptn.o ;
override CLEANMORE += rm -f -r $(TARGETDIR) ; rm -f -r $(FONTTARGETS) ;
ifeq "$(WANT_DEBUG)" "1"
GDBEXE=../lib/djgpp/target/gdb.exe
GDBEXE=$(dostargetexes)gdb.exe
GDBBAT=NHGDB.BAT
GDBCMDLINE=directory nhsrc/src nhsrc/include nhsrc/sys/msdos \
nhsrc/sys/share nhsrc/win/share nhsrc/win/curses \