DOXY_XML_PATH=$(GENDIR)/doxygenxml
endif
-GENERATED_JSON = $(INTERFACES_DIR)/json-rpc/ServiceDescription.h
+GENERATED_JSON = $(INTERFACES_DIR)/json-rpc/ServiceDescription.h addons/xbmc.json/addon.xml
ifeq ($(wildcard $(JSON_BUILDER)),)
JSON_BUILDER = $(shell which JsonSchemaBuilder)
ifeq ($(JSON_BUILDER),)
mkdir -p $(GENDIR)
$(SWIG) -w401 -c++ -o $@ -xml -I$(TOPDIR)/xbmc -xmllang python $<
-codegenerated: $(DOXYGEN) $(SWIG) $(JAVA) $(GENERATED) $(GENERATED_JSON)
+codegenerated: $(DOXYGEN) $(SWIG) $(JAVA) $(GENERATED) $(GENERATED_JSON) $(GENERATED_ADDON_JSON)
$(DOXY_XML_PATH): $(SWIG) $(JAVA)
cd $(INTERFACES_DIR)/python; ($(DOXYGEN) Doxyfile > /dev/null) 2>&1 | grep -v " warning: "
LIB=json-rpc.a
GENERATED_JSON = ServiceDescription.h
-JSON_SRC = schema/version.txt schema/license.txt schema/methods.json schema/types.json schema/notifications.json
+GENERATED_ADDON_JSON = ../../../addons/xbmc.json/addon.xml
+JSON_VERSION_SRC = schema/version.txt
+JSON_SRC = $(JSON_VERSION_SRC) schema/license.txt schema/methods.json schema/types.json schema/notifications.json
-all: $(GENERATED_JSON) $(LIB)
+all: $(GENERATED_JSON) $(GENERATED_ADDON_JSON) $(LIB)
-include ../../../Makefile.include
ifeq ($(wildcard $(JSON_BUILDER)),)
$(GENERATED_JSON): $(JSON_SRC)
$(JSON_BUILDER) $(JSON_SRC)
+.PHONY: $(notdir $(GENERATED_ADDON_JSON))
+$(notdir $(GENERATED_ADDON_JSON)): $(GENERATED_ADDON_JSON)
+
+$(GENERATED_ADDON_JSON): $(JSON_VERSION_SRC)
+ sed s/@jsonrpc_version@/`cat $(JSON_VERSION_SRC)`/g $@.in > $@
+
-include $(patsubst %.cpp,%.P,$(patsubst %.c,%.P,$(SRCS)))