added BSD compatibility

This commit is contained in:
Bryson Steck 2022-03-24 15:00:05 -06:00
parent 2d556f1616
commit 1a44f91a4a
3 changed files with 47 additions and 2 deletions

View file

@ -0,0 +1,40 @@
Installation
=============
To install ``uirc``, you need to have the following items:
* A C compiler (``uirc`` uses ``gcc`` by default, but you can change what compiler you use in the `config.mk file <config.mk>`_.)
* The cURL libraries
* The ``stb`` libraries
If you want to install all three at once, follow the instructions for your system below.
Debian/Debian-based (Ubuntu, Pop!_OS, etc.)
--------------------------------------
.. code:: bash
$ sudo apt install git libcurl3-gnutls libstb-dev
RHEL-based (Fedora, CentOS, etc.)
----------------------------------
.. code:: bash
$ sudo dnf install git
OpenSUSE
---------
.. code:: bash
$ sudo zypper install
Arch/Arch-based (Manjaro, EndeavourOS, etc.)
---------------------------------------------
.. code:: bash
$ sudo pacman -S
FreeBSD/OpenBSD
----------------
.. code:: fish
$ doas pkg_add

View file

@ -5,10 +5,10 @@ include config.mk
SRC = uirc.c
uirc: ${SRC}
${CC} -l curl -o uirc -O ${SRC} -lm
${CC} ${OPTIONS} -l curl -o uirc -O ${SRC} -lm
debug: uirc
${CC} -g -l curl -o d_uirc -O ${SRC} -lm
${CC} -g ${OPTIONS} -l curl -o d_uirc -O ${SRC} -lm
gdb d_uirc
rm d_uirc

View file

@ -7,4 +7,9 @@ INCLUDE_PREFIX = /usr/include
MANPREFIX = ${PREFIX}/share/man
# compiler, default is gcc
# if you are on BSD, you might want to change this to cc unless you have gcc installed.
CC = gcc
# other options you want to add
# uncomment the following line if you are building on BSD
#OPTIONS = -L /usr/local/lib -I /usr/local/include