CXX=g++ CXXFLAGS:=-I../include CXXFLAGS+=/usr/include/mysql CXXFLAGS+=$(shell pkg-config --cflags opencv) LDFLAGS+=-L../libs/lib_dummy /usr/lib64/mysql LIBS:=-lcvface_api -lpthread -lmysqlclient LIBS+=$(shell pkg-config --libs opencv) OBJ = faceAPI.o db.o tools.o main.o demo: $(OBJ) $(CXX) $(CXXFLAGS) $(LDFLAGS) -o demo $(OBJ) $(LIBS) main.o : test.cpp $(CXX) $(CXXFLAGS) $(LDFLAGS) -c test.cpp -o main.o tools.o : tools.h $(CXX) $(CXXFLAGS) $(LDFLAGS) -c tools.cpp -o tools.o db.o : DBuntil.h $(CXX) $(CXXFLAGS) -o db.o -c DBuntil.cpp $(LDFLAGS) $(LIBS) faceAPI.o : faceAPI.h $(CXX) $(CXXFLAGS) $(LDFLAGS) -c faceAPI.cpp -o faceAPI.o #faceDB.o : faceDB.cpp # $(CXX) $(CXXFLAGS) $(LDFLAGS) -c faceDB.cpp -o faceDB.o .PHONY: clean clean: rm -f *.o demo