beautypg.com

Ktam3874/pitx software guide, One possible makefile might look like this, File main.cpp – Kontron KTAM3874-pITX User Manual

Page 220

background image

KTD-S0057-I

Page 216 Linux® Programming Examples (DebianTM)


KTAM3874/pITX Software Guide


The following picture gives an impression of the program.

One possible Makefile might look like this:

CXX := arm-linux-gnueabihf-g++ -march=armv7 -I/usr/include/qt4
LDFLAGS := -l QtCore -l QtGui -l QtDeclarative -l QtScript -l QtSql -l QtNetwork -l QtXmlPatterns -l glib-2.0 \

-l png12 -l expat -l pcre -l uuid -l z

all: qt

moc_qmlapplicationviewer.cpp: qmlapplicationviewer.h
/usr/bin/moc-qt4

-I/usr/include/qt4 qmlapplicationviewer.h -o moc_qmlapplicationviewer.cpp

qmlapplicationviewer.o: qmlapplicationviewer.cpp
main.o: main.cpp moc_qmlapplicationviewer.cpp qmlapplicationviewer.cpp

qt: main.o qmlapplicationviewer.o

$(CXX) -o $@ main.o qmlapplicationviewer.o $(LDFLAGS)

clean:

rm qt main.o qmlapplicationviewer.o


Some minor deviations from the original sourcecode are marked with orange color.

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.
**

This manual is related to the following products: