Skip to content
This repository was archived by the owner on Aug 2, 2023. It is now read-only.

Compiling

TheRealOne78 edited this page Nov 17, 2022 · 6 revisions

Installing the dependencies

The easiest approach is by running the configure.sh script:

root# bash ./configure.sh

This bash script will automatically check and install all dependencies via the package manager the system is using. The following package managers are available:

  • apt-get (Debian, Ubuntu, Pop!_OS, Mint, etc.)
  • pacman (Arch, Artix, Arco, Manjaro, etc.)
  • dnf (Fedora)
  • pkg (FreeBSD, (probaly Termux as well))
  • pkg_add (OpenBSD)
  • pkgin (NetBSD)

If the system the user wants to compile XAWP does not have any of these package managers, the next approach may be the solution. Gentoo Linux and CentOS Linux are some examples of distributions that are not compatible for automatic dependencies install.

The manual approach is by selecting the packages and install them manually. The dependencies XAWP needs for compiling and executing are the following:

  • gcc
  • make (for Linux based systems)
  • gmake (for BSD based systems)
  • imlib2 (dev)
  • libx11 (dev)
  • libconfig (dev)

NOTE: From system to system, the packages may have different name!

Automatic compiling

The following command will be used for automatic compiling:

foo$ bash ./compile.sh

This method will use by default every CPU thread available in the selected device, however the XAWP source code is not big and it should compile fast in modern computers.

Manual compiling

The only command needed for compiling in Linux based distributions is make and for the BSD Family is gmake. It can be executed as following:

#Linux:
foo$ make -j$(nproc)
#BSD:
foo$ gmake -j$(nproc)

Of course, this command needs to be executed in the same directory with the Makefile file, otherwise the command will fail. -j$(nproc) is the an argument specifing to use all the threads available in the system. Using less threads is quite simple, $(nproc) being modified with the number of CPU threads make will use for compiling.
Example:

foo$ make -j2 # will use only 2 CPU threads

The next step would be to install XAWP.

Clone this wiki locally