autotools / makefile.in woes
I'm struggling through learning autotools to convert my project from static makefiles and I'm almost there.
I've got everything working except for a proper makefile.in right now it's just a copy of my original makefile. My issue now is i have no clue what variables from autotools i'm supposed to use (such as where to put the binary or project assets, or what variables are called for the ldflags or cflags etc made by ./configure. I've looked at roughly 10 sites and they all either seem to be out of date or go into way too much detail and I get lost. I guess i'm looking for either a basic tutorial (but not excessively so - most of the tutorials i've found dont even mention the makefile.in) or a function-list style thing for the standard vars created by autotools for use in the makefile. Thank you. |
Quote:
|
Also, a good source of information about this stuff is Autobook.
|
thanks for the replies. and sorry about the typo on makefile.in - i did mean .am
I'll take a look at the book, but as I mentioned in my original post I'm really looking for something that's not amazingly basic, but also not an entire books worth of information I want something that says "hey, with a mostly basic configure.ac that just checks for the necessary libraries and names the project here are the vars you use in makefile.am for compiler, linker flags, what directories to install in, etc" hopefully something along these lines exists thanks |
Makefile.am is actually the simple part and configure.ac is the more complex one. Really all a Makefile.am is a list of what to build, what files it needs, what compile and link options it takes, what (in addition to dependencies) it should include in a distro package, and what subdirectories to go into. info automake should help out, as well as libtool and autoconf. It took me forever just to be patient enough to learn them (because the docs all reference each other) but it's fairly simple once you get the basics. There are also a few make rules you can define to be executed at (un)install time.
Automake will generate a Makefile.in, which is a template makefile, from your Makefile.am. Autoconf will make a ./configure based on your configure.ac, which tells it which options to build that script with. When ./configure is run, it inserts the results of its tests into the generated Makefile.in to create a real makefile. ta0kira |
All times are GMT -5. The time now is 12:21 PM. |