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
|
SRC = src/starfetch.cpp
#CC = g++
CFLAGS = -Wall -Wextra -O2 -ggdb -std=c++17 -pipe -pedantic -Wundef -Wshadow \
-W -Wwrite-strings -Wcast-align -Wstrict-overflow=5 -Wconversion -Wpointer-arith \
-Wformat=2 -Wsign-compare -Wendif-labels -Wredundant-decls -Winit-self -g \
-fstack-protector-strong -fstack-clash-protection -Werror=format-security \
-D_FORTIFY_SOURCE=2 -Wl,-z,relro,-z,now
ifneq (,$(filter $(DEB_TARGET_ARCH), i386 amd64))
CFLAGS += -fcf-protection
endif
ifeq ($(DEB_TARGET_ARCH), arm64)
CFLAGS += -mbranch-protection=standard
endif
INSTALL_DIR = ${DESTDIR}/usr/share
BIN_DIR = ${DESTDIR}/usr/bin
all: starfetch
starfetch:
${CXX} ${CFLAGS} ${LDFLAGS} ${SRC} -o starfetch
install:
mkdir -p ${INSTALL_DIR}/starfetch
cp -rf ./res/* ${INSTALL_DIR}/starfetch/
install -D -m 711 starfetch ${BIN_DIR}/starfetch
uninstall:
rm -rf ${INSTALL_DIR}/starfetch
unlink ${BIN_DIR}/starfetch
clean:
rm -rf starfetch
.PHONY: all starfetch install uninstall clean
|