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-19305distcc 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
 Works Uses Automake VPATH macros. Both VPATH (out-of-tree) and 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 Works 
  • Uses dolt.
  • Uses Automake VPATH macros. Both VPATH (out-of-tree) and 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-24878
  • Uses libtool and dolt.
  • Uses Automake VPATH macros. Both VPATH (out-of-tree) and 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
 Works 
  • Uses libtool.
  • Uses Automake VPATH macros. Both VPATH (out-of-tree) and non-VPATH (in-tree) builds are supported.
ChibiOS demosGNU MakeNone required WorksCPP-19665
StraceGNU Autotools
./bootstrap && ./configure
 Works Uses Automake VPATH macros. Both VPATH (out-of-tree) and non-VPATH (in-tree) builds are supported.
async-profilerGNU MakeNone required Works  
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
 Works 
  • Uses libtool and ccache.
  • Uses Automake VPATH macros. Both VPATH (out-of-tree) and non-VPATH (in-tree) builds are supported.
Mesa 3DGNU Autotools
NOCONFIGURE=1 ./autogen.sh && ./configure
 Works

CPP-19665

  • Has recently switched to Meson, but at least version 18.3 (mesa-18.3.6 tag) still uses Makefile's.
  • Uses Automake VPATH macros. Both VPATH (out-of-tree) and non-VPATH (in-tree) builds are supported.
libgstreamerGNU Autotools
./configure
 Works 
  • Uses libtool.
  • Uses Automake VPATH macros. Both VPATH (out-of-tree) and 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
defaultWorksCPP-24880
CPP-24881
  • The value of the "Build target" text field should be either "default" or empty (there is no "all" target).
  • Some dependencies use GNU Autotools with Automake VPATH macros.
sudoGNU Autotools./configureall checkWorks  
cygwinGNU Autotools./configure && cd newlib && ./configure-C newlibWorks 
  • The Makefile at the root of the project is useless (can be opened as a project but doesn't produce any compilation commands).
  • Most of the code (particularly, libm and libc) resides under newlib/ sub-directory.
  • Either newlib/Makefile may be opened directly with project root subsequently changed, or -C newlib may be added to Make switches instead.
  • The content of winsup/ directory may be opened as a separate project in a similar way.
mold, a modern linkerGNU Makegit submodule update --init --recursivesubmodules mold testWorks Requires GCC 10 or Clang 10+ with c++20 support and std::span in the standard library.
gdbGNU Autotools
./configure
all checkWorks

CPP-23197
CPP-23988
CPP-23991

  • Needs to be built first (when being built for the 1st time, runs ./configure in subprojects).
  • After the project is clean'ed (particularly, from CLion), bfd/bfd.h needs to be manually rebuilt by running
    make -C bfd bfd.h
  • Running make check (in addition to make all) requires DejaGnu to be installed.
oomph-libGNU Autotools./autogen.sh WorksCPP-23998 
stockfishGNU MakeNone requiredbuildWorks Needs POSIX utilities such as uname, as well as wget, curl, and some others. So, when building under MinGW, be sure to add MSys or MSys2 to the PATH (plain MinGW is not enough).
u-bootKbuildmake defconfigV=1Works  
twin, a Textmode WINdow environmentGNU Autotools./configureall checkWorks  
imakeImakexmkmf -aMakefiles depend allWorks  
onekoImakexmkmf -aMakefiles depend allWorks  
xzoomImakexmkmf -aMakefiles depend allWorks  
xzoom-follow-mouseImakexmkmf -aMakefiles depend allWorks  
  • No labels