diff options
author | Your Name <you@example.com> | 2021-05-13 17:20:26 -0400 |
---|---|---|
committer | Your Name <you@example.com> | 2021-05-13 17:20:26 -0400 |
commit | 5a6248518654ec97d95d2c463e3ffb4be7bbf456 (patch) | |
tree | a6ebb6bb26ba2a6b4abc3829a81c58ae97fd2e05 /Makefile | |
download | annotator-5a6248518654ec97d95d2c463e3ffb4be7bbf456.tar.gz annotator-5a6248518654ec97d95d2c463e3ffb4be7bbf456.tar.bz2 annotator-5a6248518654ec97d95d2c463e3ffb4be7bbf456.zip |
Initial commit
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8cc7873 --- /dev/null +++ b/Makefile @@ -0,0 +1,39 @@ +CC=g++ +LIBS=libconfuse opencv4 +CFLAGS=-c -Wall -fPIC -std=c++20 +LDFLAGS=-pthread +SOURCES=src/annotator.cc src/labeller.cc src/playback.cc src/settings.cc src/ui.cc +OBJECTS=$(SOURCES:.cc=.o) +LIBRARY= +EXECUTABLE=annotator +ifeq ($(PREFIX),) + PREFIX := /usr +endif + +all: $(SOURCES) $(EXECUTABLE) + +install: $(EXECUTABLE) + install -d $(DESTDIR)$(PREFIX)/bin/ + install -m 755 $(EXECUTABLE) $(DESTDIR)$(PREFIX)/bin/ + +$(EXECUTABLE): $(OBJECTS) + $(CC) $(OBJECTS) -o $@ $(LDFLAGS) `pkg-config $(LIBS) --libs` + + +src/annotator.o: src/annotator.cc src/playback.h src/ui.h src/labeller.h + $(CC) $(CFLAGS) $< -o $@ `pkg-config $(LIBS) --cflags` + +src/labeller.o: src/labeller.cc src/labeller.h src/settings.h + $(CC) $(CFLAGS) $< -o $@ `pkg-config $(LIBS) --cflags` + +src/playback.o: src/playback.cc src/playback.h + $(CC) $(CFLAGS) $< -o $@ `pkg-config $(LIBS) --cflags` + +src/settings.o: src/settings.cc src/settings.h + $(CC) $(CFLAGS) $< -o $@ `pkg-config $(LIBS) --cflags` + +src/ui.o: src/ui.cc src/ui.h src/playback.h src/labeller.h + $(CC) $(CFLAGS) $< -o $@ `pkg-config $(LIBS) --cflags` + +clean: + rm -f src/*.o $(LIBRARY) $(EXECUTABLE) |