|
|
|
GDAL_AVAILABLE := $(shell which gdalinfo)
|
|
|
|
SWIG_AVAILABLE := $(shell which swig)
|
|
|
|
XMLSEC_AVAILABLE := $(shell which xmlsec1)
|
|
|
|
|
|
|
|
ifeq ($(OS),Windows_NT)
|
|
|
|
CCFLAGS += WIN32
|
|
|
|
else
|
|
|
|
UNAME_S := $(shell uname -s)
|
|
|
|
ifeq ($(UNAME_S),Linux)
|
|
|
|
CCFLAGS += LINUX
|
|
|
|
endif
|
|
|
|
ifeq ($(UNAME_S),Darwin)
|
|
|
|
CCFLAGS += OSX
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
.PHONY: gdal xmlsec
|
|
|
|
|
|
|
|
check_libs: gdal xmlsec
|
|
|
|
|
|
|
|
gdal:
|
|
|
|
ifeq ($(GDAL_AVAILABLE),)
|
|
|
|
@echo "${RED}--------------------------------------------------------------------------------------------${NC}"
|
|
|
|
@echo "---> ${RED}GDAL not found. Please use the command below to install it. ${NC}\n"
|
|
|
|
ifeq ($(CCFLAGS),OSX)
|
|
|
|
@echo "\t${RED}brew install gdal --HEAD${NC}"
|
|
|
|
endif
|
|
|
|
ifeq ($(CCFLAGS),LINUX)
|
|
|
|
@echo "\t${RED}sudo add-apt-repository ppa:ubuntugis/ppa; sudo apt-get update; sudo apt-get install gdal-bin && sudo apt-get -y install python-gdal${NC}"
|
|
|
|
endif
|
|
|
|
@echo ""
|
|
|
|
@echo "${RED}--------------------------------------------------------------------------------------------${NC}"
|
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
@echo "Found GDAL version: $(shell gdalinfo --version), Skipping"
|
|
|
|
endif
|
|
|
|
|
|
|
|
xmlsec:
|
|
|
|
ifeq ($(CCFLAGS),OSX)
|
|
|
|
ifeq ($(shell brew ls --versions libxmlsec1),)
|
|
|
|
@echo "${RED}--------------------------------------------------------------------------------------------${NC}"
|
|
|
|
@echo "---> ${RED}XMLSEC not found. Please use the command below to install it. ${NC}\n"
|
|
|
|
@echo "\t${RED}brew install libxmlsec1${NC}"
|
|
|
|
@echo ""
|
|
|
|
@echo "${RED}--------------------------------------------------------------------------------------------${NC}"
|
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
@echo "Found xmlsec. Skipping"
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
ifeq ($(CCFLAGS),LINUX)
|
|
|
|
ifeq ($(XMLSEC_AVAILABLE),)
|
|
|
|
@echo "${RED}--------------------------------------------------------------------------------------------${NC}"
|
|
|
|
@echo "---> ${RED}XMLSEC not found. Please use the command below to install it. ${NC}\n"
|
|
|
|
@echo "\t${RED}apt-get install xmlsec1${NC}"
|
|
|
|
@echo ""
|
|
|
|
@echo "${RED}--------------------------------------------------------------------------------------------${NC}"
|
|
|
|
exit 1
|
|
|
|
endif
|
|
|
|
ifeq ($(SWIG_AVAILABLE),)
|
|
|
|
@echo "${RED}--------------------------------------------------------------------------------------------${NC}"
|
|
|
|
@echo "---> ${RED}SWIG not found. Please use the command below to install it. ${NC}\n"
|
|
|
|
@echo "\t${RED}apt-get install swig${NC}"
|
|
|
|
@echo ""
|
|
|
|
@echo "${RED}--------------------------------------------------------------------------------------------${NC}"
|
|
|
|
exit 1
|
|
|
|
endif
|
|
|
|
ifeq ($(shell dpkg-query --list | grep libxmlsec1-openssl),)
|
|
|
|
@echo "${RED}--------------------------------------------------------------------------------------------${NC}"
|
|
|
|
@echo "---> ${RED}libxmlsec1-openssl not found. Please use the command below to install it. ${NC}\n"
|
|
|
|
@echo "\t${RED}apt-get install libxmlsec1-openssl${NC}"
|
|
|
|
@echo ""
|
|
|
|
@echo "${RED}--------------------------------------------------------------------------------------------${NC}"
|
|
|
|
exit 1
|
|
|
|
endif
|
|
|
|
ifeq ($(shell dpkg-query --list | grep libxmlsec1-dev),)
|
|
|
|
@echo "${RED}--------------------------------------------------------------------------------------------${NC}"
|
|
|
|
@echo "---> ${RED}libxmlsec1-openssl not found. Please use the command below to install it. ${NC}\n"
|
|
|
|
@echo "\t${RED}apt-get install libxmlsec1-dev${NC}"
|
|
|
|
@echo ""
|
|
|
|
@echo "${RED}--------------------------------------------------------------------------------------------${NC}"
|
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
@echo "Found xmlsec. Skipping"
|
|
|
|
endif
|
|
|
|
endif |
|
|
|
\ No newline at end of file |