rss-cli/Makefile

43 lines
724 B
Makefile
Raw Permalink Normal View History

2021-07-23 23:18:13 +00:00
###############################################################################
# Tyler Perkins
# 7-21-21
# Makefile
#
CC = g++
FLAGS = -pipe
CFLAGS = -Wall
CFLAGS += -Ofast
#CFLAGS += -g
LIBRARIES = -lcurl
SRC = $(shell find . -name '*.cpp')
OBJ = $(subst .cpp,.o,$(SRC))
BIN = ./bin
2021-07-26 02:54:20 +00:00
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man
TARGET = rss-cli
2021-07-23 23:18:13 +00:00
all : $(OBJ)
2021-07-26 02:54:20 +00:00
$(CC) $(FLAGS) $(CFLAGS) -o $(BIN)/$(TARGET) $(OBJ) $(LIBRARIES)
2021-07-23 23:18:13 +00:00
.cpp.o :
$(CC) $(FLAGS) $(CFLAGS) $(LIBRARIES) -c $< -o $@
2021-07-25 23:22:38 +00:00
install : all
2021-07-26 02:54:20 +00:00
mkdir -p $(PREFIX)/bin
cp -f $(BIN)/$(TARGET) $(PREFIX)/bin
chmod 755 $(PREFIX)/bin/$(TARGET)
2021-07-25 23:22:38 +00:00
2021-07-26 02:54:20 +00:00
uninstall :
rm -rf $(PREFIX)/bin/$(TARGET)
2021-07-25 23:22:38 +00:00
2021-07-23 23:18:13 +00:00
clean :
find . -type f -name '*.o' -delete
rm -rf $(TARGET)