]> git.tdb.fi Git - ttf2png.git/commitdiff
Makefile improvements
authorMikko Rasa <tdb@tdb.fi>
Fri, 23 Nov 2012 21:51:21 +0000 (23:51 +0200)
committerMikko Rasa <tdb@tdb.fi>
Fri, 23 Nov 2012 21:51:21 +0000 (23:51 +0200)
Makefile

index cfe0ee0725fce1054130099129fd31d52c5f04f0..a5d2b3ad096c25112548204557948ed95f757689 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,15 @@
+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