CC ?= cc # Handle libsvgtiny flags and libs separately in case it's missing. If # you're building against a local (non-system) libsvgtiny, then the # absence of its pkg-config file should not be a fatal error. SVGTINY_CPPFLAGS := $(shell pkg-config --silence-errors --cflags libsvgtiny) OTHER_CPPFLAGS := $(shell pkg-config --cflags cairo x11) CPPFLAGS += $(SVGTINY_CPPFLAGS) $(OTHER_CPPFLAGS) SVGTINY_LIBS := $(shell pkg-config --silence-errors --libs libsvgtiny) OTHER_LIBS := $(shell pkg-config --libs cairo x11) -lm LIBS += $(SVGTINY_LIBS) $(OTHER_LIBS) all: svgtiny_display_x11 .c: $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) .PHONY : clean clean: rm -f svgtiny_display_x11