# st version
-VERSION = 0.0
+VERSION = 0.3
# Customize below to fit your system
X11LIB = /usr/X11R6/lib
# includes and libs
-INCS = -I. -I/usr/include -I${X11INC}
-LIBS = -L/usr/lib -lc -L${X11LIB} -lX11
+INCS = -I. -I/usr/include -I${X11INC} \
+ $(shell pkg-config --cflags fontconfig) \
+ $(shell pkg-config --cflags freetype2)
+LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -lutil -lXext -lXft \
+ $(shell pkg-config --libs fontconfig) \
+ $(shell pkg-config --libs freetype2)
# flags
CPPFLAGS = -DVERSION=\"${VERSION}\"
-CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
-LDFLAGS = -s ${LIBS}
-
-# Solaris
-#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
-#LDFLAGS = ${LIBS}
+CFLAGS += -g -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
+LDFLAGS += -g ${LIBS}
# compiler and linker
-CC = cc
+CC ?= cc
+