

CXX=g++
CXXFLAGS = -Wall -g
BIN_DIR = ../../bin/

SRC_DIR = ../../src/message/

OBJECT_FILE_BIN =  $(BIN_DIR)Message.o

OBJECT_FILE =  Message.o
TEST_FLAGS =  -DVITE_DEBUG

## Qt include path
INCPATH       = -I/usr/share/qt4/mkspecs/linux-g++ -I/usr/include/qt4/QtUiTools -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4

## Qt libs
LIBS          = -L/usr/lib -L/usr/X11R6/lib -lglut -lGLEW -lQtXml -lQtOpenGL -lQtGui -lQtCore -lQtUiTools -lGLU -lGL -lpthread


all : make_src test_message
	@echo " "
	@echo "Message files compiled successfully ! (test)"
	@echo " "

# All the source files is compiled
make_src:  $(OBJECT_FILE)


test_message: test_message.cpp
	$(CXX) $(CXXFLAGS) $< -o $@ $(OBJECT_FILE_BIN) $(TEST_FLAGS) $(INCPATH)


%.o:$(SRC_DIR)%.cpp $(SRC_DIR)%.hpp
	$(CXX) -c $(CXXFLAGS) $< -o $(BIN_DIR)$@ $(TEST_FLAGS) $(INCPATH)