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
|
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
|
started if they have a desire to get a full cross-compile of
|
||||||
NetHack going for the Amiga.
|
NetHack going for the Amiga.
|
||||||
See CAVEATS below.
|
|
||||||
|
|
||||||
Cross-compiler used: bebbo's amiga-gcc
|
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,
|
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
|
so you will likely have to obtain the cross-compiler sources via git and
|
||||||
build it on your system.
|
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 \
|
sudo apt install make wget git gcc g++ lhasa libgmp-dev \
|
||||||
libmpfr-dev libmpc-dev flex bison gettext texinfo ncurses-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
|
The build prerequisite packages for macOS via homebrew are documented but
|
||||||
not tested by us any of us to date.
|
not tested by us any of us to date.
|
||||||
|
|
||||||
brew install bash wget make lhasa gmp mpfr libmpc flex gettext \
|
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
|
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
|
cd amiga-gcc
|
||||||
make update
|
make update
|
||||||
|
|
||||||
[Note that you may have to take ownership of the files in the bebbo
|
The compiler pieces are installed in /opt/amiga by default, and the
|
||||||
repo via chown before successfully carrying out the next steps]
|
NetHack Makefiles expect them there.
|
||||||
|
|
||||||
make clean
|
If you prefer, you can alter the prefix before you build if you want.
|
||||||
make clean-prefix
|
The instructions for doing so were spelled out at the time of this writing at:
|
||||||
date; make all -j3 >&b.log; date
|
|
||||||
|
|
||||||
The compiler pieces are installed in /opt/amiga by default. If you prefer,
|
https://github.com/AmigaPorts/m68k-amigaos-gcc
|
||||||
you can alter the prefix before you build if you want. The instructions
|
Makefile adjustments will be needed, however.
|
||||||
for doing so were spelled out at the time of this writing at:
|
|
||||||
|
|
||||||
https://github.com/bebbo/amiga-gcc
|
On your linux host:
|
||||||
|
|
||||||
On your linux host:
|
# Clone NetHack 3.7 source
|
||||||
|
cd NetHack
|
||||||
cd sys/unix ; sh setup.sh hints/linux.370 ; cd ../..
|
sys/unix/setup.sh sys/unix/hints/linux.370
|
||||||
make fetch-lua
|
make fetch-lua
|
||||||
|
make CROSS_TO_AMIGA=1 fetch-regex
|
||||||
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 all
|
make CROSS_TO_AMIGA=1 all
|
||||||
make CROSS_TO_AMIGA=1 package
|
make CROSS_TO_AMIGA=1 package
|
||||||
|
|
||||||
You can explicitly include tty and curses support if desired, otherwise
|
The distribution ZIP is created at targets/amiga/NH370AMI.ZIP.
|
||||||
you'll end up with a tty-only cross-compile build. The SDL1 pdcurses
|
|
||||||
support has not been tested.
|
|
||||||
|
|
||||||
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
|
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
|
targets/amiga/pkg
|
||||||
and then it zips the contents of that folder into:
|
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
|
Display Modes
|
||||||
above, does not preclude you from building local linux or macOS
|
-------------
|
||||||
targets as well. Just drop the CROSS_TO_AMIGA=1 from the make
|
Two display modes are available, selected in nethack.cnf:
|
||||||
command line.
|
|
||||||
|
|
||||||
The cross-compiler hints additions are enclosed inside ifdef sections
|
Text mode (AMII):
|
||||||
and won't interfere with the non-cross-compile build in that case.
|
OPTIONS=symset:AmigaFont
|
||||||
|
|
||||||
CAVEATS: The original NetHack Amiga build steps included the source for
|
Tile mode (AMIV):
|
||||||
some utilities that were built and executed on the amiga:
|
OPTIONS=windowtype:amiv
|
||||||
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
|
|
||||||
|
|
||||||
- their functionality will have to be rolled into amiga NetHack
|
Tile mode auto-selects tiles32.iff (32 colors, 5 bitplanes) when the
|
||||||
itself and executed on the target Amiga the first time the game
|
screen supports 32+ colors, otherwise tiles16.iff (16 colors, 4 planes).
|
||||||
is run, perhaps.
|
|
||||||
|
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 |
|
| B6. Case sample: Web Assembly |
|
||||||
|
|||||||
Reference in New Issue
Block a user