Read on in our blog about Makefile project support in CLion.
Known issues which cause most of the failures:
- CPP-20126 – projects with the Automake
VPATH
macros are not supported forVPATH
(out-of-tree) builds. Non-VPATH
(in-tree) builds are supported. - CPP-19305 – distcc is not yet supported.
- CPP-18723 – Makefile projects which use BSD make syntax are not supported.
Here is the list of Makefiles projects we've tested on:
Project | Build system | Bootstrap | Make targets, flags and environment (-wnk are automatically added by CLion as of CPP-22548) | Status in CLion | Known issues | Comment |
---|---|---|---|---|---|---|
Sample project | GNU Make | None required | Works | |||
ARMmbed TLS | GNU Make | None required | Works | |||
Embedded makefile flow | GNU Make | None required | Works | Project Source Files view is only populated if arm-none-eabi-gcc is installed. | ||
Nano | GNU Autotools | ./autogen.sh && ./configure | Works | config.h as well as some other headers sometimes disappear from the Project Source Files view. | ||
CPython | GNU Autotools | ./configure | Works | CPP-19665 | False positives when looking for compiler invocations. CLion may need to adjust the heuristics. | |
OpenJDK | GNU Autotools | bash configure | Doesn't work | CPP-20558 |
| |
TscanCode | GNU Make | None required | Works | The "all" target is not defined in the Makefile, so one needs to explicitly specify it in CLion settings and reload. | ||
Nodejs | GNU Make | ./configure && /usr/bin/python3.7 tools/gyp_node.py -f make | -e (sufficient) or-e MAKEFLAGS=ewnk GNUMAKEFLAGS=ewnk | Works | Avoid running "make clean" before analyzing the project. | |
Linux | Kbuild | make distclean defconfig clean |
| Works | ||
GCC | GNU Autotools | ./configure | Doesn't work | One needs to run make at least once for the bootstrapping to complete: the first run of make invokes configure scripts in subprojects. So before we can try and analyze the output of make, the project has to be built and cleaned first. | ||
CMake | GNU Make | ./bootstrap | Works | |||
Lbrycrd | GNU Autotools | ./autogen.sh && ./configure --with-incompatible-bdb | Works | CPP-20126 | Uses Automake VPATH macros, so currently only non-VPATH (in-tree) builds are supported. | |
BusyBox | Kbuild | make distclean defconfig clean |
| Works | ||
SerenityOS | GNU Make | Works | CPP-19305 | Uses ccache. Bootstraps its own copies of gcc and binutils. Switched to CMake on May 6, 2020, so checkout commit 49727ffee424d8c0038ce18b91b0bf0ff33b1a4d before testing GNU Make support. | ||
Valve Proton | Doesn't work | Clone with --recurse-submodules (or git submodule init && git submodule update afterward). The Makefile uses a Vagrant-managed virtual machine to create a build environment. | ||||
Google AFL | GNU Make | None required | Works | Builds a custom compiler wrapper, afl-gcc (unavailable before the project is built), and invokes it as AFL_QUIET=1 AFL_INST_RATIO=100 AFL_PATH=. ./afl-gcc | ||
UPX | GNU Make | None required | all | Works | ||
VLC | GNU Autotools | ./bootstrap && ./configure | Works | CPP-20126 |
| |
FreeBSD | BSD Make | Doesn't work | CPP-18723 | Makefiles use BSD make syntax | ||
OpenBSD | BSD Make | Doesn't work | CPP-18723 | Makefiles use BSD make syntax | ||
NetBSD | BSD Make | Doesn't work | CPP-18723 | Makefiles use BSD make syntax | ||
DragonFly BSD | BSD Make | Doesn't work | CPP-18723 | Makefiles use BSD make syntax | ||
Systemd | Meson with Ninja backend | ./configure | Doesn't work | Makefile is used to just wrap ninja build . | ||
ZFS | GNU Autotools | ./autogen.sh && ./configure | Works | Uses libtool. | ||
Wine | GNU Autotools | ./configure --without-x --without-freetype | Works | Needs a 32-bit development environment, otherwise requires that some features (X11 and FreeType) are disabled. | ||
zinit zmodules | GNU Autotools | cd zmodules && ./configure |
| Works |
| |
Git | GNU Autotools+Kbuild | ./configure |
| Works | ||
QEMU | GNU Make | ./configure | V=1 | Works | CPP-20618 | Be sure to download or check out version 4.2.1 or older (versions 5.0.0+ use Meson/Ninja). |
Perl | GNU Make | ./Configure -d | Doesn't work | No compilation commands found. | ||
PHP | GNU Autotools | ./buildconf && ./configure | Works | Uses libtool. | ||
Mono | GNU Autotools | ./autogen.sh && ./configure | Works | CPP-20126 |
| |
make | GNU Autotools | ./bootstrap && ./configure | Works | |||
LibreOffice | Doesn't work | |||||
PostgreSQL | GNU Autotools | ./configure | Works | |||
NuttX RTOS | Kbuild | tools/configure.sh -e -a ../incubator-nuttx-apps photon:nsh (board name and config name may vary) | V=1 | Works | Requires kconfig-tweak (from the kconfig-frontends package) to be present on the PATH . Additionally, the arm-none-eabi-* toolchain (or whatever toolchain is appropriate for the board you've selected) needs to be installed first. The apps repository (nuttx-apps) needs to be cloned into a separate directory. Once bootstrapped, make menuconfig can be issued as usual. | |
Redis | GNU Make | None required | Works | |||
Curl | GNU Autotools | autoreconf -fiv && ./configure | Works | CPP-20126 |
| |
ChibiOS demos | GNU Make | None required | Works | CPP-19665 | ||
Strace | GNU Autotools | ./bootstrap && ./configure | Works | CPP-20126 | Uses Automake VPATH macros, so currently only non-VPATH (in-tree) builds are supported. | |
async-profiler | GNU Make | None required | Doesn't work | CPP-19895 | Can't import Makefile project if there're multiple source files on a single command line | |
imgui | GNU Make | None required | Works | CPP-20295 | Inline invocation of pkg-config --cflags in backticks. Works if all backtick'ed sub-shell invocations are converted to use the $(shell) function (see this patch). | |
dtwmcmd | GNU Autotools | ./configure | Works | CPP-20594 | ||
ffmpeg | GNU Make | ./configure | Works | CPP-19665 CPP-21708 | Object (-f) and debugging (-g) format arguments of yasm/nasm invocations are incorrectly treated as input files. | |
nginx | GNU Make | auto/configure | Works |
| ||
lk | GNU Make | None required |
| Works | Whenever building, cleaning or analyzing, add PROJECT=<project-name> to make arguments. | |
xfstt | GNU Autotools | ./autogen | Works | |||
sled | GNU Make | None required | Doesn't work | CPP-21675 | ||
wiredtiger | GNU Autotools | ./autogen.sh && ./configure | Works | Uses libtool. | ||
nemu | GNU Make | None required | Works | |||
Google Protocol Buffers | GNU Autotools | ./autogen.sh && ./configure | Works | Uses libtool. | ||
Apache Thrift | GNU Autotools | ./bootstrap.sh && ./configure | Works | |||
Greenplum Database (GPDB) | GNU Autotools | ./configure | Works | As a part of build process, some source files get symlinked from src/interfaces/libpq to src/backend/libpq before being compiled.CLion reports these files as missing. | ||
ucx | GNU Autotools | ./autogen.sh && ./configure | Works | Java bindings are "red" because they include headers generated from Java classes (not available before the project is built). | ||
Bitcoin Core integration/staging tree | GNU Autotools | ./autogen.sh && ./configure --with-incompatible-bdb | Works | CPP-20126 |
| |
Mesa 3D | GNU Autotools | NOCONFIGURE=1 ./autogen.sh && ./configure | Works |
| ||
libgstreamer | GNU Autotools | ./configure | Works | CPP-20126 |
| |
c-lightning | GNU Make | ./configure | Works | CPP-20126 | Some dependencies use GNU Autotools with Automake VPATH macros. |