2022-08-12 21:41:04 +02:00
|
|
|
# st version
|
2022-11-13 23:00:58 +01:00
|
|
|
VERSION = 1.1
|
2022-10-15 01:23:17 +02:00
|
|
|
|
2022-08-12 21:41:04 +02:00
|
|
|
# Customize below to fit your system
|
|
|
|
|
|
|
|
# paths
|
2022-11-13 22:16:04 +01:00
|
|
|
PREFIX = /usr
|
2022-08-16 22:45:40 +02:00
|
|
|
APPPREFIX = $(PREFIX)/share/applications
|
2022-08-12 21:41:04 +02:00
|
|
|
ICONPREFIX = $(PREFIX)/share/pixmaps
|
|
|
|
ICONNAME = st.png
|
|
|
|
|
|
|
|
X11INC = /usr/X11R6/include
|
|
|
|
X11LIB = /usr/X11R6/lib
|
|
|
|
|
|
|
|
PKG_CONFIG = pkg-config
|
|
|
|
|
|
|
|
# includes and libs
|
|
|
|
INCS = -I$(X11INC) \
|
|
|
|
`$(PKG_CONFIG) --cflags fontconfig` \
|
2022-10-07 14:47:14 +02:00
|
|
|
`$(PKG_CONFIG) --cflags harfbuzz` \
|
|
|
|
`$(PKG_CONFIG) --cflags freetype2`
|
|
|
|
LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft -lXrender -lgd \
|
2022-08-12 21:41:04 +02:00
|
|
|
`$(PKG_CONFIG) --libs fontconfig` \
|
2022-10-07 14:47:14 +02:00
|
|
|
`$(PKG_CONFIG) --libs harfbuzz` \
|
|
|
|
`$(PKG_CONFIG) --libs freetype2`
|
2022-08-12 21:41:04 +02:00
|
|
|
|
2022-11-15 18:30:24 +01:00
|
|
|
CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Wno-unused-variable -Wno-unused-result -Wno-unused-function -Ofast -march=native $(INCS) $(CPPFLAGS)
|
|
|
|
|
|
|
|
|
2022-08-12 21:41:04 +02:00
|
|
|
# flags
|
2022-11-15 18:34:32 +01:00
|
|
|
CPPFLAGS = -DVERSION=\"$(VERSION)\" -DICON=\"$(ICONPREFIX)/$(ICONNAME)\" -D_XOPEN_SOURCE=600
|
|
|
|
LDFLAGS = $(LIBS) -g
|
|
|
|
|
2022-08-12 21:41:04 +02:00
|
|
|
|
|
|
|
# OpenBSD:
|
|
|
|
#CPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600 -D_BSD_SOURCE
|
2022-11-13 23:00:58 +01:00
|
|
|
#LIBS = -L$(X11LIB) -lm -lX11 -lutil -lXft -lgd -lXrender \
|
2022-08-12 21:41:04 +02:00
|
|
|
# `$(PKG_CONFIG) --libs fontconfig` \
|
2022-10-07 14:47:14 +02:00
|
|
|
# `$(PKG_CONFIG) --libs harfbuzz` \
|
2022-08-12 21:41:04 +02:00
|
|
|
# `$(PKG_CONFIG) --libs freetype2`
|
2022-11-13 22:16:04 +01:00
|
|
|
|
|
|
|
# compiler and linker
|
2022-11-13 23:00:58 +01:00
|
|
|
CC = tcc
|