face detection resets idle time and deactivates ss
[ozzloy@gmail.com/oble] / Makefile
index 7391fbda35eb0d6adb7ec3a76561b59eba955f3d..e268f883d5e26a6593248a821b97d2be70591650 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,23 @@
 
 all: oble
 
-oble: oble.cpp oble.h
-       gcc `pkg-config --cflags opencv` -o oble oble.cpp `pkg-config --libs opencv`
+PKGS = opencv x11 xext xscrnsaver
+CXXFLAGS += $(shell pkg-config --cflags $(PKGS))
+LDFLAGS += $(shell pkg-config --libs $(PKGS))
+
+OBJS = idle_x11.o oble.o
+
+idle_x11.o: idle_x11.h
+oble.o: oble.h
+
+oble: $(OBJS)
+       gcc $(LDFLAGS) -o $@ $(OBJS)
 
 test: all
        ./oble /usr/share/opencv/haarcascades/haarcascade_frontalface_alt.xml
 
 clean:
-       rm -rf oble
+       rm -rf oble *.o
 
 new: clean all