From: Quentin Glidic Date: Sun, 22 Jul 2012 21:21:43 +0000 (+0200) Subject: common.mk: Split yajl flags X-Git-Tag: 4.3~166 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=85b261c16279cebb67bc76edea41e9ed1f6b76ef;p=i3%2Fi3 common.mk: Split yajl flags --- diff --git a/common.mk b/common.mk index 81ad2be5..a357a7a1 100644 --- a/common.mk +++ b/common.mk @@ -77,10 +77,6 @@ CFLAGS += $(call cflags_for_lib, xcb-randr) CFLAGS += $(call cflags_for_lib, xcb) CFLAGS += $(call cflags_for_lib, xcursor) CFLAGS += $(call cflags_for_lib, x11) -CFLAGS += $(call cflags_for_lib, yajl) -# Fallback for libyajl 1 which did not include yajl_version.h. We need -# YAJL_MAJOR from that file to decide which code path should be used. -CFLAGS += -idirafter $(TOPDIR)/yajl-fallback LIBS += -lm LIBS += -L $(TOPDIR) -li3 @@ -98,7 +94,13 @@ LIBS += $(call ldflags_for_lib, xcb-randr,xcb-randr) LIBS += $(call ldflags_for_lib, xcb,xcb) LIBS += $(call ldflags_for_lib, xcursor,Xcursor) LIBS += $(call ldflags_for_lib, x11,X11) -LIBS += $(call ldflags_for_lib, yajl,yajl) + +# yajl +YAJL_CFLAGS := $(call cflags_for_lib, yajl) +# Fallback for libyajl 1 which did not include yajl_version.h. We need +# YAJL_MAJOR from that file to decide which code path should be used. +YAJL_CFLAGS += -idirafter $(TOPDIR)/yajl-fallback +YAJL_LIBS := $(call ldflags_for_lib, yajl,yajl) #libev LIBEV_CFLAGS := $(call cflags_for_lib, libev) diff --git a/i3bar/i3bar.mk b/i3bar/i3bar.mk index e31a1373..43b6e478 100644 --- a/i3bar/i3bar.mk +++ b/i3bar/i3bar.mk @@ -4,8 +4,8 @@ CLEAN_TARGETS += clean-i3bar i3bar_SOURCES := $(wildcard i3bar/src/*.c) i3bar_HEADERS := $(wildcard i3bar/include/*.h) -i3bar_CFLAGS = $(LIBEV_CFLAGS) -i3bar_LIBS = $(LIBEV_LIBS) +i3bar_CFLAGS = $(YAJL_CFLAGS) $(LIBEV_CFLAGS) +i3bar_LIBS = $(YAJL_LIBS) $(LIBEV_LIBS) i3bar_OBJECTS := $(i3bar_SOURCES:.c=.o) diff --git a/src/i3.mk b/src/i3.mk index 16ddae68..e1d781d1 100644 --- a/src/i3.mk +++ b/src/i3.mk @@ -6,8 +6,8 @@ i3_SOURCES_GENERATED = src/cfgparse.tab.c src/cfgparse.yy.c i3_SOURCES := $(filter-out $(i3_SOURCES_GENERATED),$(wildcard src/*.c)) i3_HEADERS_CMDPARSER := $(wildcard include/GENERATED_*.h) i3_HEADERS := $(filter-out $(i3_HEADERS_CMDPARSER),$(wildcard include/*.h)) -i3_CFLAGS = $(LIBEV_CFLAGS) $(PCRE_CFLAGS) $(LIBSN_CFLAGS) -i3_LIBS = $(LIBEV_LIBS) $(PCRE_LIBS) $(LIBSN_LIBS) +i3_CFLAGS = $(YAJL_CFLAGS) $(LIBEV_CFLAGS) $(PCRE_CFLAGS) $(LIBSN_CFLAGS) +i3_LIBS = $(YAJL_LIBS) $(LIBEV_LIBS) $(PCRE_LIBS) $(LIBSN_LIBS) i3_OBJECTS := $(i3_SOURCES_GENERATED:.c=.o) $(i3_SOURCES:.c=.o)