-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile.gnutools
38 lines (30 loc) · 1.03 KB
/
Makefile.gnutools
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# GNU Tools
GNU_TOOLS=$(SOURCES_DIR)/gnu-tools-archive/$(GNU_TOOLS_DIR)
GNU_TOOLS_UTILS=$(GNU_TOOLS)/arm-xilinx-linux-gnueabi/
GNU_TOOLS_BIN=$(GNU_TOOLS)/bin
GNU_TOOLS_HOST=arm-xilinx-linux-gnueabi
GNU_TOOLS_PREFIX=$(GNU_TOOLS_BIN)/arm-xilinx-linux-gnueabi-
GNU_TOOLS_LIBC=$(GNU_TOOLS_UTILS)/libc
export CROSS_COMPILE := $(GNU_TOOLS_PREFIX)
export PATH := ${PATH}:$(GNU_TOOLS_BIN):$(SOURCES_DIR)/uboot-git/tools/
gnu-tools-tar-url=$(GNU_TOOLS_FTP)
TAR_PROJECTS += gnu-tools
gnu-tools:
@echo "Getting GNU Tools"
gnu-tools-clean: gnu-tools-archive-clean
.SECONDARY:
$(REPO): $(TOOLS_DIR)/python | $(TOOLS_DIR)
wget $(REPO_URL) -O $(REPO)
chmod a+x $(REPO)
PYTHON_V2=$(shell python2 --version 2>&1)
PYTHON_V=$(shell python --version 2>&1)
PYTHON =
.SECONDARY:
$(TOOLS_DIR)/python: | $(TOOLS_DIR)
if [ -n "$(PYTHON)" ]; then ln $(PYTHON) $@; fi
(! [ -f $@ ]) && \
case "$(PYTHON_V)" in "Python 2.7."*) \
ln -s $(shell which python) $@;; esac;
(! [ -f $@ ]) && \
case "$(PYTHON_V2)" in "Python 2.7."*) \
ln -s $(shell which python2) $@;; esac;