aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--codegenerator.mk10
-rw-r--r--tools/depends/native/JsonSchemaBuilder/Makefile36
-rw-r--r--tools/depends/native/JsonSchemaBuilder/src/Makefile15
-rw-r--r--tools/depends/native/JsonSchemaBuilder/src/Makefile.am3
-rwxr-xr-xtools/depends/native/JsonSchemaBuilder/src/autogen.sh3
-rw-r--r--tools/depends/native/JsonSchemaBuilder/src/configure.ac10
-rw-r--r--tools/depends/target/xbmc/Makefile2
-rw-r--r--xbmc/interfaces/json-rpc/Makefile2
8 files changed, 52 insertions, 29 deletions
diff --git a/codegenerator.mk b/codegenerator.mk
index d9d3c9aa0b..5ecb0c0273 100644
--- a/codegenerator.mk
+++ b/codegenerator.mk
@@ -22,7 +22,7 @@ GENERATED_JSON = $(INTERFACES_DIR)/json-rpc/ServiceDescription.h addons/xbmc.jso
ifeq ($(wildcard $(JSON_BUILDER)),)
JSON_BUILDER = $(shell which JsonSchemaBuilder)
ifeq ($(JSON_BUILDER),)
- JSON_BUILDER = tools/depends/native/JsonSchemaBuilder/JsonSchemaBuilder
+ JSON_BUILDER = tools/depends/native/JsonSchemaBuilder/bin/JsonSchemaBuilder
endif
endif
@@ -75,7 +75,11 @@ $(GENERATED_JSON): $(JSON_BUILDER)
@echo Jsonbuilder: $(JSON_BUILDER)
make -C $(INTERFACES_DIR)/json-rpc $(notdir $@)
-ifneq ($(CROSS_COMPILING), yes)
$(JSON_BUILDER):
- make -C $(dir $@)
+ifeq ($(BOOTSTRAP_FROM_DEPENDS), yes)
+ @echo JsonSchemaBuilder not found. You didn\'t build depends. Check docs/README.\<yourplatform\>
+ @false
+else
+#build json builder - ".." because makefile is in the parent dir of "bin"
+ make -C $(abspath $(dir $@)..)
endif
diff --git a/tools/depends/native/JsonSchemaBuilder/Makefile b/tools/depends/native/JsonSchemaBuilder/Makefile
index e2fccf7917..cf5d20b055 100644
--- a/tools/depends/native/JsonSchemaBuilder/Makefile
+++ b/tools/depends/native/JsonSchemaBuilder/Makefile
@@ -1,9 +1,10 @@
+ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
-include ../../Makefile.include
ifeq ($(NATIVEPREFIX),)
- PREFIX = .
+ PREFIX = $(ROOT_DIR)
else
- PREFIX = $(NATIVEPREFIX)/bin
+ PREFIX = $(NATIVEPREFIX)
endif
ifeq ($(NATIVEPLATFORM),)
@@ -12,15 +13,32 @@ else
PLATFORM = $(NATIVEPLATFORM)
endif
+SOURCE=$(ROOT_DIR)/src
+
+CONFIGURE=./configure --prefix=$(PREFIX)
+APP=$(SOURCE)/JsonSchemaBuilder
+APPBIN=$(PREFIX)/bin/JsonSchemaBuilder
+
all: .installed-$(PLATFORM)
-$(PREFIX)/JsonSchemaBuilder:
- make -C src
- cp src/JsonSchemaBuilder $(PREFIX)
+$(PLATFORM):
+ -rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM)
+ cd $(PLATFORM); cp -a $(SOURCE)/* .
+ cd $(PLATFORM); ./autogen.sh
+ cd $(PLATFORM); $(CONFIGURE)
-clean:
- make -C src clean
- @rm -f JsonSchemaBuilder .installed-$(PLATFORM)
-.installed-$(PLATFORM): $(PREFIX)/JsonSchemaBuilder
+$(APP): $(PLATFORM)
+ $(MAKE) -C $(PLATFORM)
+
+
+.installed-$(PLATFORM): $(APP)
+ $(MAKE) -C $(PLATFORM) install
touch $@
+
+clean:
+ $(MAKE) -C $(PLATFORM) clean
+
+distclean::
+ rm -rf $(PLATFORM) .installed-$(PLATFORM)
+ -rm -rf bin
diff --git a/tools/depends/native/JsonSchemaBuilder/src/Makefile b/tools/depends/native/JsonSchemaBuilder/src/Makefile
deleted file mode 100644
index 3edd663181..0000000000
--- a/tools/depends/native/JsonSchemaBuilder/src/Makefile
+++ /dev/null
@@ -1,15 +0,0 @@
-APP=JsonSchemaBuilder
-
-SOURCES := $(shell ls *.cpp)
-
-OBJS := $(SOURCES:.cpp=.o)
-all: $(APP)
-
-$(APP): $(OBJS)
- $(CXX) $(CFLAGS) -o $(APP) $(OBJS) $(LFLAGS) $(LIBS)
-
-.cpp.o:
- $(CXX) $(CFLAGS) $(INCLUDES) -c $<
-
-clean:
- rm -f $(OBJS) $(SOURCES:.cpp=.d) $(APP)
diff --git a/tools/depends/native/JsonSchemaBuilder/src/Makefile.am b/tools/depends/native/JsonSchemaBuilder/src/Makefile.am
new file mode 100644
index 0000000000..1d5e071bca
--- /dev/null
+++ b/tools/depends/native/JsonSchemaBuilder/src/Makefile.am
@@ -0,0 +1,3 @@
+bin_PROGRAMS = JsonSchemaBuilder
+JsonSchemaBuilder_SOURCES = JsonSchemaBuilder.cpp
+
diff --git a/tools/depends/native/JsonSchemaBuilder/src/autogen.sh b/tools/depends/native/JsonSchemaBuilder/src/autogen.sh
new file mode 100755
index 0000000000..872167c61f
--- /dev/null
+++ b/tools/depends/native/JsonSchemaBuilder/src/autogen.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+autoreconf -vif
diff --git a/tools/depends/native/JsonSchemaBuilder/src/configure.ac b/tools/depends/native/JsonSchemaBuilder/src/configure.ac
new file mode 100644
index 0000000000..54ebee20f4
--- /dev/null
+++ b/tools/depends/native/JsonSchemaBuilder/src/configure.ac
@@ -0,0 +1,10 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_INIT(JsonSchemaBuilder, 1.0, me@mail.com)
+AC_CONFIG_AUX_DIR(config)
+AC_CONFIG_SRCDIR(JsonSchemaBuilder.cpp)
+
+AM_INIT_AUTOMAKE([foreign])
+
+AC_PROG_CXX
+
+AC_OUTPUT(Makefile)
diff --git a/tools/depends/target/xbmc/Makefile b/tools/depends/target/xbmc/Makefile
index bfaa534995..fb65398013 100644
--- a/tools/depends/target/xbmc/Makefile
+++ b/tools/depends/target/xbmc/Makefile
@@ -19,7 +19,7 @@ all: $(SOURCE)/libxbmc.so
$(SOURCE)/libxbmc.so:
- cd $(SOURCE); ./bootstrap
+ cd $(SOURCE); BOOTSTRAP_FROM_DEPENDS=yes ./bootstrap
cd $(SOURCE); $(CONFIGURE)
../../Makefile.include:
diff --git a/xbmc/interfaces/json-rpc/Makefile b/xbmc/interfaces/json-rpc/Makefile
index 1c7fecfeb0..70746d7eaa 100644
--- a/xbmc/interfaces/json-rpc/Makefile
+++ b/xbmc/interfaces/json-rpc/Makefile
@@ -31,7 +31,7 @@ all: $(GENERATED_JSON) $(GENERATED_ADDON_JSON) $(LIB)
ifeq ($(wildcard $(JSON_BUILDER)),)
JSON_BUILDER = $(shell which JsonSchemaBuilder)
ifeq ($(JSON_BUILDER),)
- JSON_BUILDER = ../../../tools/depends/native/JsonSchemaBuilder/JsonSchemaBuilder
+ JSON_BUILDER = ../../../tools/depends/native/JsonSchemaBuilder/bin/JsonSchemaBuilder
endif
endif