update install for ubuntu 11.04
[ozzloy@gmail.com/oble] / Makefile
index 3e0fc3ab18e410ff678a765d4f3f62d2d2852aad..9603c5989ebf7cae92caf2bd50727f8e393a5255 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,26 @@
+all: oble
 
-all:
-       gcc `pkg-config --cflags opencv` -o hello-world hello-world.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 -c /usr/share/opencv/haarcascades/haarcascade_frontalface_alt.xml
+
+dependencies:
+       sudo aptitude install -y libxss-dev
+
+clean:
+       rm -rf oble *.o
+
+new: clean all
+
+.PHONY: clean