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
|
|
|
|
2019-10-19 00:14:10 +02:00
|
|
|
override CXXFLAGS += -std=c++17 -Wall -fexceptions
|
|
|
|
override LDFLAGS += -pthread
|
|
|
|
|
|
|
|
all: $(PROGNAME)
|
|
|
|
|
|
|
|
tiv.o: CImg.h
|
|
|
|
|
|
|
|
$(PROGNAME): $(OBJECTS)
|
|
|
|
$(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
|