From 1a44f91a4a33e3ea8b9127ee2a7f2589adab6818 Mon Sep 17 00:00:00 2001 From: Bryson Steck Date: Thu, 24 Mar 2022 15:00:05 -0600 Subject: added BSD compatibility --- INSTALL.rst | 40 ++++++++++++++++++++++++++++++++++++++++ Makefile | 4 ++-- config.mk | 5 +++++ 3 files changed, 47 insertions(+), 2 deletions(-) diff --git a/INSTALL.rst b/INSTALL.rst index e69de29..64ab3e5 100644 --- a/INSTALL.rst +++ b/INSTALL.rst @@ -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 `_.) +* 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 diff --git a/Makefile b/Makefile index d0b32eb..34d7f1c 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/config.mk b/config.mk index 3a206c5..b1dc3d8 100644 --- a/config.mk +++ b/config.mk @@ -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 -- cgit v1.2.3