1 CXXFLAGS = -ansi -pedantic -pedantic-errors -Wall -g3 -O2 -D_ANSI_SOURCE_
2 CXXFLAGS += -fno-common \
12 -Wmissing-declarations \
13 -Wmissing-format-attribute \
22 -Wp,-D_FORTIFY_SOURCE=2 \
24 --param=ssp-buffer-size=4
26 COMPILER = $(shell $(CXX) -v 2>&1 | grep -q "clang version" && echo clang || echo gcc)
28 ifeq ($(COMPILER), gcc)
29 CXXFLAGS += -Wunsafe-loop-optimizations \
30 -Wunused-but-set-variable
33 ifeq ($(COMPILER), clang)
34 LDFLAGS += -Qunused-arguments
37 CXXFLAGS += $(shell pkg-config --cflags opencv)
38 LDLIBS += $(shell pkg-config --libs opencv)
43 opencv_trail_effect.o: $(wildcard *.hpp)
45 # Some command lines to imitate different trail styles
47 blame_it_on_the_boogie: opencv_trail_effect
48 ./opencv_trail_effect -l 12 -s background -d fadeaccumulate
50 wtf: opencv_trail_effect
51 ./opencv_trail_effect -l -1 -s background -d copy
53 l_anima_vola: opencv_trail_effect
54 ./opencv_trail_effect -l 30 -s background -d copy -r
56 average: opencv_trail_effect
57 ./opencv_trail_effect -l 10 -s background -d average -B
60 rm -f *.o opencv_trail_effect vgdump gtk.suppression
62 test: opencv_trail_effect
63 [ -f gtk.suppression ] || wget -nv https://people.gnome.org/~johan/gtk.suppression
64 G_DEBUG=gc-friendly G_SLICE=always-malloc \
65 valgrind --tool=memcheck --leak-check=full --leak-resolution=high \
66 --num-callers=20 --log-file=vgdump \
67 --suppressions=gtk.suppression ./opencv_trail_effect