btop/Makefile

28 lines
697 B
Makefile
Raw Normal View History

2021-05-06 20:32:03 +02:00
PREFIX ?= /usr/local
DOCDIR ?= $(PREFIX)/share/btop/doc
2021-05-26 16:23:29 +02:00
CPP = g++
CPPFLAGS = -std=c++20 -pthread
OPTFLAG = -O3
INFOFLAGS += -Wall -Wextra -Wno-stringop-overread -pedantic
2021-05-27 22:29:36 +02:00
INCLUDES = -I./src -I./include
2021-05-06 20:32:03 +02:00
btop: btop.cpp
2021-05-08 14:56:48 +02:00
@mkdir -p bin
2021-05-26 16:23:29 +02:00
$(CPP) $(CPPFLAGS) $(INCLUDES) $(OPTFLAG) $(INFOFLAGS) -o bin/btop btop.cpp
2021-05-06 20:32:03 +02:00
install:
@mkdir -p $(DESTDIR)$(PREFIX)/bin
2021-05-08 14:56:48 +02:00
@cp -p bin/btop $(DESTDIR)$(PREFIX)/bin/btop
2021-05-06 20:32:03 +02:00
@mkdir -p $(DESTDIR)$(DOCDIR)
@cp -p README.md $(DESTDIR)$(DOCDIR)
@cp -pr themes $(DESTDIR)$(PREFIX)/share/btop
@chmod 755 $(DESTDIR)$(PREFIX)/bin/btop
uninstall:
@rm -rf $(DESTDIR)$(PREFIX)/bin/btop
@rm -rf $(DESTDIR)$(DOCDIR)
@rm -rf $(DESTDIR)$(PREFIX)/share/btop
2021-05-08 14:56:48 +02:00
clean:
rm -rf bin