]> git.sur5r.net Git - i3/i3/commitdiff
common.mk: Split libpcre flags
authorQuentin Glidic <sardemff7+git@sardemff7.net>
Sun, 22 Jul 2012 21:07:10 +0000 (23:07 +0200)
committerQuentin Glidic <sardemff7+git@sardemff7.net>
Sun, 22 Jul 2012 21:53:51 +0000 (23:53 +0200)
common.mk
src/i3.mk

index fb4fecaf26f1d88699c3d95814d0c49d91e83e90..36d90318f0865772c095ad742ee5b48889e70d72 100644 (file)
--- a/common.mk
+++ b/common.mk
@@ -82,10 +82,6 @@ CFLAGS += $(call cflags_for_lib, yajl)
 # YAJL_MAJOR from that file to decide which code path should be used.
 CFLAGS += -idirafter $(TOPDIR)/yajl-fallback
 CFLAGS += $(call cflags_for_lib, libev)
-CFLAGS += $(call cflags_for_lib, libpcre)
-ifeq ($(shell pkg-config --atleast-version=8.10 libpcre 2>/dev/null && echo 1),1)
-I3_CPPFLAGS += -DPCRE_HAS_UCP=1
-endif
 
 LIBS += -lm
 LIBS += -L $(TOPDIR) -li3
@@ -105,7 +101,13 @@ LIBS += $(call ldflags_for_lib, xcursor,Xcursor)
 LIBS += $(call ldflags_for_lib, x11,X11)
 LIBS += $(call ldflags_for_lib, yajl,yajl)
 LIBS += $(call ldflags_for_lib, libev,ev)
-LIBS += $(call ldflags_for_lib, libpcre,pcre)
+
+# libpcre
+PCRE_CFLAGS := $(call cflags_for_lib, libpcre)
+ifeq ($(shell pkg-config --atleast-version=8.10 libpcre 2>/dev/null && echo 1),1)
+I3_CPPFLAGS += -DPCRE_HAS_UCP=1
+endif
+PCRE_LIBS   := $(call ldflags_for_lib, libpcre,pcre)
 
 # startup-notification
 LIBSN_CFLAGS := $(call cflags_for_lib, libstartup-notification-1.0)
index dc86898ec3c7bc04c1bd81e7e9ae16d2f42aefbb..390210f1d5142cf3a2493d395d07d0c733a2e42b 100644 (file)
--- 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             = $(LIBSN_CFLAGS)
-i3_LIBS               = $(LIBSN_LIBS)
+i3_CFLAGS             = $(PCRE_CFLAGS) $(LIBSN_CFLAGS)
+i3_LIBS               = $(PCRE_LIBS) $(LIBSN_LIBS)
 
 i3_OBJECTS := $(i3_SOURCES_GENERATED:.c=.o) $(i3_SOURCES:.c=.o)