allow specifying cascade file as cli arg. Closes #7
[ozzloy@gmail.com/oble] / Makefile
index 3e0fc3ab18e410ff678a765d4f3f62d2d2852aad..329027ca5ad1c5bc6825e44f85a69e8e5df92453 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,25 @@
 
-all:
-       gcc `pkg-config --cflags opencv` -o hello-world hello-world.cpp `pkg-config --libs opencv`
+all: oble
+
+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
+
+clean:
+       rm -rf oble *.o
+
+new: clean all
+
+.PHONY: clean
+