1 2 3 4 5 6
ifeq ($(shell pkg-config libevent; echo $$?),1) $(error pkg libevent not found) endif CFLAGS += $(shell pkg-config --cflags libevent) LDFLAGS += $(shell pkg-config --libs libevent)