btop/Makefile

28 lines
703 B
Makefile
Raw Normal View History

2021-05-07 06:32:03 +12:00
PREFIX ?= /usr/local
DOCDIR ?= $(PREFIX)/share/btop/doc
2021-05-27 02:23:29 +12:00
CPP = g++
2021-05-30 12:15:09 +12:00
override CPPFLAGS += -std=c++20 -pthread
2021-05-27 02:23:29 +12:00
OPTFLAG = -O3
INFOFLAGS += -Wall -Wextra -Wno-stringop-overread -pedantic
2021-06-10 05:47:49 +12:00
INCLUDES = -Isrc -Iinclude
2021-05-07 06:32:03 +12:00
btop: btop.cpp
2021-05-09 00:56:48 +12:00
@mkdir -p bin
2021-05-27 02:23:29 +12:00
$(CPP) $(CPPFLAGS) $(INCLUDES) $(OPTFLAG) $(INFOFLAGS) -o bin/btop btop.cpp
2021-05-07 06:32:03 +12:00
install:
@mkdir -p $(DESTDIR)$(PREFIX)/bin
2021-05-09 00:56:48 +12:00
@cp -p bin/btop $(DESTDIR)$(PREFIX)/bin/btop
2021-05-07 06:32:03 +12: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-09 00:56:48 +12:00
clean:
rm -rf bin