简体   繁体   中英

Using the Linux kernel make system for userspace tools

I've seen several projects for userspace tools (though I cannot, unfortunately, seem to remember which ones at this time) which appear to be reusing the Linux kernel make-system, as evidenced by the similarity in build messages:

  CC       foo1.o
  CC       foo2.o
  LINK     foo

You know.

Is there any "well-known" procedure for doing so? Is there some standard repository of makefiles and such that can be reused in a well-defined manner to do this? I've tried googling around about it, but I can't seem to find anything.

The Linux kernel build system is pretty mission specific. I'm not sure of any projects that leverage it.

Many projects use autotools -- automake and autoconf -- to handle building. If you've ever run ./configure to build a project, you've encountered them. It turns out that automake generated Makefiles have a mode for emitting the "Linux-style" build messages: make V=0 .

This can be set to be the default behavior: https://www.gnu.org/software/automake/manual/html_node/Automake-silent_002drules-Option.html

You can certainly use autotools for your own projects. A good starter guide is here:

http://smalltalk.gnu.org/blog/bonzinip/all-you-should-really-know-about-autoconf-and-automake

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM