aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShivesh Mandalia <mail@shivesh.org>2021-09-22 16:29:52 +0100
committerShivesh Mandalia <mail@shivesh.org>2021-09-22 16:32:18 +0100
commit200b500ff64d4e2e1537d588906fb4c5ba84a8c9 (patch)
treededdb3b3daa0ca0e32b9b20f06f6613614433a1e
parent1a3df3652fcb24aa33467a0a6c2fdb6f3c43d63b (diff)
downloadst-200b500ff64d4e2e1537d588906fb4c5ba84a8c9.tar.gz
st-200b500ff64d4e2e1537d588906fb4c5ba84a8c9.zip
Initial config.mk compilation setup
- Compile with the Tiny C compiler (tcc) <https://bellard.org/tcc/> - Link with a patched version of libXft that allows for coloured emojis <https://github.com/uditkarode/libxft-bgra> - Create .gitignore file
-rw-r--r--.gitignore4
-rw-r--r--config.mk15
2 files changed, 14 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..534f481
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+config.h
+st
+*.o
+patches
diff --git a/config.mk b/config.mk
index c070a4a..a64f43e 100644
--- a/config.mk
+++ b/config.mk
@@ -7,20 +7,25 @@ VERSION = 0.8.4
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man
-X11INC = /usr/X11R6/include
-X11LIB = /usr/X11R6/lib
+# Patched Xft with support for coloured emojis
+# https://github.com/uditkarode/libxft-bgra
+XftINC = /usr/local/include
+XftLIB = /usr/local/lib
+X11INC = /usr/include
+X11LIB = /usr/lib
PKG_CONFIG = pkg-config
# includes and libs
-INCS = -I$(X11INC) \
+INCS = -I$(XftINC) -I$(X11INC) \
`$(PKG_CONFIG) --cflags fontconfig` \
`$(PKG_CONFIG) --cflags freetype2`
-LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft \
+LIBS = -L$(XftLIB) -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft \
`$(PKG_CONFIG) --libs fontconfig` \
`$(PKG_CONFIG) --libs freetype2`
# flags
+LDFLAGS = -Wl,-rpath=$(XftLIB)
STCPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600
STCFLAGS = $(INCS) $(STCPPFLAGS) $(CPPFLAGS) $(CFLAGS)
STLDFLAGS = $(LIBS) $(LDFLAGS)
@@ -32,4 +37,4 @@ STLDFLAGS = $(LIBS) $(LDFLAGS)
# `$(PKG_CONFIG) --libs freetype2`
# compiler and linker
-# CC = c99
+CC = tcc