CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2010
    Posts
    140

    I need help with makefiles

    Can someone please explain the concept behind the make process for Linux kernels.

    Many distros - among them Redhat, Fatdog, etc.., use a "tree" structure with a Makefile and some KConfig (for kernel config I assume) in each directory.

    This means that if I navigate to a directory and type make somedriver.ko, it errors with:

    make: *** No rule to make target 'somedriver.ko'. Stop.

    My driver will have about a half dozen or so .c files and a .asm file. It's not large. I would like though, to simply use
    the existing make process. How do the rules for the build get in there? What process did the designer of the
    make process envision, and is this documented somewhere?

    Thank you.

  2. #2
    Join Date
    Nov 2010
    Posts
    140

    Re: I need help with makefiles

    I have now found the build flags in the directory a few above my drivers, in the 3.10.0-327.el7.x86_64 direcdtory.

    It starts with VERSION = 3
    PATCHLEVE = 10, etc..

    So perhaps I just need to navigate to that directory and run the make.

  3. #3
    Join Date
    Nov 2010
    Posts
    140

    Re: I need help with makefiles

    If I run the command make help, it gives a recipe for how to navigate to a directory in the make, as in make dir/....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured