RSS Git Download  Clone
Raw Blame History
################################################################################
#	Makefile
#		T.Barnaby,	BEAM Ltd,	2007-02-13
################################################################################
#
TOP	= $(shell pwd)/..

include ${TOP}/Makefile.config

#DEBUGFLAGS	= -O2 -g -pg
#DEBUGFLAGS	= -O2 -g
DEBUGFLAGS	= -O2

PROGS		= tmsControlGui

OBJSGUI		= Config.o
OBJSGUI		+= Debug.o
OBJSGUI		+= Globals.o 
OBJSGUI		+= BWidgets.o BWidgets_moc.o
OBJSGUI		+= AppGui.o AppGui_moc.o
OBJSGUI		+= ConfigureWin.o ConfigureWin_moc.o
OBJSGUI		+= StatusWin.o StatusWin_moc.o
OBJSGUI		+= BGraph.o BGraph_moc.o
OBJSGUI		+= BGraphControls.o BGraphControls_moc.o
OBJSGUI		+= BQComboBox.o BQComboBox_moc.o
OBJSGUI		+= ControlDataWin.o ControlDataWin_moc.o
OBJSGUI		+= TestWin.o TestWin_moc.o
OBJSGUI		+= Control.o Control_moc.o
OBJSGUI		+= StatisticsWin.o StatisticsWin_moc.o
OBJSGUI		+= OptionsWin.o OptionsWin_moc.o
OBJSGUI		+= PupeDiagnosticsWin.o PupeDiagnosticsWin_moc.o
OBJSGUI		+= PupeSimulateWin.o PupeSimulateWin_moc.o
OBJSGUI		+= TmsStateGui.o TmsStateGui_moc.o
OBJSGUI		+= PhaseTableWin.o PhaseTableWin_moc.o
OBJSGUI		+= Gui.o Gui_moc.o
OBJSGUI		+= tmsControlGui.o 
OBJSGUI		+= tmsControlMainWin.o tmsControlMainWin_moc.o

LDLIBS		:= -lTms -lfftw3 $(LDLIBS)

# QT
QTDIR		= /usr/${ARCH_LIB}/qt5
QTINCDIR	= /usr/include/qt5
QTMOC		= $(QTDIR)/bin/moc
QTRCC		= /usr/bin/rcc
CXXFLAGS	+= -fPIC -I/usr/include/qt5/qwt -I${QTINCDIR} -I${QTINCDIR}/Qt -I${QTINCDIR}/QtGui -I${QTINCDIR}/QtWidgets -I${QTINCDIR}/QtCore -I${QTINCDIR}/QtHelp
LDLIBS		:= -lQt5Core -lQt5Gui -lQt5Widgets ${LDLIBS}

.PRECIOUS: ${BUILDDIR}%_moc.cpp

${BUILDDIR}%_moc.cpp: %.h
	@echo "Creating moc $@ ..."
	#mkdir -p $(BUILDDIR)
	$(QTMOC) -o $@ $<


# General
all:	${PROGS}

install:	all
	mkdir -p ${BINDIR}
	cp ${PROGS} ${BINDIR}
	mkdir -p $(DESKTOPDIR)
	cp tmsControlGui.desktop $(DESKTOPDIR)
	mkdir -p $(ICONSDIR)
	cp tmsControlGui.png $(ICONSDIR)

tmsControlGui:	$(HUIC) $(OBJSGUI) 
	$(CXX) $(LDFLAGS) -o tmsControlGui $(OBJSGUI) $(LDLIBS) $(LDLIBSGUI)

clean:
	rm -f *.o *.d *.a *.so *_moc.*  *_moc.o.cpp data.txt pupeSource?.txt $(PROGS)

# Tests
bgraph: BGraph1.cpp BGraph1_moc.o
	$(CXX) $(CXXFLAGS) -DDEBUG_MAIN -c -o BGraph1.o BGraph1.cpp
	$(CXX) $(LDFLAGS) -o bgraph BGraph1.o BGraph1_moc.o $(LDLIBS) $(LDLIBSGUI)

# Dependancies
-include $(OBJS:.o=.d)