2019-03-23 13:18:48 +01:00
|
|
|
# set CXX to g++ if not set
|
|
|
|
CXX ?= g++
|
2018-08-03 14:17:53 +02:00
|
|
|
|
2019-03-23 13:18:48 +01:00
|
|
|
# append necessary arguments
|
|
|
|
override CPPFLAGS += -std=c++17 -Wall -fpermissive -fexceptions -O2
|
|
|
|
override LDFLAGS += -lstdc++fs -pthread -s
|
|
|
|
|
|
|
|
all: tiv
|
2017-07-11 21:25:08 +02:00
|
|
|
|
|
|
|
tiv.o: tiv.cpp CImg.h
|
2019-03-23 13:18:48 +01:00
|
|
|
$(CXX) $(CPPFLAGS) -c tiv.cpp -o $@
|
2017-07-11 21:25:08 +02:00
|
|
|
|
|
|
|
tiv : tiv.o
|
2019-03-23 13:18:48 +01:00
|
|
|
$(CXX) $^ -o $@ $(LDFLAGS)
|
2017-07-11 21:25:08 +02:00
|
|
|
|
2019-03-23 13:18:48 +01:00
|
|
|
.PHONY: all install clean
|
|
|
|
install: all
|
|
|
|
test -d $(DESTDIR)/usr/local/bin || mkdir -p $(DESTDIR)/usr/local/bin
|
|
|
|
cp tiv $(DESTDIR)/usr/local/bin/tiv
|
2017-07-11 21:25:08 +02:00
|
|
|
|
|
|
|
clean:
|
2019-03-23 13:18:48 +01:00
|
|
|
rm -f tiv tiv.o
|