Ktam3874/pitx software guide, One possible makefile might look like this, As a result you can see this picture – Kontron KTAM3874-pITX User Manual
Page 194: File main.cpp

KTD-S0057-I
Page 190 Linux® Programming Examples (DebianTM)
KTAM3874/pITX Software Guide
One possible Makefile might look like this:
DEFINES = -DQT_WEBKIT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
CXX := arm-linux-gnueabihf-g++ -march=armv7 -I/usr/include/qt4
LDFLAGS := -l QtCore -l QtGui -l QtDBus
-l QtOpenGL -l GL
-l glib-2.0 -l png12 -l expat -l pcre -l uuid -l z
all: qt
moc_glwidget.cpp: glwidget.h
/usr/bin/moc-qt4 $(DEFINES) -I/usr/include/qt4 glwidget.h -o moc_glwidget.cpp
moc_mainwindow.cpp: mainwindow.h
/usr/bin/moc-qt4 $(DEFINES) -I/usr/include/qt4 mainwindow.h -o moc_mainwindow.cpp
glwidget.o: glwidget.cpp moc_glwidget.cpp
main.o: main.cpp moc_mainwindow.cpp
mainwindow.o: mainwindow.cpp
qt: main.o glwidget.o mainwindow.o
$(CXX) -o $@ main.o glwidget.o mainwindow.o $(LDFLAGS)
clean:
rm qt main.o glwidget.o mainwindow.o
As a result you can see this picture:
File main.cpp:
/****************************************************************************
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
** "Redistribution and use in source and binary forms, with or without
** modification, are permitted provided that the following conditions are
** met:
** * Redistributions of source code must retain the above copyright
** notice, this list of conditions and the following disclaimer.
** * Redistributions in binary form must reproduce the above copyright
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the distribution.
** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
** of its contributors may be used to endorse or promote products derived
** from this software without specific prior written permission.