Libpng12 is quite old and 16 has been the default in Debian stable since
last year.
CFLAGS := -Wall -Wextra -Werror -std=c89 -pedantic -O2
FREETYPE_FLAGS := $(shell freetype-config --cflags --libs)
-LIBPNG_FLAGS := $(shell pkg-config --cflags --libs libpng12)
+LIBPNG_FLAGS := $(shell pkg-config --cflags --libs libpng16)
ttf2png: ttf2png.c
$(CC) $(CFLAGS) $^ -o $@ $(FREETYPE_FLAGS) $(LIBPNG_FLAGS)