update Cross-compiling for Amiga steps
This commit is contained in:
106
Cross-compiling
106
Cross-compiling
@@ -528,11 +528,11 @@ Cross-compiler pre-built binary downloads:
|
||||
Disclaimer: This is a minimal recipe, just to help someone else get
|
||||
started if they have a desire to get a full cross-compile of
|
||||
NetHack going for the Amiga.
|
||||
See CAVEATS below.
|
||||
|
||||
Cross-compiler used: bebbo's amiga-gcc
|
||||
Cross-compiler url: https://github.com/bebbo/amiga-gcc
|
||||
|
||||
Cross-compiler url: https://github.com/AmigaPorts/m68k-amigaos-gcc
|
||||
Author of 3.7 support: Ingo Paschke
|
||||
|
||||
To our knowledge, a pre-built copy of the cross-compiler isn't available,
|
||||
so you will likely have to obtain the cross-compiler sources via git and
|
||||
build it on your system.
|
||||
@@ -542,86 +542,84 @@ Cross-compiler url: https://github.com/bebbo/amiga-gcc
|
||||
|
||||
sudo apt install make wget git gcc g++ lhasa libgmp-dev \
|
||||
libmpfr-dev libmpc-dev flex bison gettext texinfo ncurses-dev \
|
||||
autoconf rsync
|
||||
autoconf rsync libreadline-dev
|
||||
|
||||
The build prerequisite packages for macOS via homebrew are documented but
|
||||
not tested by us any of us to date.
|
||||
|
||||
brew install bash wget make lhasa gmp mpfr libmpc flex gettext \
|
||||
texinfo gcc make autoconf
|
||||
gnu-sed texinfo gcc@12 make autoconf bison
|
||||
|
||||
After installing the prerequisite packages and the cross-compiler
|
||||
it was a straightforward build:
|
||||
the build is straightforward:
|
||||
|
||||
git clone https://github.com/bebbo/amiga-gcc.git
|
||||
Create the /opt/amiga directory for holding the compiler and tools.
|
||||
sudo mkdir /opt/amiga
|
||||
sudo chgrp users /opt/amiga
|
||||
sudo chmod 775 /opt/amiga
|
||||
sudo usermod -a -G users username
|
||||
(you may have to log off and back on)
|
||||
|
||||
Build the cross-compiler.
|
||||
git clone https://github.com/AmigaPorts/m68k-amigaos-gcc.git amiga-gcc
|
||||
cd amiga-gcc
|
||||
make update
|
||||
|
||||
[Note that you may have to take ownership of the files in the bebbo
|
||||
repo via chown before successfully carrying out the next steps]
|
||||
The compiler pieces are installed in /opt/amiga by default, and the
|
||||
NetHack Makefiles expect them there.
|
||||
|
||||
make clean
|
||||
make clean-prefix
|
||||
date; make all -j3 >&b.log; date
|
||||
If you prefer, you can alter the prefix before you build if you want.
|
||||
The instructions for doing so were spelled out at the time of this writing at:
|
||||
|
||||
The compiler pieces are installed in /opt/amiga by default. If you prefer,
|
||||
you can alter the prefix before you build if you want. The instructions
|
||||
for doing so were spelled out at the time of this writing at:
|
||||
https://github.com/AmigaPorts/m68k-amigaos-gcc
|
||||
Makefile adjustments will be needed, however.
|
||||
|
||||
https://github.com/bebbo/amiga-gcc
|
||||
On your linux host:
|
||||
|
||||
On your linux host:
|
||||
|
||||
cd sys/unix ; sh setup.sh hints/linux.370 ; cd ../..
|
||||
# Clone NetHack 3.7 source
|
||||
cd NetHack
|
||||
sys/unix/setup.sh sys/unix/hints/linux.370
|
||||
make fetch-lua
|
||||
|
||||
On your macOS host:
|
||||
|
||||
cd sys/unix ; sh setup.sh hints/macOS.370 ; cd ../..
|
||||
make fetch-lua
|
||||
|
||||
The Amiga cross-compile can then be carried out by specifying
|
||||
CROSS_TO_AMIGA=1 on the make command line:
|
||||
|
||||
make CROSS_TO_AMIGA=1 fetch-regex
|
||||
make CROSS_TO_AMIGA=1 all
|
||||
make CROSS_TO_AMIGA=1 package
|
||||
|
||||
You can explicitly include tty and curses support if desired, otherwise
|
||||
you'll end up with a tty-only cross-compile build. The SDL1 pdcurses
|
||||
support has not been tested.
|
||||
The distribution ZIP is created at targets/amiga/NH370AMI.ZIP.
|
||||
|
||||
make WANT_WIN_TTY=1 WANT_WIN_CURSES=1 CROSS_TO_AMIGA=1 all
|
||||
On your macOS host, the Amiga cross-compile can be carried out by specifying
|
||||
CROSS_TO_AMIGA=1 on the make command line:
|
||||
|
||||
# Clone NetHack 3.7 source
|
||||
cd NetHack
|
||||
sys/unix/setup.sh sys/unix/hints/macOS.370
|
||||
make fetch-lua
|
||||
make CROSS_TO_AMIGA=1 fetch-regex
|
||||
make CROSS_TO_AMIGA=1 all
|
||||
make CROSS_TO_AMIGA=1 package
|
||||
|
||||
Result: The "make package" target will bundle the (hopefully) necessary
|
||||
components to run NetHack on msdos into a folder:
|
||||
components to run NetHack on an Amiga into a folder:
|
||||
targets/amiga/pkg
|
||||
and then it zips the contents of that folder into:
|
||||
targets/amiga/nh370ami.zip
|
||||
targets/amiga/NH370AMI.ZIP
|
||||
|
||||
Also note that building the amiga targets using the make command
|
||||
above, does not preclude you from building local linux or macOS
|
||||
targets as well. Just drop the CROSS_TO_AMIGA=1 from the make
|
||||
command line.
|
||||
Display Modes
|
||||
-------------
|
||||
Two display modes are available, selected in nethack.cnf:
|
||||
|
||||
The cross-compiler hints additions are enclosed inside ifdef sections
|
||||
and won't interfere with the non-cross-compile build in that case.
|
||||
Text mode (AMII):
|
||||
OPTIONS=symset:AmigaFont
|
||||
|
||||
CAVEATS: The original NetHack Amiga build steps included the source for
|
||||
some utilities that were built and executed on the amiga:
|
||||
txt2iff and xpm2iff
|
||||
as part of the NetHack build procedure on amiga.
|
||||
Those did not compile out-of-the-box on the linux host. They
|
||||
will either have to be:
|
||||
- ported to build and run on the linux or macOS cross-compile
|
||||
host
|
||||
or
|
||||
Tile mode (AMIV):
|
||||
OPTIONS=windowtype:amiv
|
||||
|
||||
- their functionality will have to be rolled into amiga NetHack
|
||||
itself and executed on the target Amiga the first time the game
|
||||
is run, perhaps.
|
||||
Tile mode auto-selects tiles32.iff (32 colors, 5 bitplanes) when the
|
||||
screen supports 32+ colors, otherwise tiles16.iff (16 colors, 4 planes).
|
||||
|
||||
For further details about playing the game, and setting up your NetHack
|
||||
configuration, please see the following file:
|
||||
sys/amiga/README.amiga
|
||||
|
||||
If you make headway, or are successful getting a working copy of
|
||||
NetHack going on the amiga, drop us a note at devteam@nethack.org.
|
||||
|
||||
+--------------------------------+
|
||||
| B6. Case sample: Web Assembly |
|
||||
|
||||
Reference in New Issue
Block a user