diff options
author | wsnipex <wsnipex@a1.net> | 2015-09-08 16:35:29 +0200 |
---|---|---|
committer | fritsch <Peter.Fruehberger@gmail.com> | 2015-09-08 22:00:05 +0200 |
commit | 2639bfad31f48881c9e9ae349af1c2b6845f241c (patch) | |
tree | c36dfce3a4eac829746fe379f9c53afc5b2f3282 /tools | |
parent | 528d4566abf5d2ecf4592f07dd318e8d9f1e903c (diff) |
[depends] fix dcadec makefile to allow manual install
Diffstat (limited to 'tools')
-rw-r--r-- | tools/depends/target/libdcadec/Makefile | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/tools/depends/target/libdcadec/Makefile b/tools/depends/target/libdcadec/Makefile index 7ccf3ed6e4..6446781944 100644 --- a/tools/depends/target/libdcadec/Makefile +++ b/tools/depends/target/libdcadec/Makefile @@ -1,5 +1,5 @@ -include ../../Makefile.include -DEPS= ../../Makefile.include Makefile libdcadec_android.patch +DEPS= Makefile # lib name, version LIBNAME=libdcadec @@ -7,6 +7,22 @@ VERSION=git-2a9186e3 SOURCE=$(LIBNAME)-$(VERSION) ARCHIVE=$(SOURCE).tar.gz +ifeq ($(CROSS_COMPILING), yes) + DEPS += ../../Makefile.include libdcadec_android.patch + EXTRA_FLAGS = CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" AR="$(AR)" +else + ROOT_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) + + ifeq ($(PLATFORM),) + PLATFORM = native + TARBALLS_LOCATION = $(ROOT_DIR) + BASE_URL := http://mirrors.kodi.tv/build-deps/sources + RETRIEVE_TOOL := curl -Ls --create-dirs -f -O + ARCHIVE_TOOL := tar --strip-components=1 -xf + endif +endif + + # configuration settings LIBDYLIB=$(PLATFORM)/.libs/$(LIBNAME).a @@ -19,6 +35,12 @@ $(TARBALLS_LOCATION)/$(ARCHIVE): cd $(TARBALLS_LOCATION); $(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS) +ifeq ($(PREFIX),) + @echo + @echo "ERROR: please set PREFIX to the kodi install path e.g. make PREFIX=/usr/local" + @exit 1 +endif + rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM) cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) ifeq ($(OS),android) @@ -26,10 +48,10 @@ ifeq ($(OS),android) endif $(LIBDYLIB): $(PLATFORM) - $(MAKE) -C $(PLATFORM) PREFIX=$(PREFIX) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" AR="$(AR)" + $(MAKE) -C $(PLATFORM) PREFIX=$(PREFIX) $(EXTRA_FLAGS) .installed-$(PLATFORM): $(LIBDYLIB) - $(MAKE) -C $(PLATFORM) PREFIX=$(PREFIX) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" AR="$(AR)" install + $(MAKE) -C $(PLATFORM) PREFIX=$(PREFIX) $(EXTRA_FLAGS) install touch $@ clean: @@ -37,4 +59,4 @@ clean: rm -f .installed-$(PLATFORM) distclean:: - rm -rf $(PLATFORM) .installed-$(PLATFORM) + rm -rf $(PLATFORM) .installed-$(PLATFORM) libdcadec-*.tar.gz |