fix compilation with older xcb-util with -DXCB_COMPAT (Thanks okraits)
This commit is contained in:
parent
f18ab28f5c
commit
4636eb840d
|
@ -88,6 +88,7 @@ XCB_CFLAGS += $(call cflags_for_lib, xcb-atom)
|
||||||
XCB_CFLAGS += $(call cflags_for_lib, xcb-aux)
|
XCB_CFLAGS += $(call cflags_for_lib, xcb-aux)
|
||||||
XCB_LIBS += $(call ldflags_for_lib, xcb-atom,xcb-atom)
|
XCB_LIBS += $(call ldflags_for_lib, xcb-atom,xcb-atom)
|
||||||
XCB_LIBS += $(call ldflags_for_lib, xcb-aux,xcb-aux)
|
XCB_LIBS += $(call ldflags_for_lib, xcb-aux,xcb-aux)
|
||||||
|
XCB_CPPFLAGS+= -DXCB_COMPAT
|
||||||
else
|
else
|
||||||
XCB_CFLAGS += $(call cflags_for_lib, xcb-util)
|
XCB_CFLAGS += $(call cflags_for_lib, xcb-util)
|
||||||
XCB_LIBS += $(call ldflags_for_lib, xcb-util)
|
XCB_LIBS += $(call ldflags_for_lib, xcb-util)
|
||||||
|
|
|
@ -13,7 +13,7 @@ i3_config_wizard_OBJECTS := $(i3_config_wizard_SOURCES_GENERATED:.c=.o) $(i3_con
|
||||||
|
|
||||||
i3-config-wizard/%.o: i3-config-wizard/%.c $(i3_config_wizard_HEADERS)
|
i3-config-wizard/%.o: i3-config-wizard/%.c $(i3_config_wizard_HEADERS)
|
||||||
echo "[i3-config-wizard] CC $<"
|
echo "[i3-config-wizard] CC $<"
|
||||||
$(CC) $(I3_CPPFLAGS) $(CPPFLAGS) $(i3_config_wizard_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ $<
|
$(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(i3_config_wizard_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
i3-config-wizard/cfgparse.yy.c: i3-config-wizard/cfgparse.l i3-config-wizard/cfgparse.tab.o $(i3_config_wizard_HEADERS)
|
i3-config-wizard/cfgparse.yy.c: i3-config-wizard/cfgparse.l i3-config-wizard/cfgparse.tab.o $(i3_config_wizard_HEADERS)
|
||||||
echo "[i3-config-wizard] LEX $<"
|
echo "[i3-config-wizard] LEX $<"
|
||||||
|
|
|
@ -12,7 +12,7 @@ i3_dump_log_OBJECTS := $(i3_dump_log_SOURCES:.c=.o)
|
||||||
|
|
||||||
i3-dump-log/%.o: i3-dump-log/%.c $(i3_dump_log_HEADERS)
|
i3-dump-log/%.o: i3-dump-log/%.c $(i3_dump_log_HEADERS)
|
||||||
echo "[i3-dump-log] CC $<"
|
echo "[i3-dump-log] CC $<"
|
||||||
$(CC) $(I3_CPPFLAGS) $(CPPFLAGS) $(i3_dump_log_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ $<
|
$(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(i3_dump_log_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
i3-dump-log/i3-dump-log: libi3.a $(i3_dump_log_OBJECTS)
|
i3-dump-log/i3-dump-log: libi3.a $(i3_dump_log_OBJECTS)
|
||||||
echo "[i3-dump-log] Link i3-dump-log"
|
echo "[i3-dump-log] Link i3-dump-log"
|
||||||
|
|
|
@ -12,7 +12,7 @@ i3_input_OBJECTS := $(i3_input_SOURCES:.c=.o)
|
||||||
|
|
||||||
i3-input/%.o: i3-input/%.c $(i3_input_HEADERS)
|
i3-input/%.o: i3-input/%.c $(i3_input_HEADERS)
|
||||||
echo "[i3-input] CC $<"
|
echo "[i3-input] CC $<"
|
||||||
$(CC) $(I3_CPPFLAGS) $(CPPFLAGS) $(i3_input_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ $<
|
$(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(i3_input_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
i3-input/i3-input: libi3.a $(i3_input_OBJECTS)
|
i3-input/i3-input: libi3.a $(i3_input_OBJECTS)
|
||||||
echo "[i3-input] Link i3-input"
|
echo "[i3-input] Link i3-input"
|
||||||
|
|
|
@ -12,7 +12,7 @@ i3_msg_OBJECTS := $(i3_msg_SOURCES:.c=.o)
|
||||||
|
|
||||||
i3-msg/%.o: i3-msg/%.c $(i3_msg_HEADERS)
|
i3-msg/%.o: i3-msg/%.c $(i3_msg_HEADERS)
|
||||||
echo "[i3-msg] CC $<"
|
echo "[i3-msg] CC $<"
|
||||||
$(CC) $(I3_CPPFLAGS) $(CPPFLAGS) $(i3_msg_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ $<
|
$(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(i3_msg_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
i3-msg/i3-msg: libi3.a $(i3_msg_OBJECTS)
|
i3-msg/i3-msg: libi3.a $(i3_msg_OBJECTS)
|
||||||
echo "[i3-msg] Link i3-msg"
|
echo "[i3-msg] Link i3-msg"
|
||||||
|
|
|
@ -12,7 +12,7 @@ i3_nagbar_OBJECTS := $(i3_nagbar_SOURCES:.c=.o)
|
||||||
|
|
||||||
i3-nagbar/%.o: i3-nagbar/%.c $(i3_nagbar_HEADERS)
|
i3-nagbar/%.o: i3-nagbar/%.c $(i3_nagbar_HEADERS)
|
||||||
echo "[i3-nagbar] CC $<"
|
echo "[i3-nagbar] CC $<"
|
||||||
$(CC) $(I3_CPPFLAGS) $(CPPFLAGS) $(i3_nagbar_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ $<
|
$(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(i3_nagbar_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
i3-nagbar/i3-nagbar: libi3.a $(i3_nagbar_OBJECTS)
|
i3-nagbar/i3-nagbar: libi3.a $(i3_nagbar_OBJECTS)
|
||||||
echo "[i3-nagbar] Link i3-nagbar"
|
echo "[i3-nagbar] Link i3-nagbar"
|
||||||
|
|
|
@ -12,7 +12,7 @@ i3bar_OBJECTS := $(i3bar_SOURCES:.c=.o)
|
||||||
|
|
||||||
i3bar/src/%.o: i3bar/src/%.c $(i3bar_HEADERS)
|
i3bar/src/%.o: i3bar/src/%.c $(i3bar_HEADERS)
|
||||||
echo "[i3bar] CC $<"
|
echo "[i3bar] CC $<"
|
||||||
$(CC) $(I3_CPPFLAGS) $(CPPFLAGS) $(i3bar_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -Ii3bar/include -c -o $@ $<
|
$(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(i3bar_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -Ii3bar/include -c -o $@ $<
|
||||||
|
|
||||||
i3bar/i3bar: libi3.a $(i3bar_OBJECTS)
|
i3bar/i3bar: libi3.a $(i3bar_OBJECTS)
|
||||||
echo "[i3bar] Link i3bar"
|
echo "[i3bar] Link i3bar"
|
||||||
|
|
|
@ -10,7 +10,7 @@ libi3_OBJECTS := $(libi3_SOURCES:.c=.o)
|
||||||
|
|
||||||
libi3/%.o: libi3/%.c $(libi3_HEADERS)
|
libi3/%.o: libi3/%.c $(libi3_HEADERS)
|
||||||
echo "[libi3] CC $<"
|
echo "[libi3] CC $<"
|
||||||
$(CC) $(I3_CPPFLAGS) $(CPPFLAGS) $(libi3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ $<
|
$(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(libi3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ $<
|
||||||
|
|
||||||
libi3.a: $(libi3_OBJECTS)
|
libi3.a: $(libi3_OBJECTS)
|
||||||
echo "[libi3] AR libi3.a"
|
echo "[libi3] AR libi3.a"
|
||||||
|
|
|
@ -31,11 +31,11 @@ canonical_path := ../$(shell basename $(shell readlink -f .))
|
||||||
|
|
||||||
include/all.h.pch: $(i3_HEADERS)
|
include/all.h.pch: $(i3_HEADERS)
|
||||||
echo "[i3] PCH all.h"
|
echo "[i3] PCH all.h"
|
||||||
$(CC) $(I3_CPPFLAGS) $(CPPFLAGS) $(i3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -x c-header include/all.h -o include/all.h.pch
|
$(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(i3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -x c-header include/all.h -o include/all.h.pch
|
||||||
|
|
||||||
src/%.o: src/%.c $(i3_HEADERS_DEP)
|
src/%.o: src/%.c $(i3_HEADERS_DEP)
|
||||||
echo "[i3] CC $<"
|
echo "[i3] CC $<"
|
||||||
$(CC) $(I3_CPPFLAGS) $(CPPFLAGS) $(i3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) $(PCH_FLAGS) -c -o $@ ${canonical_path}/$<
|
$(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(i3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) $(PCH_FLAGS) -c -o $@ ${canonical_path}/$<
|
||||||
|
|
||||||
src/cfgparse.yy.c: src/cfgparse.l src/cfgparse.tab.o $(i3_HEADERS_DEP)
|
src/cfgparse.yy.c: src/cfgparse.l src/cfgparse.tab.o $(i3_HEADERS_DEP)
|
||||||
echo "[i3] LEX $<"
|
echo "[i3] LEX $<"
|
||||||
|
@ -50,8 +50,8 @@ src/cfgparse.tab.c: src/cfgparse.y $(i3_HEADERS_DEP)
|
||||||
# and once as an object file for i3.
|
# and once as an object file for i3.
|
||||||
src/commands_parser.o: src/commands_parser.c $(i3_HEADERS_DEP) i3-command-parser.stamp
|
src/commands_parser.o: src/commands_parser.c $(i3_HEADERS_DEP) i3-command-parser.stamp
|
||||||
echo "[i3] CC $<"
|
echo "[i3] CC $<"
|
||||||
$(CC) $(I3_CPPFLAGS) $(CPPFLAGS) $(i3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) $(I3_LDFLAGS) $(LDFLAGS) -DTEST_PARSER -o test.commands_parser $< $(LIBS) $(i3_LIBS)
|
$(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(i3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) $(I3_LDFLAGS) $(LDFLAGS) -DTEST_PARSER -o test.commands_parser $< $(LIBS) $(i3_LIBS)
|
||||||
$(CC) $(I3_CPPFLAGS) $(CPPFLAGS) $(i3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ ${canonical_path}/$<
|
$(CC) $(I3_CPPFLAGS) $(XCB_CPPFLAGS) $(CPPFLAGS) $(i3_CFLAGS) $(I3_CFLAGS) $(CFLAGS) -c -o $@ ${canonical_path}/$<
|
||||||
|
|
||||||
i3-command-parser.stamp: generate-command-parser.pl parser-specs/commands.spec
|
i3-command-parser.stamp: generate-command-parser.pl parser-specs/commands.spec
|
||||||
echo "[i3] Generating command parser"
|
echo "[i3] Generating command parser"
|
||||||
|
|
Loading…
Reference in New Issue