Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

305 lines (214 sloc) 9.41 KB
Gammu All Mobile Management Utilities - Installation
Binaries - Linux
Many distributions come with prebuilt Gammu binaries, if you can use
them, it is definitely the easiest thing. There are also binary packages
of latest release built for many distributions available on Gammu home
page <>.
Binaries - Windows
You can download Windows binaries from <>. For
Windows 95, 98 and NT 4.0 you will also need ShFolder DLL, which can be
downloaded from Microsoft:
From Sources - Requirements
Gammu does not require anything at all to build, but you might miss some
features. Optional dependencies include:
- Bluetooth support on Linux.
- fbususb connection support
- New versions notification and phonedb access.
- Support for more charsets in AT engine.
- Localization of strings.
- MySQL support in SMSD.
- PostgreSQL support in SMSD.
- required at least version 0.8.2
- DBI support in SMSD.
- For testing, please install libdbd-sqlite3
- Gammu has a Python bindings
SQLite + libdbi-drivers with SQLite
- needed for testing of SMSD using libdbi driver
From Sources - Linux
You need CMake from <> for configuring Gammu.
For compatibility reasons, configure like wrapper is provided, if you
don't need much specific tuning, you can use general "./configure; make;
sudo make install" set of commands. The configure wrapper will create
directory build-configure and build all binaries there (nothing is
changed in source tree), for example gammu binary is in
build-configure/gammu directory.
If you need/want to tweak build a bit more than configure wrapper
provides, you have to use CMake directly. For now, only out of source
build is supported, so you have to create separate directory for build:
> mkdir build
> cd build
Then just configure project:
> cmake ..
Build it:
> make
Test that everything is okay:
> make test
And finally install it:
> sudo make install
You can configure build parameters either by command line (see
parameters bellow), or using TUI - ccmake.
Useful cmake parameters:
-DBUILD_SHARED_LIBS=ON enables shared library
-DCMAKE_BUILD_TYPE="Debug" enables debug build
-DCMAKE_INSTALL_PREFIX="/usr" change installation prefix
-DENABLE_PROTECTION=OFF disables various compile time protections
against buffer overflows and similar attacks
-DBUILD_PYTHON=/usr/bin/python2.6 changes Python used for build Python
-DWITH_PYTHON=OFF disables build of python-gammu
You can also disable support for whole set of phones, e.g.:
-DWITH_NOKIA_SUPPORT=OFF disables Nokia phones support
-DWITH_BLUETOOTH=OFF disables Bluetooth support
-DWITH_IRDA=OFF disables IrDA support
Limiting set of installed data
By setting following flags you can control which additional parts will
be installed:
INSTALL_GNAPPLET - Install Gnapplet binaries
INSTALL_MEDIA - Install sample media files
INSTALL_PHP_EXAMPLES - Install PHP example scripts
INSTALL_BASH_COMPLETION - Install bash completion script for Gammu
INSTALL_LSB_INIT - Install LSB compatible init script for Gammu
INSTALL_DOC - Install documentation
INSTALL_LOC - Install locales data
For example:
From Sources - Windows
You need CMake from <> for configuring Gammu. CMake
is able to generate projects for various tools including Microsoft
Visual Studio, Borland toolchains, Cygwin or Mingw32. Just click on
CMakeLists.txt in project sources and configure CMake to be able to find
optional libraries (see cross compilation section for more information
about getting those). The result should be project for your compiler
where you should be able to work with it as with any other project.
More detailed and up to date information is maintained on the wiki:
Borland toolchain - you can download compiler at
<>. You need to add
c:/Borland/BCC55/Bin to system path (or manually set it when running
CMake) and add -Lc:/Borland/BCC55/Lib -Ic:/Borland/BCC55/Include
-Lc:/Borland/BCC55/Lib/PSDK to CMAKE_C_FLAGS in CMake (otherwise
compilation fails).
From Sources - Mac OS X
Gammu should be compilable on Mac OS X, see wiki for up to date
Cross compilation for Windows on Linux
Only cross compilation using CMake has been tested. You need to install
MinGW cross tool chain and run time. On Debian you can do it by apt-get
install mingw32. Build is then quite simple:
mkdir build-win32
cd build-win32
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-mingw32.cmake
If your MinGW cross compiler binaries are not found automatically, you
can specify their different names in cmake/Toolchain-mingw32.cmake.
To build just bare static library without any dependencies, use:
cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-mingw32.cmake \
-DWITH_Postgres=OFF \
-DWITH_GettextLibs=OFF \
-DWITH_Iconv=OFF \
To be compatible with current Python on Windows, we need to build
against MSVCR71, to achieve this, libmoldname71 library is needed. It
is part of current MinGW releases, but for older ones you can build
it following way:
1. Get from MinGW-runtime sources.
2. Get MinGW-runtime.
3. Execute following commands (crafted for Debian):
i586-mingw32msvc-ar x /usr/i586-mingw32msvc/lib/libmoldname.a isascii.o iscsym.o iscsymf.o toascii.o strcasecmp.o strncasecmp.o wcscmpi.o
i586-mingw32msvc-gcc -DRUNTIME=71 -D__FILENAME__=moldname-71.def -D__MSVCRT__ -C -E -P -xc-header >moldname-71.def
i586-mingw32msvc-dlltool -k -U --dllname msvcr71.dll --def moldname-71.def --output-lib libmoldname71.a
i586-mingw32msvc-ar rc libmoldname71.a isascii.o iscsym.o iscsymf.o toascii.o strcasecmp.o strncasecmp.o wcscmpi.o
i586-mingw32msvc-ranlib libmoldname71.a
Information taken from <>.
Third party libraries
The easies way to link with third party libraries is to add path to
their installation to cmake/Toolchain-mingw32.cmake or to list these
paths in CMAKE_FIND_ROOT_PATH when invoking cmake.
You can download MySQL binaries from <>, but then
need some tweaks:
cd mysql/lib/opt
reimp.exe -d libmysql.lib
i586-mingw32msvc-dlltool --kill-at --input-def libmysql.def \
--dllname libmysql.dll --output-lib libmysql.a
reimp.exe is part of mingw-utils and can be run through wine, I didn't
try to compile native binary from it.
You can download PostgreSQL binaries from <>,
but then you need to add wldap32.dll library to bin.
For Gettext (internationalization support), you need,,
from <>. Unpack these to same directory.
For CURL support, you need from
Gammu comes with testsuite which should be run after build. You can do
this using 'make test'. CMake build system uses for testing CTest, which
also includes option to connect to dashboard and submit test results
there, so that they can be reviewed and fixed by others. To participate
in this testing, you need just to run 'make Experimental'. It will
compile current version, run tests and submit data to dashboard:
There are some more options for testing:
- make ExperimentalMemCheck
This checks memory accesses using valgrind during tests and submits
report. You need to do this after 'make Experimental' and you can
submit results using 'make ExperimentalSubmit'.
- coverage reports
To get test coverage reports, you need to configure project using
- nightly testing
Currently several machines do compile and test Gammu every night. If
you want to tak part of this, just ensure that your machine executes
test suite every night (preferably after 3:00 CET). You can select
either 'make Nightly' to do regullar testing or 'make
NightlyMemoryCheck' to test with valgrind. Also you can enable
coverage tests as described above.
- special cases:
You can enable some additional tests, which require some external
components to be setup and are disabled by default:
MYSQL_TESTING - you need to have setup MySQL server with database
where SMSD can plat.
PSQL_TESTING - you need to have setup PostgreSQL server with
database where SMSD can plat.
# vim: et ts=4 sw=4 sts=4 tw=72 spell spelllang=en_us
Jump to Line
Something went wrong with that request. Please try again.