Last active
February 29, 2016 16:43
-
-
Save un1versal/8350279 to your computer and use it in GitHub Desktop.
libnfs 1.10.0 makefile for kodi
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A quick and dirty Makefile to download/build and install | |
# | |
# Usage: | |
# make | |
# sudo make install | |
# lib name, version | |
LIBNAME=libnfs | |
VERSION=1.10.0 | |
SOURCE=$(LIBNAME)-$(VERSION) | |
# download location and format | |
BASE_URL=https://sites.google.com/site/libnfstarballs/li | |
ARCHIVE=$(SOURCE).tar.gz | |
TARBALLS_LOCATION=. | |
RETRIEVE_TOOL=/usr/bin/curl | |
RETRIEVE_TOOL_FLAGS=-Ls --create-dirs --output $(TARBALLS_LOCATION)/$(ARCHIVE) | |
ARCHIVE_TOOL=tar | |
ARCHIVE_TOOL_FLAGS=-xf | |
PREFIX ?= /usr | |
LIBNFS_CONFIGOPTS ?= --prefix=$(PREFIX) | |
# configuration settings | |
CONFIGURE=./configure $(LIBNFS_CONFIGOPTS) | |
SO_NAME=$(SOURCE)/lib/libnfs.so | |
CLEAN_FILES=$(ARCHIVE) $(SOURCE) | |
all: $(SO_NAME) | |
$(TARBALLS_LOCATION)/$(ARCHIVE): | |
$(RETRIEVE_TOOL) $(RETRIEVE_TOOL_FLAGS) $(BASE_URL)/$(ARCHIVE) | |
$(SOURCE): $(TARBALLS_LOCATION)/$(ARCHIVE) | |
rm -rf $(SOURCE) | |
$(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) | |
echo $(SOURCE) > .gitignore | |
cd $(SOURCE);./bootstrap;$(CONFIGURE) | |
$(SO_NAME): $(SOURCE) | |
make -C $(SOURCE) | |
install: | |
make -C $(SOURCE) install | |
clean: | |
make -C $(SOURCE) clean | |
rm -f .installed | |
rm -f -r include | |
rm -f -r lib | |
rm -f *.tar.gz | |
rm -r -f nfsc | |
distclean:: | |
rm -rf $(SOURCE) .installed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment