Skip to end of metadata
Go to start of metadata

Read on in our blog about Makefile project support in CLion. Grab a free EAP build and give it a try on your Makefile project.

Here is the list of Makefiles projects we've tested on:

ProjectBuild systemBootstrapMake flags and environmentStatus in CLionKnown issuesComment
Sample projectGNU MakeNone requiredmake -wnkWorks  
ARMmbed TLSGNU MakeNone requiredmake -wnkWorks  
Embedded makefile flowGNU MakeNone requiredmake -wnkWorks Project Source Files view is only populated if arm-none-eabi-gcc is installed.
NanoGNU Autotools./autogen.sh && ./configuremake -wnkWorks config.h as well as some other headers sometimes disappear from the Project Source Files view.
CPythonGNU Autotools./configuremake -wnkWorksCPP-19665False positives when looking for compiler invocations. CLion may need to adjust the heuristics.
OpenJDKGNU Autotoolsbash configuremake -wnkDoesn't workCPP-20558

Interleaved series of "Entering directory" and "Leaving directory" messages

2. Unparseable g++ -c file.cpp > >(/usr/bin/tee -a file.o.log) patterns on the command line.

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

TscanCodeGNU MakeNone requiredmake -wnkWorks 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 makemake -ewnk (sufficient) or
make -ewnk MAKEFLAGS=ewnk 
GNUMAKEFLAGS=ewnk
Works Avoid running "make clean" before analyzing the project. Multiple "Incorrect file specified" errors.
LinuxKbuildmake distclean defconfig cleanmake V=1 -wnk bzImage modulesWorksCPP-20609Problems with output redirection:
Incorrect file specified: '>'
GCCGNU Autotools./configuremake -wnkDoesn'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./bootstrapmake -wnkWorks  
LbrycrdGNU Autotools  Doesn't workCPP-19549Uses libtool
BusyBoxKbuildmake distclean defconfig cleanmake V=1 -wnkWorks Can also be analyzed as make -wnk V=1
SerenityOSGNU Make  Doesn't workCPP-19549, CPP-19305Uses ccache
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 requiredmake -wnkWorksCPP-20601Builds 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 requiredmake -wnk allWorks  
VLCGNU Autotools  Doesn't workCPP-19549Uses dolt
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./configuremake -wnkDoesn't work Makefile is used to just wrap "ninja build"
ZFSGNU Autotools  Doesn't workCPP-19549Uses 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. Multiple "Incorrect file specified" errors.
zinit zmodulesGNU Autotoolscd zmodules && ./configuremake -ewnk (sufficient) or
make -ewnk MAKEFLAGS=ewnk GNUMAKEFLAGS=ewnk
Doesn't work Multiple "Incorrect file specified" and "Incorrect directory specified" errors.
GitGNU Autotools+Kbuild./configuremake V=1 -wnkWorks  
QEMUGNU Make./configuremake V=1 -wnkWorksCPP-20618Multiple "Incorrect file specified" errors.
PerlGNU Make./Configure -dmake -wnkDoesn't work No compilation commands found.
PHPGNU Autotools  Doesn't workCPP-19549Uses libtool
MonoGNU Autotools  Doesn't workCPP-19549Uses libtool and dolt
makeGNU Autotools./bootstrap && ./configuremake -wnkWorks  
LibreOffice   Doesn't work  
PostgreSQLGNU Autotools./configuremake -wnkWorks  
NuttX RTOSKbuildtools/configure.sh -e -a ../incubator-nuttx-apps photon:nsh
(board name and config name may vary)
make V=1 -wnkWorks 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 requiredmake -wnkWorks  
CurlGNU Autotools make -wnkDoesn't workCPP-19549Uses libtool
ChibiOS demosGNU MakeNone requiredmake -wnkWorksCPP-19665Assembly files on the compiler command line (HAL-STM32F407-DISCOVERY). Other demos w/o assembly files get resolved just fine (RT-LPC214x-OLIMEX).
StraceGNU Autotools make -wnkDoesn't workCPP-20126Subshell invocation which originates from Automake macros
async-profilerGNU MakeNone requiredmake -wnkDoesn't workCPP-19895Can't import Makefile project if there're multiple source files on a single command line
imguiGNU MakeNone requiredmake -wnkDoesn't workCPP-20295Inline invocation of pkg-config --cflags via a subshell
dtwmcmdGNU Autotools./configuremake -wnkWorksCPP-20594 
ffmpegGNU Make./configuremake -wnkWorksCPP-19665,
CPP-20609
  • Assembly files (with .asm extension) on the command line.
  • Problems with output redirection.
nginxGNU Makeauto/configuremake -wnkWorks 
  • "make clean" also removes the generated Makefile, so be sure to re-generate it afterwards (run "auto/configure").
  • The default build target used by the analyzer should be cleared (changed from "all" to "").
  • No labels