-INCS = -I. -I/usr/include -I${X11INC} -I/usr/include/freetype2
-LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -lutil -lXext -lXft -lfontconfig
+INCS = -I. -I/usr/include -I${X11INC} \
+ `pkg-config --cflags fontconfig` \
+ `pkg-config --cflags freetype2`
+LIBS = -L/usr/lib -lc -L${X11LIB} -lm -lrt -lX11 -lutil -lXext -lXft \
+ `pkg-config --libs fontconfig` \
+ `pkg-config --libs freetype2`