mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2024-11-10 04:27:25 +01:00
Update handling of LIKWID headers. Download only if not already present in the system. Fixes #73
This commit is contained in:
parent
8abedac0fe
commit
8068e59818
@ -1,22 +1,28 @@
|
|||||||
|
|
||||||
all: likwid
|
|
||||||
|
|
||||||
|
|
||||||
# LIKWID version
|
# LIKWID version
|
||||||
LIKWID_VERSION = 5.2.1
|
LIKWID_VERSION = 5.2.1
|
||||||
|
LIKWID_INSTALLED_FOLDER=$(shell dirname $(shell which likwid-topology 2>/dev/null))
|
||||||
|
|
||||||
|
LIKWID_FOLDER="$(shell pwd)/likwid"
|
||||||
|
|
||||||
|
all: $(LIKWID_FOLDER)/likwid.h
|
||||||
|
|
||||||
.ONESHELL:
|
.ONESHELL:
|
||||||
.PHONY: likwid
|
.PHONY: $(LIKWID_FOLDER)/likwid.h
|
||||||
likwid:
|
$(LIKWID_FOLDER)/likwid.h:
|
||||||
INSTALL_FOLDER="$${PWD}/likwid"
|
if [ "$(LIKWID_INSTALLED_FOLDER)" != "" ]; then \
|
||||||
BUILD_FOLDER="$${PWD}/likwidbuild"
|
BASE="$(LIKWID_INSTALLED_FOLDER)/../include"; \
|
||||||
if [ -d $${INSTALL_FOLDER} ]; then rm -r $${INSTALL_FOLDER}; fi
|
mkdir -p $(LIKWID_FOLDER); \
|
||||||
mkdir --parents --verbose $${INSTALL_FOLDER} $${BUILD_FOLDER}
|
cp $$BASE/*.h $(LIKWID_FOLDER); \
|
||||||
wget -P "$${BUILD_FOLDER}" ftp://ftp.rrze.uni-erlangen.de/mirrors/likwid/likwid-$(LIKWID_VERSION).tar.gz
|
else \
|
||||||
tar -C $${BUILD_FOLDER} -xf $${BUILD_FOLDER}/likwid-$(LIKWID_VERSION).tar.gz
|
BUILD_FOLDER="$${PWD}/likwidbuild"; \
|
||||||
install -Dpm 0644 $${BUILD_FOLDER}/likwid-$(LIKWID_VERSION)/src/includes/likwid*.h $${INSTALL_FOLDER}/
|
if [ -d $(LIKWID_FOLDER) ]; then rm -r $(LIKWID_FOLDER); fi; \
|
||||||
install -Dpm 0644 $${BUILD_FOLDER}/likwid-$(LIKWID_VERSION)/src/includes/bstrlib.h $${INSTALL_FOLDER}/
|
mkdir --parents --verbose $(LIKWID_FOLDER) $${BUILD_FOLDER}; \
|
||||||
rm -r $${BUILD_FOLDER}
|
wget -P "$${BUILD_FOLDER}" ftp://ftp.rrze.uni-erlangen.de/mirrors/likwid/likwid-$(LIKWID_VERSION).tar.gz; \
|
||||||
|
tar -C $${BUILD_FOLDER} -xf $${BUILD_FOLDER}/likwid-$(LIKWID_VERSION).tar.gz; \
|
||||||
|
install -Dpm 0644 $${BUILD_FOLDER}/likwid-$(LIKWID_VERSION)/src/includes/likwid*.h $(LIKWID_FOLDER)/; \
|
||||||
|
install -Dpm 0644 $${BUILD_FOLDER}/likwid-$(LIKWID_VERSION)/src/includes/bstrlib.h $(LIKWID_FOLDER)/; \
|
||||||
|
rm -r $${BUILD_FOLDER}; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
Loading…
Reference in New Issue
Block a user