]> git.sur5r.net Git - i3/i3/commitdiff
common.mk: Split XCB keyboard flags
authorQuentin Glidic <sardemff7+git@sardemff7.net>
Sun, 22 Jul 2012 22:06:37 +0000 (00:06 +0200)
committerQuentin Glidic <sardemff7+git@sardemff7.net>
Sun, 22 Jul 2012 22:06:37 +0000 (00:06 +0200)
common.mk
i3-config-wizard/i3-config-wizard.mk
i3-input/i3-input.mk
src/i3.mk

index e347574e39bb29ae858528e843e7cf84c9814fef..3b75d380b1ef077af2fd0e6654e5fc691bd63b57 100644 (file)
--- a/common.mk
+++ b/common.mk
@@ -63,7 +63,6 @@ endif
 cflags_for_lib = $(shell pkg-config --silence-errors --cflags $(1) 2>/dev/null)
 ldflags_for_lib = $(shell pkg-config --exists 2>/dev/null $(1) && pkg-config --libs $(1) 2>/dev/null || echo -l$(2))
 
-CFLAGS += $(call cflags_for_lib, xcb-keysyms)
 ifeq ($(shell pkg-config --exists xcb-util 2>/dev/null || echo 1),1)
 I3_CPPFLAGS += -DXCB_COMPAT
 CFLAGS += $(call cflags_for_lib, xcb-atom)
@@ -75,7 +74,6 @@ CFLAGS += $(call cflags_for_lib, xcb)
 
 LIBS += -L $(TOPDIR) -li3
 LIBS += $(call ldflags_for_lib, xcb-event,xcb-event)
-LIBS += $(call ldflags_for_lib, xcb-keysyms,xcb-keysyms)
 ifeq ($(shell pkg-config --exists xcb-util 2>/dev/null || echo 1),1)
 LIBS += $(call ldflags_for_lib, xcb-atom,xcb-atom)
 LIBS += $(call ldflags_for_lib, xcb-aux,xcb-aux)
@@ -84,6 +82,10 @@ LIBS += $(call ldflags_for_lib, xcb-util)
 endif
 LIBS += $(call ldflags_for_lib, xcb,xcb)
 
+# XCB keyboard stuff
+XCB_KBD_CFLAGS := $(call cflags_for_lib, xcb-keysyms)
+XCB_KBD_LIBS   := $(call ldflags_for_lib, xcb-keysyms,xcb-keysyms)
+
 # XCB WM stuff
 XCB_WM_CFLAGS := $(call cflags_for_lib, xcb-icccm)
 XCB_WM_CFLAGS += $(call cflags_for_lib, xcb-xinerama)
index fd9325425094edbd97998615b3ab93f2d0ed89d9..1d2bc37aa0c0c041dec61e39f22ddd5049a3e11f 100644 (file)
@@ -5,8 +5,8 @@ CLEAN_TARGETS += clean-i3-config-wizard
 i3_config_wizard_SOURCES_GENERATED  = i3-config-wizard/cfgparse.tab.c i3-config-wizard/cfgparse.yy.c
 i3_config_wizard_SOURCES           := $(filter-out $(i3_config_wizard_SOURCES_GENERATED),$(wildcard i3-config-wizard/*.c))
 i3_config_wizard_HEADERS           := $(wildcard i3-config-wizard/*.h)
-i3_config_wizard_CFLAGS             = $(X11_CFLAGS)
-i3_config_wizard_LIBS               = $(X11_LIBS)
+i3_config_wizard_CFLAGS             = $(XCB_KBD_CFLAGS) $(X11_CFLAGS)
+i3_config_wizard_LIBS               = $(XCB_KBD_LIBS) $(X11_LIBS)
 
 i3_config_wizard_OBJECTS := $(i3_config_wizard_SOURCES_GENERATED:.c=.o) $(i3_config_wizard_SOURCES:.c=.o)
 
index 67a88bf15bf1d58cd2472f8511ca62f267780bae..849fbc694b0a3b6002a87b26cd61f56faa46526c 100644 (file)
@@ -4,8 +4,8 @@ CLEAN_TARGETS += clean-i3-input
 
 i3_input_SOURCES := $(wildcard i3-input/*.c)
 i3_input_HEADERS := $(wildcard i3-input/*.h)
-i3_input_CFLAGS   =
-i3_input_LIBS     =
+i3_input_CFLAGS   = $(XCB_KBD_CFLAGS)
+i3_input_LIBS     = $(XCB_KBD_LIBS)
 
 i3_input_OBJECTS := $(i3_input_SOURCES:.c=.o)
 
index e056342d44555c6f792cbec2aff8147c2c977132..49b7ce469ec4efa6d19c0731becdce3038dbf831 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             = $(XCB_WM_CFLAGS) $(X11_CFLAGS) $(XCURSOR_CFLAGS) $(YAJL_CFLAGS) $(LIBEV_CFLAGS) $(PCRE_CFLAGS) $(LIBSN_CFLAGS)
-i3_LIBS               = $(XCB_WM_LIBS) $(X11_LIBS) $(XCURSOR_LIBS) $(YAJL_LIBS) $(LIBEV_LIBS) $(PCRE_LIBS) $(LIBSN_LIBS) -lm
+i3_CFLAGS             = $(XCB_KBD_CFLAGS) $(XCB_WM_CFLAGS) $(X11_CFLAGS) $(XCURSOR_CFLAGS) $(YAJL_CFLAGS) $(LIBEV_CFLAGS) $(PCRE_CFLAGS) $(LIBSN_CFLAGS)
+i3_LIBS               = $(XCB_KBD_LIBS) $(XCB_WM_LIBS) $(X11_LIBS) $(XCURSOR_LIBS) $(YAJL_LIBS) $(LIBEV_LIBS) $(PCRE_LIBS) $(LIBSN_LIBS) -lm
 
 i3_OBJECTS := $(i3_SOURCES_GENERATED:.c=.o) $(i3_SOURCES:.c=.o)