Skip to content

General Build Instructions Using Auto‐tools

mcuee edited this page May 12, 2025 · 6 revisions

avrdude main uses CMake as the building tool. But some users may still want to use the Auto-tools, which is still supported.

Alternative configure and build option using auto-tools (not working for MSVC build)

Depending on your requirements, the following prerequisites are needed:

  • libelf including header files (for directly reading ELF files)
  • libusb 0.1 or 1.0 (or compatible), including header files
  • libftdi or libftdi1 (for direct access to FTDI devices)
  • libhidapi or libhid (for access to recent Atmel/Microchip dongles)
  • automake, autoconf and libtool
cd src
./bootstrap
./configure                                                                #(for Linux)
./configure --prefix=/mingw64                                              #(for Windows MSYS2 mingw64)
./configure --prefix=/ucrt64                                               #(for Windows MSYS2 ucrt64)
./configure --prefix=/clang64                                              #(for Windows MSYS2 clang64)
CFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib ./configure           #(for macOS Macports, FreeBSD and OpenBSD)
CFLAGS=-I/usr/pkg/include LDFLAGS=-L/usr/pkg/lib ./configure               #(for NetBSD)
CFLAGS=-I/opt/homebrew/include LDFLAGS=-L/opt/homebrew/lib ./configure     #(for macOS Homebrew)
make
make LIBTOOL=/usr/bin/libtool     #(for OpenBSD only, to fix a potential issue mentioned in Issue #1985)

At the end of the configure command, a configuration summary is issued, like this:

Configuration summary:
----------------------
DO HAVE    libelf
DO HAVE    libusb
DO HAVE    libusb_1_0
DO HAVE    libftdi1
DON'T HAVE libftdi
DO HAVE    libhid
DO HAVE    libhidapi
DO HAVE    libreadline
DO HAVE    libserialport
DO HAVE    pthread
DISABLED   doc
DISABLED   parport
DISABLED   linuxgpio
DISABLED   linuxspi

Installation method.

The following command will usually work for Linux (using sudo or run as root), macOS Macports and FreeBSD/OpenBSD/NetBSD (using sudo or doas, or run as root). It also works for Windows MSYS2 if you want to run the avrdude binary from within Windows MSYS2.

make install

If you do not want to use the above method, the avrdude binary and avrdude.conf configuration file will be located in the same src directory. You can copy them to a directory in the PATH to run them. We recommend this method for Windows users and macOS Homebrew users. Take note for macOS Homebrew, the above make install command will not work.

Clone this wiki locally