Thread: Getting Automake/Autoconf to compile C

  1. #1
    Registered User
    Join Date
    Apr 2012
    Location
    Cwmbran, South Wales
    Posts
    18

    Getting Automake/Autoconf to compile C

    Hi guys,

    I'm having trouble with getting my head around automake and autoconf.

    I've read that both tools are good, and I want to make use of them with what I'm trying to develop.

    I'm learning C, and I'm writing an OS as my learning platform, but I'm doing it by writing my own version of the linux kernel. But I want to be able to compile and link the source code quickly and not so painfully, and this is where automake and autoconf come in.

    I've been told that it needs a makefile.in and makefile.am, and also configure.ac etc...

    Now I can set up the configure.ac, it's headerfiles, but when it comes to the makefile.am/.in I haven't got a clue ( as I have been relying on IDE's to do the work for me )

    Does anyone know how I could achieve this? And also be able to add new subdirs to the project while I go along?

    Here's my structure at the moment:
    Code:
    Root_Dir
      |
     boot    fs    include    init    kernel    lib    mm    tools
                      |
    multiboot    asm    linux    sys
    All source files reside in all of the sub dirs, and the header files mostly reside in the include file. My main source file resides in the init directory.

    I hope you guys are able to help.

    Jamie
    Last edited by Jamie_Edwards; 07-13-2012 at 08:12 AM.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    I think it would be a lot easier for the moment to stick with regular make.

    Until you're ready to distribute your code to a range of platforms, the "auto" features aren't going to buy you a lot.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Apr 2012
    Location
    Cwmbran, South Wales
    Posts
    18
    Quote Originally Posted by Salem View Post
    I think it would be a lot easier for the moment to stick with regular make.

    Until you're ready to distribute your code to a range of platforms, the "auto" features aren't going to buy you a lot.
    hmm, I guess your right, but even so this information would still useful for when, and if I ever get to distribute the code.

    Or for any other project I decide to have a go at for that matter :L

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    True, but do you need to learn so many things in parallel?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  5. #5
    Registered User
    Join Date
    Apr 2012
    Location
    Cwmbran, South Wales
    Posts
    18
    Quote Originally Posted by Salem View Post
    True, but do you need to learn so many things in parallel?
    I'm trying not to, in respect of the OS, once I've completed a source, for arguments sake, the FileSystem, I'll then implement that into my own version of main, compile and run it, and do the same then for memory management.

    As for the automake/autoconf I'm not needing to learn how to do it, more of having a template that I can then use on any project, and changing any fields that need changed etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. autoconf endian test
    By Scramble in forum Linux Programming
    Replies: 1
    Last Post: 03-11-2011, 08:23 AM
  2. automake does not create Makefile.in
    By useless79 in forum Tech Board
    Replies: 0
    Last Post: 02-20-2011, 04:05 AM
  3. Autoconf help
    By tpe in forum Linux Programming
    Replies: 6
    Last Post: 12-02-2010, 02:32 PM
  4. Error Using Autoconf in Cygwin
    By Tonto in forum Tech Board
    Replies: 13
    Last Post: 09-22-2007, 04:14 PM
  5. automake alternatives
    By bludstayne in forum Tech Board
    Replies: 1
    Last Post: 01-04-2004, 02:15 PM