Add Haiku OS support to build system
This commit is contained in:
parent
5fdb4acb5e
commit
a495aefe83
7 changed files with 75 additions and 13 deletions
|
@ -475,6 +475,12 @@ if test x$enable_network = xyes ; then
|
|||
AC_DEFINE(C_MODEM,1)
|
||||
AC_DEFINE(C_IPX,1)
|
||||
AC_MSG_RESULT([yes])
|
||||
case "$host_os" in haiku*)
|
||||
AC_CHECK_LIB(network, socket, [],
|
||||
[AC_MSG_ERROR([Can't find a useable network libary])],
|
||||
-l network)
|
||||
;;
|
||||
esac
|
||||
else
|
||||
AC_MSG_WARN([Can't find SDL_net, internal modem and ipx disabled])
|
||||
fi
|
||||
|
|
1
scripts/automator/build/clang-haiku_x86_64
Normal file
1
scripts/automator/build/clang-haiku_x86_64
Normal file
|
@ -0,0 +1 @@
|
|||
ld="ld"
|
7
scripts/automator/build/gcc-haiku_x86_64
Normal file
7
scripts/automator/build/gcc-haiku_x86_64
Normal file
|
@ -0,0 +1,7 @@
|
|||
# Tool additions
|
||||
ldflags+=(-Wl,--as-needed)
|
||||
|
||||
# Enable math vectorizions using instructions avaiable in circa-2008+ CPUs
|
||||
x86_math=(-mfpmath=sse -msse4.2)
|
||||
cflags_release+=("${x86_math[@]}")
|
||||
cflags_optinfo+=("${x86_math[@]}")
|
10
scripts/automator/build/os-haiku
Normal file
10
scripts/automator/build/os-haiku
Normal file
|
@ -0,0 +1,10 @@
|
|||
cflags+=(-fPIC)
|
||||
|
||||
function make_binary() {
|
||||
make \
|
||||
--jobs="$(nproc)" \
|
||||
--output-sync=line \
|
||||
|& tee build.log
|
||||
}
|
||||
|
||||
dependencies=(objdump -afp "${executable}")
|
1
scripts/automator/packages/clang-haikuports
Normal file
1
scripts/automator/packages/clang-haikuports
Normal file
|
@ -0,0 +1 @@
|
|||
compiler=(llvm${postfix}_clang)
|
6
scripts/automator/packages/manager-haikuports
Normal file
6
scripts/automator/packages/manager-haikuports
Normal file
|
@ -0,0 +1,6 @@
|
|||
# Package repo: https://depot.haiku-os.org
|
||||
delim=""
|
||||
packages+=(ccache coreutils autoconf automake autoconf_archive
|
||||
pkgconfig libpng ncurses6_devel libsdl2_devel
|
||||
sdl2_net_devel libogg_devel opus_devel opusfile_devel
|
||||
gcc_syslibs_devel opus_tools)
|
|
@ -1,17 +1,19 @@
|
|||
# DOSBox Build Script
|
||||
# Build Script
|
||||
|
||||
This script builds DOSBox with your choice of compiler, release type, and
|
||||
additional options. It runs on MacOS, Linux, and Windows.
|
||||
This script builds `dosbox-staging` with your choice of compiler, release
|
||||
type, and additional options. It runs on MacOS, Linux, Windows, and possibly
|
||||
other operating systems.
|
||||
|
||||
If this is your first time building DOSBox, then you will need to install
|
||||
DOSBox's development tools and dependencies, which is included in the notes
|
||||
below.
|
||||
If this is your first time building dosbox-staging, then you will need to
|
||||
install its development tools and dependencies, which is covered in the
|
||||
notes below.
|
||||
|
||||
## Requirements
|
||||
|
||||
- **Windows newer than XP**
|
||||
- **NTFS-based C:**, because msys2 doesn't work on FAT filesystems
|
||||
- **MacOS** 10.x
|
||||
- **Haiku** up-to-date
|
||||
- **Ubuntu** 16.04 or newer
|
||||
- **Fedora** up-to-date
|
||||
- **RedHat or CentOS** 7 or newer
|
||||
|
@ -81,13 +83,13 @@ agreed to:
|
|||
1. Download and install brew per the instructions here: <https://brew.sh>
|
||||
1. Update it with: `brew update`
|
||||
1. Install git with: `brew install git`
|
||||
1. Install DOSBox dependencies:
|
||||
1. Install dosbox-staging dependencies:
|
||||
`brew install $(./scripts/list-build-dependencies.sh -p brew)`
|
||||
|
||||
### MacPorts Installation
|
||||
|
||||
1. Build and install MacPorts along with DOSBox dependencies with the following
|
||||
sequence:
|
||||
1. Build and install MacPorts along with dosbox-staging dependencies with the
|
||||
following sequence:
|
||||
|
||||
``` shell
|
||||
git clone --quiet --depth=1 https://github.com/macports/macports-base.git
|
||||
|
@ -101,12 +103,12 @@ agreed to:
|
|||
sudo port -q install $(/scripts/list-build-dependencies.sh -p macports)
|
||||
```
|
||||
|
||||
### Build DOSBox (common for all of the above)
|
||||
### Build dosbox-staging (common for all of the above)
|
||||
|
||||
1. Clone the repository: `git clone
|
||||
https://github.com/dreamer/dosbox-staging.git`
|
||||
1. Change directories into the repo: `cd dosbox-staging`
|
||||
1. Build DOSBox:
|
||||
1. Build:
|
||||
|
||||
- Clang: `./scripts/build.sh --compiler clang -t release --bin-path
|
||||
/usr/local/bin`
|
||||
|
@ -125,12 +127,41 @@ agreed to:
|
|||
in this example: `sudo apt install -y $(./scripts/list-build-dependencies.sh
|
||||
-p apt)` For other supported package managers, run:
|
||||
`./scripts/list-build-dependencies.sh --help`
|
||||
1. Build DOSBox:
|
||||
1. Build:
|
||||
|
||||
- Clang: `./scripts/build.sh --compiler clang -t release -v 9`
|
||||
- GCC (default version): `./scripts/build.sh -c gcc -t release`
|
||||
- GCC (specific version, ie: 9): `./scripts/build.sh -c gcc -v 9 -t release`
|
||||
|
||||
## Haiku Installation
|
||||
|
||||
1. Clone the repository: `git clone
|
||||
https://github.com/dreamer/dosbox-staging.git`
|
||||
1. Change directories into the repo: `cd dosbox-staging`
|
||||
1. (🏁 first-time-only) Install dependencies:
|
||||
|
||||
`pkgman install -y $(./scripts/list-build-dependencies.sh
|
||||
-c clang -v 9 -p haikuports)`
|
||||
1. Build an optimized binary:
|
||||
|
||||
- Clang: `./scripts/build.sh --compiler clang -t
|
||||
release -m lto --prefix=$HOME/config/non-packaged`
|
||||
- GCC: `./scripts/build.sh -c gcc -t release
|
||||
--prefix=$HOME/config/non-packaged`
|
||||
1. Build a debug binary:
|
||||
|
||||
- Clang: `./scripts/build.sh --compiler clang -t debug
|
||||
--prefix=$HOME/config/non-packaged`
|
||||
- GCC: `./scripts/build.sh -c gcc -t debug
|
||||
--prefix=$HOME/config/non-packaged`
|
||||
1. Install: `make install`
|
||||
1. Set the emulation core type to ***normal*** by editing your config file
|
||||
`dosbox -editconf` and setting `core = normal` in the `[cpu]` section.
|
||||
1. You may now run `dosbox` inside any directory in your Terminal.
|
||||
|
||||
Note: `texture*` output is not available under Haiku; use the default
|
||||
`opengl*` output options instead.
|
||||
|
||||
## Additional Tips
|
||||
|
||||
### Compiler variations
|
||||
|
@ -305,7 +336,7 @@ Procedures:
|
|||
|
||||
Repeat this for multiple training runs, each time saving the output to a new
|
||||
`-o samples-N.prof` file. Ideally you want to exercise all code paths in
|
||||
DOSBox (core types, video cards, video modes, sound cards, and audio
|
||||
dosbox-staging (core types, video cards, video modes, sound cards, and audio
|
||||
codecs).
|
||||
|
||||
1. Convert your sample profiles into compiler-specific records using tools
|
||||
|
|
Loading…
Add table
Reference in a new issue