Skip to end of metadata
Go to start of metadata

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 for VPATH (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:

ProjectBuild systemBootstrapMake targets, flags and environment

(-wnk are automatically added by CLion as of CPP-22548)
Status in CLionKnown issuesComment
Sample projectGNU MakeNone required Works  
ARMmbed TLSGNU MakeNone required Works  
Embedded makefile flowGNU MakeNone required Works Project Source Files view is only populated if arm-none-eabi-gcc is installed.
NanoGNU Autotools./autogen.sh && ./configure Works config.h as well as some other headers sometimes disappear from the Project Source Files view.
CPythonGNU Autotools./configure WorksCPP-19665False positives when looking for compiler invocations. CLion may need to adjust the heuristics.
OpenJDKGNU Autotoolsbash configure Doesn't workCPP-20558
  • Interleaved series of "Entering directory" and "Leaving directory" messages

Tips&Tricks: How to work with OpenJDK in CLion.

TscanCodeGNU MakeNone required Works The "all" target is not defined in the Makefile, so one needs to explicitly specify it in CLion settings and reload.
NodejsGNU 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.
LinuxKbuild
make distclean defconfig clean
V=1 bzImage modules
Works  
GCCGNU 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.
CMakeGNU Make
./bootstrap
 Works  
LbrycrdGNU Autotools
./autogen.sh && ./configure --with-incompatible-bdb
 WorksCPP-20126Uses Automake VPATH macros, so currently only non-VPATH (in-tree) builds are supported.
 
BusyBoxKbuild
make distclean defconfig clean
V=1
Works  
SerenityOSGNU Make  WorksCPP-19305Uses 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 AFLGNU MakeNone 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
UPXGNU MakeNone requiredallWorks  
VLCGNU Autotools./bootstrap && ./configure WorksCPP-20126
  • Uses dolt.
  • Uses Automake VPATH macros, so currently only non-VPATH (in-tree) builds are supported.
FreeBSDBSD Make  Doesn't workCPP-18723Makefiles use BSD make syntax
OpenBSDBSD Make  Doesn't workCPP-18723 Makefiles use BSD make syntax
NetBSDBSD Make  Doesn't workCPP-18723 Makefiles use BSD make syntax
DragonFly BSDBSD Make  Doesn't workCPP-18723 Makefiles use BSD make syntax
SystemdMeson with Ninja backend
./configure
 Doesn't work Makefile is used to just wrap ninja build.
ZFSGNU Autotools
./autogen.sh && ./configure
 Works Uses libtool.
WineGNU Autotools
./configure --without-x --without-freetype
 Works Needs a 32-bit development environment, otherwise requires that some features (X11 and FreeType) are disabled.
zinit zmodulesGNU Autotools
cd zmodules && ./configure

-e (sufficient) or
-e MAKEFLAGS=ewnk GNUMAKEFLAGS=ewnk

Works 
  • Only a single source file is found (consistently with bear).
  • Header files are generated and thus missing, so most of the code is red.
GitGNU Autotools+Kbuild
./configure
V=1
Works  
QEMUGNU Make./configureV=1WorksCPP-20618Be sure to download or check out version 4.2.1 or older (versions 5.0.0+ use Meson/Ninja).
PerlGNU Make
./Configure -d
 Doesn't work No compilation commands found.
PHPGNU Autotools
./buildconf && ./configure
 Works Uses libtool.
MonoGNU Autotools
./autogen.sh && ./configure
 WorksCPP-20126 
  • Uses libtool and dolt.
  • Uses Automake VPATH macros, so currently only non-VPATH (in-tree) builds are supported.
makeGNU Autotools
./bootstrap && ./configure
 Works  
LibreOffice   Doesn't work  
PostgreSQLGNU Autotools
./configure
 Works  
NuttX RTOSKbuildtools/configure.sh -e -a ../incubator-nuttx-apps photon:nsh
(board name and config name may vary)
V=1Works 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.
RedisGNU MakeNone required Works  
CurlGNU Autotools
autoreconf -fiv && ./configure
 WorksCPP-20126 
  • Uses libtool.
  • Uses Automake VPATH macros, so currently only non-VPATH (in-tree) builds are supported.
ChibiOS demosGNU MakeNone required WorksCPP-19665
StraceGNU Autotools
./bootstrap && ./configure
 WorksCPP-20126
Uses Automake VPATH macros, so currently only non-VPATH (in-tree) builds are supported.
async-profilerGNU MakeNone required Doesn't workCPP-19895Can't import Makefile project if there're multiple source files on a single command line
imguiGNU MakeNone required WorksCPP-20295Inline 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).
dtwmcmdGNU Autotools./configure WorksCPP-20594 
ffmpegGNU Make
./configure
 WorksCPP-19665
CPP-21708
Object (-f) and debugging (-g) format arguments of yasm/nasm invocations are incorrectly treated as input files.
nginxGNU Make
auto/configure
 Works 
  • "make clean" also removes the generated Makefile, so be sure to re-generate it afterwards (re-run "auto/configure").
  • The default build target used by the analyzer should be cleared (changed from "all" to "").
lkGNU MakeNone required

PROJECT=<project-name>, e.g.:
PROJECT=armemu-test

Works

CPP-20813
CPP-20832
CPP-19665

Whenever building, cleaning or analyzing, add PROJECT=<project-name> to make arguments.
xfsttGNU Autotools
./autogen
 Works  
sledGNU MakeNone required Doesn't workCPP-21675 
wiredtigerGNU Autotools
./autogen.sh && ./configure
 Works Uses libtool.
nemuGNU MakeNone required Works  
Google Protocol BuffersGNU Autotools
./autogen.sh && ./configure
 Works Uses libtool.
Apache ThriftGNU 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.
ucxGNU 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 treeGNU Autotools
./autogen.sh && ./configure --with-incompatible-bdb
 WorksCPP-20126
  • Uses libtool and ccache.
  • Uses Automake VPATH macros, so currently only non-VPATH (in-tree) builds are supported.
Mesa 3DGNU Autotools
NOCONFIGURE=1 ./autogen.sh && ./configure
 Works

CPP-19665
CPP-20126

  • Has recently switched to Meson, but at least version 18.3 (mesa-18.3.6 tag) still uses Makefile's.
  • Uses Automake VPATH macros, so currently only non-VPATH (in-tree) builds are supported.
libgstreamerGNU Autotools
./configure
 WorksCPP-20126
  • Uses libtool.
  • Uses Automake VPATH macros, so currently only non-VPATH (in-tree) builds are supported.
  • Git upstream has migrated to Meson/Ninja, so the last version which can be opened in CLion is 1.16.3.
c-lightningGNU Make
./configure
 WorksCPP-20126Some dependencies use GNU Autotools with Automake VPATH macros.
  • No labels