ifeq (,1)
SRCS = StubCursorManager.cpp \
       StubEventListener.cpp \
       TestEGLNativeTypeWayland.cpp \
       TestWaylandInputUnit.cpp \
       TestXBMCWaylandInputAcceptance.cpp \
       TmpEnv.cpp \
       WestonProcess.cpp \
       WestonTest.cpp \
       XBMCWayland.cpp

WAYLAND_TEST_MODULE_PROTOCOL = protocol.xml
WAYLAND_TEST_MODULE_PROTOCOL_SRCS = xbmc_wayland_test_protocol.c
WAYLAND_TEST_MODULE_PROTOCOL_GENERATED_SRCS = $(WAYLAND_TEST_MODULE_PROTOCOL_SRCS)
WAYLAND_TEST_MODULE_PROTOCOL_GENERATED_SRCS += xbmc_wayland_test_server_protocol.h
WAYLAND_TEST_MODULE_PROTOCOL_GENERATED_SRCS += xbmc_wayland_test_client_protocol.h
WAYLAND_TEST_MODULE_SRCS = XBMCWaylandTestExtension.cpp

INCLUDES += -I/home/marillat/src/xbmc-13.0~alpha9/lib/gtest/include -I
LIB = test_wayland.a

ifneq (,)
SRCS += $(WAYLAND_TEST_MODULE_PROTOCOL_SRCS)
endif

CLEAN_FILES += $(WAYLAND_TEST_MODULE_PROTOCOL_GENERATED_SRCS) xbmc-wayland-test-extension.so

include /home/marillat/src/xbmc-13.0~alpha9/Makefile.include
-include $(patsubst %.cpp,%.P,$(patsubst %.c,%.P,$(patsubst %.h,%.P,$(SRCS))))

ifneq (,)
TestEGLNativeTypeWayland.cpp : xbmc_wayland_test_client_protocol.h

$(WAYLAND_TEST_MODULE_SRCS) : $(WAYLAND_TEST_MODULE_PROTOCOL_GENERATED_SRCS)

xbmc_wayland_test_protocol.c: $(WAYLAND_TEST_MODULE_PROTOCOL)
	 code < $< > $@

xbmc_wayland_test_server_protocol.h: $(WAYLAND_TEST_MODULE_PROTOCOL)
	 server-header < $< > $@

xbmc_wayland_test_client_protocol.h: $(WAYLAND_TEST_MODULE_PROTOCOL)
	 client-header < $< > $@

ifeq (,1)
xbmc-wayland-test-extension.so: $(WAYLAND_TEST_MODULE_PROTOCOL_SRCS:.c=.o) $(WAYLAND_TEST_MODULE_SRCS:.cpp=.o)
	$(SILENT_LD) $(CXX) $(CXXFLAGS) $(LDFLAGS) $(WAYLAND_TEST_LIBS) -shared -o $@ $+ -rdynamic
endif

endif
endif
