ARCH=$(shell uname -m)
CXX = g++
CXXFLAGS = -coverage -DMM3D_EDIT -I../../libmm3d -I../../implui -I../common -I../../../ -I/usr/include/$(ARCH)-linux-gnu/qt5 -Wall -g -fPIC -std=c++11
TESTLIBS = -lQt5Test -lQt5Core -lQt5Gui -lGL -lGLU
LIBS =

.cc.o:
	$(CXX) $(CXXFLAGS) -c $<

.cc.unit:
	$(CXX) $(CXXFLAGS) -o $*.unit $< ../../implui/qttex.o $(LIBS) $(TESTLIBS) -lgcov

.cc.moc:
	qtchooser -qt=5 -run-tool=moc $< > $*.moc

.SUFFIXES: .cc .o .moc
.SUFFIXES: .cc .o .moc .unit .prof
.PHONY: all test check clean
