summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryson Steck <steck.bryson@gmail.com>2022-03-24 15:00:05 -0600
committerBryson Steck <steck.bryson@gmail.com>2022-03-24 15:00:05 -0600
commit1a44f91a4a33e3ea8b9127ee2a7f2589adab6818 (patch)
treeb04a13ac67de85300bca94d4d8338bb40a7c5d6d
parent2d556f161628fd8d91b165ec3a50a51665ade5bf (diff)
downloaduirc-1a44f91a4a33e3ea8b9127ee2a7f2589adab6818.tar
uirc-1a44f91a4a33e3ea8b9127ee2a7f2589adab6818.tar.gz
uirc-1a44f91a4a33e3ea8b9127ee2a7f2589adab6818.tar.bz2
added BSD compatibility
-rw-r--r--INSTALL.rst40
-rw-r--r--Makefile4
-rw-r--r--config.mk5
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 <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
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