X-Git-Url: https://git.danieliu.xyz/?p=st.git;a=blobdiff_plain;f=config.mk;h=c070a4ac49d199e4e2525bd11fc528f3a3422571;hp=46efc0c26d0096c5e9ed92613d5e223f8dff6f06;hb=fa253f077f19b3220c7655b81bd91e52f4367803;hpb=ae5baac932af877cb18df6853d45f033ed9b270f diff --git a/config.mk b/config.mk index 46efc0c..c070a4a 100644 --- a/config.mk +++ b/config.mk @@ -1,23 +1,35 @@ # st version -VERSION = 0.0 +VERSION = 0.8.4 # Customize below to fit your system # paths PREFIX = /usr/local -MANPREFIX = ${PREFIX}/share/man +MANPREFIX = $(PREFIX)/share/man X11INC = /usr/X11R6/include X11LIB = /usr/X11R6/lib +PKG_CONFIG = pkg-config + # includes and libs -INCS = -I. -I/usr/include -I${X11INC} -LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -lutil +INCS = -I$(X11INC) \ + `$(PKG_CONFIG) --cflags fontconfig` \ + `$(PKG_CONFIG) --cflags freetype2` +LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft \ + `$(PKG_CONFIG) --libs fontconfig` \ + `$(PKG_CONFIG) --libs freetype2` # flags -CPPFLAGS = -DVERSION=\"${VERSION}\" -CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS} -LDFLAGS = -s ${LIBS} +STCPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600 +STCFLAGS = $(INCS) $(STCPPFLAGS) $(CPPFLAGS) $(CFLAGS) +STLDFLAGS = $(LIBS) $(LDFLAGS) + +# OpenBSD: +#CPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600 -D_BSD_SOURCE +#LIBS = -L$(X11LIB) -lm -lX11 -lutil -lXft \ +# `$(PKG_CONFIG) --libs fontconfig` \ +# `$(PKG_CONFIG) --libs freetype2` # compiler and linker -CC = cc +# CC = c99