use full word "display" for variable in all places
[ozzloy@gmail.com/oble] / Makefile
index 7391fbda35eb0d6adb7ec3a76561b59eba955f3d..98e8c12f2b14203b00d28593a681b6f574ab4a82 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,16 +1,33 @@
-
 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
+print_screen_saver_stats.o: print_screensaver_stats.h
+
+oble: $(OBJS)
+       gcc $(OBJS) $(LDFLAGS) -o $@
+
+#haarcascade_frontalface_alt.xml:
+#      wget http://eclecti.cc/files/2008/03/haarcascade_frontalface_alt.xml
+
+print_screensaver_stats: print_screensaver_stats.o
+       gcc print_screensaver_stats.o $(LDFLAGS) -o $@
 
 test: all
-       ./oble /usr/share/opencv/haarcascades/haarcascade_frontalface_alt.xml
+       ./oble -c haarcascade_frontalface_alt.xml
+
+ubuntu-dependencies:
+       ./initial_oble_setup_ubuntu.bash
 
 clean:
-       rm -rf oble
+       rm -rf oble *.o
 
 new: clean all
 
 .PHONY: clean
-