Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.arch.embedded > #30930

Re: Makefile or IDE?

From Stefan Reuther <stefan.news@arcor.de>
Newsgroups comp.arch.embedded
Subject Re: Makefile or IDE?
Date 2021-12-03 18:27 +0100
Message-ID <sodnhq.4o0.1@stefan.msgid.phost.de> (permalink)
References <soabn8$b4e$1@dont-email.me> <sob040.4rs.1@stefan.msgid.phost.de> <socsnd$4bh$1@dont-email.me>

Show all headers | View raw


Am 03.12.2021 um 11:49 schrieb pozz:
> Il 02/12/2021 17:34, Stefan Reuther ha scritto:
>> Think of make (or ninja) as some sort of (macro-) assembler language of
>> build systems, and add a high-level language on top.
>>
>> CMake seems to be a popular (the most popular?) choice for that language
>> on top, although reasons why it sucks are abundant; the most prominent
>> for me being that the Makefiles it generates violate pretty much every
>> best practice and therefore are slow. Other than that, it can build
>> embedded software of course.
>>
>> You'll eventually need another meta-build system on top to build the
>> projects that form your system image (busybox? openssl? dropbear?
>> linux?), you'll not port their build systems into yours.
> 
> It's very difficult to choose the build system today to study and use.
> 
> make, Cmake/make, Cmake/ninja, Meson, Scons, ...
> 
> What do you suggest for embedded projects? Of course I use
> cross-compiler for the target (mainly arm-gcc), but also host native
> compiler (mingw on Windows and gcc on Linux) for testing and simulation.

Same here.

At work, we use cmake/make for building (but if you have cmake, it
doesn't matter whether there's make or ninja below it). That's pretty
ok'ish for turning a bunch of source code files into an executable;
probably not so good for doing something else (e.g. rendering images for
documentation and your device's UI).

Personally, I generate my Makefiles (or build.ninja files) with a
homegrown script; again, based on the assumption that make is an
assembler that needs a high-level language on top.

However, building your code isn't the whole story. Unless you have a
huge monorepo containing everything you ever did, you'll have to check
out different things, and you will have dependencies between projects,
some even conditional (maybe you don't want to build your unit test
infrastructure when you make a release build for your target? maybe you
want a different kernel version when building an image for a v2 board
vs. a v1 board?).

I use a tool called 'bob' <https://github.com/BobBuildTool/bob> as the
meta-build system for that, at work and personally. It started out as an
in-house tool so it surely isn't industry standard, needs some planning,
and then gets the job done nicely. It invokes the original build process
of the original subprojects, be it cmake-based or autotools-based. The
people who build (desktop or embedded) Linux distributions all have some
meta-build system to do things like that, and I would assume neither of
them is easy to set up, just because the problem domain is pretty complex.


  Stefan

Back to comp.arch.embedded | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Makefile or IDE? pozz <pozzugno@gmail.com> - 2021-12-02 12:46 +0100
  Re: Makefile or IDE? Grant Edwards <invalid@invalid.invalid> - 2021-12-02 15:22 +0000
    Re: Makefile or IDE? pozz <pozzugno@gmail.com> - 2021-12-02 17:34 +0100
      Re: Makefile or IDE? Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2021-12-03 13:15 +0200
  Re: Makefile or IDE? Don Y <blockedofcourse@foo.invalid> - 2021-12-02 09:48 -0700
  Re: Makefile or IDE? Stefan Reuther <stefan.news@arcor.de> - 2021-12-02 17:34 +0100
    Re: Makefile or IDE? pozz <pozzugno@gmail.com> - 2021-12-03 11:49 +0100
      Re: Makefile or IDE? Stefan Reuther <stefan.news@arcor.de> - 2021-12-03 18:27 +0100
    Re: Makefile or IDE? George Neuner <gneuner2@comcast.net> - 2021-12-04 14:37 -0500
  Re: Makefile or IDE? Theo <theom+news@chiark.greenend.org.uk> - 2021-12-03 20:51 +0000
    Re: Makefile or IDE? Grant Edwards <invalid@invalid.invalid> - 2021-12-03 21:28 +0000
      Re: Makefile or IDE? George Neuner <gneuner2@comcast.net> - 2021-12-04 14:53 -0500
        Re: Makefile or IDE? David Brown <david.brown@hesbynett.no> - 2021-12-04 22:17 +0100
          Re: Makefile or IDE? Stefan Reuther <stefan.news@arcor.de> - 2021-12-05 11:02 +0100
            Re: Makefile or IDE? David Brown <david.brown@hesbynett.no> - 2021-12-05 13:16 +0100
        Re: Makefile or IDE? Grant Edwards <invalid@invalid.invalid> - 2021-12-06 13:52 +0000
          Re: Makefile or IDE? chris <chris-nospam@tridac.net> - 2021-12-17 17:19 +0000
  Re: Makefile or IDE? pozz <pozzugno@gmail.com> - 2021-12-03 23:48 +0100
    Re: Makefile or IDE? Stefan Reuther <stefan.news@arcor.de> - 2021-12-04 10:31 +0100
      Re: Makefile or IDE? pozz <pozzugno@gmail.com> - 2021-12-04 16:23 +0100
        Re: Makefile or IDE? David Brown <david.brown@hesbynett.no> - 2021-12-04 17:41 +0100
          Re: Makefile or IDE? Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2021-12-04 18:49 +0200
            Re: Makefile or IDE? David Brown <david.brown@hesbynett.no> - 2021-12-04 18:23 +0100
              Re: Makefile or IDE? Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2021-12-04 21:25 +0200
                Re: Makefile or IDE? David Brown <david.brown@hesbynett.no> - 2021-12-04 22:20 +0100
                Re: Makefile or IDE? Grant Edwards <invalid@invalid.invalid> - 2021-12-06 13:51 +0000
                Re: Makefile or IDE? David Brown <david.brown@hesbynett.no> - 2021-12-06 16:33 +0100
                Re: Makefile or IDE? Grant Edwards <invalid@invalid.invalid> - 2021-12-06 16:02 +0000
          Re: Makefile or IDE? pozz <pozzugno@gmail.com> - 2021-12-09 11:54 +0100
            Re: Makefile or IDE? Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2021-12-10 18:35 +0100
              Re: Makefile or IDE? David Brown <david.brown@hesbynett.no> - 2021-12-10 19:44 +0100
                Re: Makefile or IDE? pozz <pozzugno@gmail.com> - 2021-12-11 16:18 +0100
                Re: Makefile or IDE? David Brown <david.brown@hesbynett.no> - 2021-12-11 17:06 +0100
                Re: Makefile or IDE? Grant Edwards <invalid@invalid.invalid> - 2021-12-11 16:57 +0000
                Re: Makefile or IDE? Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2021-12-11 18:53 +0100
                Re: Makefile or IDE? David Brown <david.brown@hesbynett.no> - 2021-12-12 14:15 +0100
              Re: Makefile or IDE? Stefan Reuther <stefan.news@arcor.de> - 2021-12-11 10:01 +0100
                Re: Makefile or IDE? Hans-Bernhard Bröker <HBBroeker@t-online.de> - 2021-12-11 18:47 +0100
                Re: Makefile or IDE? Stefan Reuther <stefan.news@arcor.de> - 2021-12-12 11:27 +0100
        Re: Makefile or IDE? Stefan Reuther <stefan.news@arcor.de> - 2021-12-05 11:11 +0100
          Re: Makefile or IDE? David Brown <david.brown@hesbynett.no> - 2021-12-05 13:21 +0100
  Re: Makefile or IDE? Dave Nadler <drn@nadler.com> - 2021-12-06 15:45 -0500
  Re: Makefile or IDE? pozz <pozzugno@gmail.com> - 2021-12-09 10:43 +0100
  Re: Makefile or IDE? Johann Klammer <klammerj@NOSPAM.a1.net> - 2021-12-10 09:30 +0100
  Re: Makefile or IDE? chris <chris-nospam@tridac.net> - 2021-12-17 17:27 +0000
    Re: Makefile or IDE? StateMachineCOM <statemachineguru@gmail.com> - 2021-12-20 17:18 -0800
      Re: Makefile or IDE? chris <chris-nospam@tridac.net> - 2021-12-21 16:45 +0000
      Re: Makefile or IDE? Jim Jackson <jj@franjam.org.uk> - 2021-12-21 17:40 +0000
        Re: Makefile or IDE? StateMachineCOM <statemachineguru@gmail.com> - 2021-12-21 10:55 -0800

csiph-web