TerminalImageViewer/src/Makefile

32 lines
639 B
Makefile
Raw Normal View History

2019-10-19 00:14:10 +02:00
PROGNAME = tiv
2018-08-03 14:17:53 +02:00
2019-10-19 00:14:10 +02:00
OBJECTS = tiv.o
2019-03-23 13:18:48 +01:00
2019-10-19 00:14:10 +02:00
CXX ?= g++
CXXFLAGS ?= -O2 -fpermissive
INSTALL ?= install
INSTALL_PROGRAM ?= $(INSTALL) -D
2017-07-11 21:25:08 +02:00
2019-10-19 00:14:10 +02:00
# https://www.gnu.org/prep/standards/html_node/Directory-Variables.html#Directory-Variables
prefix ?= /usr/local
exec_prefix ?= $(prefix)
bindir ?= $(exec_prefix)/bin
2017-07-11 21:25:08 +02:00
2023-09-30 03:06:50 +02:00
override CXXFLAGS += -std=c++20 -Wall -fexceptions
2019-10-19 00:14:10 +02:00
override LDFLAGS += -pthread
all: $(PROGNAME)
tiv.o: CImg.h
$(PROGNAME): $(OBJECTS)
2021-05-21 02:09:10 +02:00
$(CXX) $(LDFLAGS) $^ -o $@ $(LOADLIBES) $(LDLIBS)
2017-07-11 21:25:08 +02:00
2019-03-23 13:18:48 +01:00
install: all
2019-10-19 00:14:10 +02:00
$(INSTALL_PROGRAM) $(PROGNAME) $(DESTDIR)$(bindir)/$(PROGNAME)
2017-07-11 21:25:08 +02:00
clean:
2019-10-19 00:14:10 +02:00
$(RM) -f $(PROGNAME) *.o
.PHONY: all install clean