From 200b500ff64d4e2e1537d588906fb4c5ba84a8c9 Mon Sep 17 00:00:00 2001 From: Shivesh Mandalia Date: Wed, 22 Sep 2021 16:29:52 +0100 Subject: Initial config.mk compilation setup - Compile with the Tiny C compiler (tcc) - Link with a patched version of libXft that allows for coloured emojis - Create .gitignore file --- .gitignore | 4 ++++ config.mk | 15 ++++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 .gitignore 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 -- cgit v1.2.3