CXX = g++
CXXFLAGS = -Wall -march=i686 -O3 -mmmx -msse2 -mfpmath=sse -fcheck-new
RM = del

LIBS = -L "$(CVDIR)/lib"
STATICLIBS = -lcv -lcxcore -lhighgui

CVDIR = c:/program files/opencv
INCS = -I "$(CVDIR)/cxcore/include" -I "$(CVDIR)/cv/include" -I "$(CVDIR)/otherlibs/highgui"

.PHONY: all clean


%.o: %.cpp %.h
	$(CXX) $(CXXFLAGS) $(INCS) -c $< -o $@
        
%.s: %.cpp %.h
	$(CXX) $(CXXFLAGS) $(INCS) -S $< -o $@

all: bin/demo.exe

bin/demo.exe: src/demo.o src/lrd_engine.o src/faces.h
	$(CXX) $(CXXFLAGS) $(INCS) $(LIBS) $^ -o $@ $(STATICLIBS)

clean:
	$(RM) src\*.o src\*.s
