Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
barotto committed Dec 23, 2021
1 parent c71f29a commit 969dce9
Show file tree
Hide file tree
Showing 3 changed files with 205 additions and 78 deletions.
45 changes: 34 additions & 11 deletions BUILD_LINUX.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,20 @@
* GLEW
* libarchive (optional)
* libsamplerate (optional)
* libasound (optional)
* zlib (optional)

You need libarchive if you want to use zipped ROM sets.
Without libarchive you'll not be able to use zipped ROM sets.

Without libsamplerate the PC Speaker will not emit any sound and other audio
sources will not be played unless they are at the same rate as the mixer.

Without libasound there'll be no MIDI output support.

Without zlib the ZMBV compressed video capture format will not work.

## General instructions

First of all run:
```
$ autoreconf --install
Expand All @@ -27,7 +31,7 @@ $ autoreconf --install
Then configure, build, and install:
```
$ ./configure --with-rmlui-prefix=PATH/TO/RMLUI
$ make
$ make -j`nproc`
$ make install
```
Use `./configure --help` to read the various compilation options.
Expand All @@ -48,21 +52,37 @@ To compile RmlUi you'll need cmake and libfreetype.
$ git clone https://github.com/mikke89/RmlUi
$ mkdir RmlUi/build && cd RmlUi/build
$ cmake .. -G"Unix Makefiles" -DCMAKE_BUILD_TYPE=Release
$ make
$ make -j`nproc`
```

## Statically linked version

Static linking is totally unsupported on Linux.
Just follow the previous instructions and compile with dynamic linking.

This procedure works only on my Ubuntu system with some library recompiled.
I'll keep these notes here only for my reference and convenience.
But if you insist on building a "static" version, here's my personal recipe.

**NOTE:** libSDL2 will always be linked dynamically.
This procedure works only on my Ubuntu system with some library recompiled.
These notes are for my reference and convenience only.

**NOTE:** this is actually a hybrid and not all libraries will be linked
statically, specifically:
- libSDL2-2.0 (SDL2)
- libasound (ALSA)
- libGL (OpenGL)
- libc (C stdlib)
- libm (C math lib)
- libpthread (POSIX Threads)

To know the needed dynamic libraries:
```
$ readelf -d ibmulator | grep NEEDED
```

Needed libs:
### Required libraries

* libsdl2
* libasound
* libtiff
* libjpeg
* libwebp
Expand All @@ -76,9 +96,12 @@ Needed libs:

```
$ sudo apt install libtiff-dev libjpeg-dev libwebp-dev liblzma-dev libjbig-dev \
libzstd-dev libharfbuzz-dev libbz2-dev liblzo2-dev libfreetype6-dev
libzstd-dev libharfbuzz-dev libbz2-dev liblzo2-dev libfreetype6-dev \
libsdl2-dev libasound2-dev
```

### Compilation

Compile libarchive with lot of stuff removed:
```
$ git clone https://github.com/libarchive/libarchive.git
Expand All @@ -87,7 +110,7 @@ $ ./configure --without-bz2lib --without-libb2 --without-iconv --without-lz4 \
--without-zstd --without-lzma --with-lzo2 --without-cng --without-nettle \
--without-openssl --without-xml2 --without-expat \
--prefix=/home/marco/workspace/libarchive/release
$ make -j24
$ make -j`nproc`
$ make install
```

Expand All @@ -96,7 +119,7 @@ Compile GLEW:
$ git clone https://github.com/nigels-com/glew.git
$ cd glew/build/cmake
$ ccmake
$ make -j24
$ make -j`nproc`
$ make install
```

Expand All @@ -105,7 +128,7 @@ Compile RmlUi with the shared libs option disabled:
$ cd RmlUi/build/
$ cmake .. -G "Unix Makefiles" -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX:PATH=/home/marco/workspace/RmlUi/release
$ make -j24
$ make -j`nproc`
$ make install
```

Expand Down
8 changes: 4 additions & 4 deletions BUILD_WINDOWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ line) and:
4. Create the Makefile with cmake:
`cmake .. -G"MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/mingw64/x86_64-w64-mingw32`
for static linking add `-DBUILD_SHARED_LIBS=OFF`
5. Build and install (change the 8 with the number of your CPU's cores):
`make -j8 && make install`
5. Build and install:
`make -j$(nproc) && make install`


## STEP 3. Build IBMulator
Expand All @@ -67,8 +67,8 @@ folder of your choosing (see [below](#installation) for more info).
Example:
`./configure --prefix=/c/workspace/IBMulator/release --enable-static`
6. Build:
`make -j8`
7. Install if you used the `--prefix` option:
`make -j$(nproc)`
7. Install only if you used the `--prefix` option:
`make install`


Expand Down
Loading

0 comments on commit 969dce9

Please sign in to comment.