2022-08-12 21:41:04 +02:00
|
|
|
# st version
|
2022-10-09 17:38:22 +02:00
|
|
|
VERSION = 1.0
|
2022-08-12 21:41:04 +02:00
|
|
|
|
|
|
|
# Customize below to fit your system
|
|
|
|
|
|
|
|
# paths
|
2022-10-07 14:47:14 +02:00
|
|
|
PREFIX = /usr/local
|
2022-08-16 22:45:40 +02:00
|
|
|
APPPREFIX = $(PREFIX)/share/applications
|
2022-08-12 21:41:04 +02:00
|
|
|
MANPREFIX = $(PREFIX)/share/man
|
|
|
|
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
|
|
|
|
|
|
|
# flags
|
|
|
|
STCPPFLAGS = -DVERSION=\"$(VERSION)\" -DICON=\"$(ICONPREFIX)/$(ICONNAME)\" -D_XOPEN_SOURCE=600
|
2022-10-07 15:07:15 +02:00
|
|
|
STCFLAGS = $(INCS) $(STCPPFLAGS) $(CPPFLAGS) $(CFLAGS) -march=native -Ofast
|
2022-08-12 21:41:04 +02:00
|
|
|
STLDFLAGS = $(LIBS) $(LDFLAGS)
|
|
|
|
|
|
|
|
# OpenBSD:
|
|
|
|
#CPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600 -D_BSD_SOURCE
|
2022-10-07 15:07:15 +02:00
|
|
|
#LIBS = -L$(X11LIB) -lm -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` \
|
2022-08-12 21:41:04 +02:00
|
|
|
# `$(PKG_CONFIG) --libs freetype2`
|
2022-08-16 22:45:40 +02:00
|
|
|
#MANPREFIX = ${PREFIX}/man
|
2022-08-12 21:41:04 +02:00
|
|
|
|
|
|
|
# compiler and linker
|
|
|
|
# CC = c99
|