+CFLAGS := -Wall -Wextra -Werror -std=c89 -pedantic -O2
+FREETYPE_FLAGS := $(shell freetype-config --cflags --libs)
+LIBPNG_FLAGS := $(shell pkg-config --cflags --libs libpng12)
+
ttf2png: ttf2png.c
- gcc -Wall -Wextra -Werror -std=c89 -pedantic -O2 $^ -o $@ $(shell freetype-config --cflags --libs) $(shell pkg-config --cflags --libs libpng12)
+ $(CC) $(CFLAGS) $^ -o $@ $(FREETYPE_FLAGS) $(LIBPNG_FLAGS)
+
+.PHONY: clean
+clean:
+ $(RM) ttf2png
-VER=0.3
+VER = 0.3
.PHONY: tarball
tarball: ttf2png-$(VER).tar.gz