aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: de8b75b7c41acdb7ec3d8b099c49abbe7573d4b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
LIBS=libconfuse opencv4
override CXXFLAGS += -MMD -Wall -std=c++20 -Wno-deprecated-enum-enum-conversion `pkg-config $(LIBS) --cflags`
override LDFLAGS += `pkg-config $(LIBS) --libs`
SOURCES=$(wildcard src/*.cc) 
OBJECTS=$(SOURCES:.cc=.o)
DEPS = $(OBJECTS:.o=.d)
EXECUTABLE=annotator
prefix ?= /usr
exec_prefix ?= $(prefix)
bindir ?= $(exec_prefix)/bin

$(EXECUTABLE): $(OBJECTS)
	$(CXX) $(OBJECTS) -o $@ $(LDFLAGS)

-include $(DEPS)

install: $(EXECUTABLE)
	install -d $(DESTDIR)$(bindir)
	install -m 755 $(EXECUTABLE) $(DESTDIR)$(bindir)

.PHONY: clean
clean:
	$(RM) $(OBJECTS) $(DEPS) $(EXECUTABLE)