Watch 1 Star 0 Fork 45

BOBO / A-TuneGoMulanPSL-1.0

forked from openEuler / A-Tune 
Join us
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
A-Tune is an OS tuning software based on AI. spread retract

Clone or download
Makefile 2.21 KB
Copy Edit Web IDE Raw Blame History
VERSION = 0.1
.PHONY: all clean modules
PKGPATH=pkg
CURDIR=$(shell pwd)
PREFIX ?= /usr
LIBEXEC ?= libexec
BINDIR = $(DESTDIR)$(PREFIX)/bin
SYSTEMDDIR = $(DESTDIR)$(PREFIX)/lib/systemd/system
SRCVERSION = $(shell git rev-parse --short HEAD 2>/dev/null)
ATUNEVERSION = $(VERSION)$(if $(SRCVERSION),($(SRCVERSION)))
GOLDFLAGS += -X atune/common/config.Version=$(ATUNEVERSION)
GOFLAGS = -ldflags "$(GOLDFLAGS)"
all: modules atune-adm atuned db
atune-adm:
export GOPATH=`cd ../../;pwd` && go build -v $(GOFLAGS) -o $(PKGPATH)/atune-adm cmd/atune-adm/*.go
atuned:
export GOPATH=`cd ../../;pwd` && go build -v $(GOFLAGS) -o $(PKGPATH)/atuned cmd/atuned/*.go
modules:
export GOPATH=`cd ../../;pwd` && cd ${CURDIR}/modules/server/profile/ && go build -buildmode=plugin -o ${CURDIR}/pkg/daemon_profile_server.so *.go
clean:
rm -rf $(PKGPATH)/*
db:
sqlite3 database/atuned.db ".read database/init.sql"
install:
@echo "BEGIN INSTALL A-Tune"
mkdir -p $(BINDIR)
mkdir -p $(SYSTEMDDIR)
mkdir -p $(DESTDIR)/etc/atuned/tuning
mkdir -p $(DESTDIR)$(PREFIX)/lib/atuned/modules
mkdir -p $(DESTDIR)$(PREFIX)/share/atuned
mkdir -p $(DESTDIR)$(PREFIX)/$(LIBEXEC)/atuned/scripts
mkdir -p $(DESTDIR)$(PREFIX)/$(LIBEXEC)/atuned/analysis
mkdir -p $(DESTDIR)$(PREFIX)/$(LIBEXEC)/atuned/collector
mkdir -p $(DESTDIR)/var/lib/atuned
mkdir -p $(DESTDIR)/var/run/atuned
mkdir -p $(DESTDIR)$(PREFIX)/share/bash-completion/completions
install -m 640 pkg/daemon_profile_server.so $(DESTDIR)$(PREFIX)/lib/atuned/modules
install -m 750 pkg/atune-adm $(BINDIR)
install -m 750 pkg/atuned $(BINDIR)
install -m 640 misc/atuned.service $(SYSTEMDDIR)
install -m 640 misc/atuned.cnf $(DESTDIR)/etc/atuned/
install -m 640 database/atuned.db $(DESTDIR)/var/lib/atuned/
install -m 640 misc/atune-adm $(DESTDIR)$(PREFIX)/share/bash-completion/completions/
\cp -rf scripts/* $(DESTDIR)$(PREFIX)/$(LIBEXEC)/atuned/scripts/
chmod -R 750 $(DESTDIR)$(PREFIX)/$(LIBEXEC)/atuned/scripts/
\cp -rf analysis/* $(DESTDIR)$(PREFIX)/$(LIBEXEC)/atuned/analysis/
chmod -R 750 $(DESTDIR)$(PREFIX)/$(LIBEXEC)/atuned/analysis/
\cp -rf collection/* $(DESTDIR)$(PREFIX)/$(LIBEXEC)/atuned/collector/
chmod -R 750 $(DESTDIR)$(PREFIX)/$(LIBEXEC)/atuned/collector/
@echo "END INSTALL A-Tune"

Comment ( 0 )

Sign in for post a comment

Go
1
https://gitee.com/AngelBiuBiu/A-Tune.git
git@gitee.com:AngelBiuBiu/A-Tune.git
AngelBiuBiu
A-Tune
A-Tune
master

Help Search

220309 7019f5b6 1899542 220318 4015cbb9 1899542