Autotools - atmel-maxtouch/mxt-app GitHub Wiki

Using Autotools scripts to build mxt-app

The Autotools configuration file called configure.ac is used to create a configure shell script which will setup build options for mxt-app. The Makefile.am file indicates the source files and options to be used in the build. The autogen.sh shell script starts the compile. An auto-generated Makefile will be created and used with the GCC compiler or cross-compiler to create the mxt-app binary files.

To compile using Autotools using the build machine type as a target: (typically x86):

./autogen.sh OR ./autogen.sh && make

To CROSS-COMPILE the mxt-app using Autotools (typically to an ARM architecture):

./autogen.sh –host=arm-linux-gnueabi && make OR ./autogen.sh –host=arm-linux-gnueabihf && make

To enable a debug release when compiling mxt-app:

./autogen.sh –enable-debug

To enable generation of the man page using pandoc (requires installation of pandoc)

./autogen.sh –enable-man & make

To view the man page in a terminal at mxt-app root:

man -M . mxt-app

If USB support is required, the build platform requires the libusb-1.0 library to be installed.

To build the libusb library from source and install the library on the build platform, the following steps can be performed:

These instructions specifically install version 1.0.22. Other later versions may exist.

git clone https://github.com/libusb/libusb.git

Change to the libusb directory:

git checkout tags/v1.0.22 -b V1.0.22

Modify the autogen.sh script to include the following flags when executing the configure command:

–disable-udev –disable-static

Example of full command:

./configure --enable-examples-build --enable-tests-build --disable-udev --disable-static

Make and install the library:

make install