=== modified file 'Makefile' --- Makefile 2015-02-06 22:28:42 +0000 +++ Makefile 2015-01-29 12:44:39 +0000 @@ -1,5 +1,3 @@ -pkgconfig = $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config $(1)) - ifeq ($(shell uname),Darwin) LIBTOOL ?= glibtool else @@ -21,15 +19,15 @@ override LDFLAGS+=-pg endif -ifeq ($(call pkg-config, --atleast-version=0.1.0 unibilium && echo 1),1) - override CFLAGS +=$(call pkg-config, --cflags unibilium) -DHAVE_UNIBILIUM - override LDFLAGS+=$(call pkg-config, --libs unibilium) -else ifeq ($(call pkg-config, tinfo && echo 1),1) - override CFLAGS +=$(call pkg-config, --cflags tinfo) - override LDFLAGS+=$(call pkg-config, --libs tinfo) -else ifeq ($(call pkg-config, ncursesw && echo 1),1) - override CFLAGS +=$(call pkg-config, --cflags ncursesw) - override LDFLAGS+=$(call pkg-config, --libs ncursesw) +ifeq ($(shell pkg-config --atleast-version=0.1.0 unibilium && echo 1),1) + override CFLAGS +=$(shell pkg-config --cflags unibilium) -DHAVE_UNIBILIUM + override LDFLAGS+=$(shell pkg-config --libs unibilium) +else ifeq ($(shell pkg-config tinfo && echo 1),1) + override CFLAGS +=$(shell pkg-config --cflags tinfo) + override LDFLAGS+=$(shell pkg-config --libs tinfo) +else ifeq ($(shell pkg-config ncursesw && echo 1),1) + override CFLAGS +=$(shell pkg-config --cflags ncursesw) + override LDFLAGS+=$(shell pkg-config --libs ncursesw) else override LDFLAGS+=-lncurses endif @@ -39,7 +37,7 @@ DEMOS=demo demo-async -ifeq ($(call pkg-config, glib-2.0 && echo 1),1) +ifeq ($(shell pkg-config glib-2.0 && echo 1),1) DEMOS+=demo-glib endif @@ -77,10 +75,10 @@ $(LIBTOOL) --mode=link --tag=CC $(CC) -o $@ $^ demo-glib.lo: demo-glib.c termkey.h - $(LIBTOOL) --mode=compile --tag=CC $(CC) -o $@ -c $< $(call pkg-config, glib-2.0 --cflags) + $(LIBTOOL) --mode=compile --tag=CC $(CC) -o $@ -c $< $(shell pkg-config glib-2.0 --cflags) demo-glib: $(LIBRARY) demo-glib.lo - $(LIBTOOL) --mode=link --tag=CC $(CC) -o $@ $^ $(call pkg-config, glib-2.0 --libs) + $(LIBTOOL) --mode=link --tag=CC $(CC) -o $@ $^ $(shell pkg-config glib-2.0 --libs) t/%.t: t/%.c $(LIBRARY) t/taplib.lo $(LIBTOOL) --mode=link --tag=CC $(CC) -o $@ $^