Re: Makefile.am, ./autogen, linking, subdirs and ___NOT___ .a or .la files



First of all, do you know how rude it is to send a message to that many
lists?  It is more likely to get people to ignore you, than help you.

On Thu, 21 Dec 2000, Jarne Cook wrote:

> 
> look every body  ... this is beyond ridiculious
> 
> all I want to do is write a program ... but how can I do that when I cant get
> ./autogen to produce the proper makefiles.
> 
> 
> Could someone tell me exactly how to do the following:
> 
> there is a program called GEditPlus (GEdit+)
> This program is take the nice features that edit plus for windows has ...
> 
> the source tree will have a the following structure
> 
> editor/
>     /src
>         main.c          -- the main file that will produce main.o -> geditplus
>         main.h          -- included by most source files to access the global
>                             struct
>         /menu           -- this directory contains all of the files that deal
>                             with defining and implementing the menus and menu
>                             calls
>             menu.h      -- defines the menubars mainmenu_UI struct, includes
>                             filemenu.h ... helpmenu.h
>             menu.c      -- very little is in here ...
>             filemenu.h  -- defines the file menu and its sub menus, and the
>                             function prototypes
>             filemenu.c  -- implements the functions defined in filemenu.h
>             editmenu.h  -- defines the edit menu and its sub menus, and the
>                             function prototypes
>             editemenu.c -- implements the functions defined in editmenu.h
>                 .
>                 .
>                 .
>             helpmenu.h  -- defines the help menu and the function prototypes
>             helpmenu.c  -- implements the functions defined in helpmenu.h
> 
> Also for each directory (/editor, /editor/src, and /editor/src/menu, ... ) there
> will be a file, among many others, called Makefile.am .   This file is supposed
> to make it easier for the programmer by generating the makefiles (as everybody
> should know).
> 
> now supposing that the Makefile.am contained the correct "directives" and
> produced the proper Makefile to do the job that I want, then I should get the
> following when I type make (assuming that the source files have no syntactic
> errors):
> 
> gcc will compile editor/src/menu/filemenu.c and produce
> editor/src/menu/filemenu.o
> 
> gcc will compile editor/src/menu/editemenu.c and produce
> editor/src/menu/editmenu.o
>                             .
>                             .
>                             .
> gcc will compile editor/src/menu/helpmenu.c and produce
> editor/src/menu/helpmenu.o
> 
> gcc will compile editor/src/menu/menu.c and link with filemenu.o, editmenu.o,
> ..., helpmenu.o and produce editor/src/menu/menu.o
> 
> gcc will compile editor/src/main.c and and link with editor/src/menu/menu.o and
> produce editor/src/main.o
> 
> gcc will convert/compile (whatever it's called) main.o into geditplus
> 
> 
> now we have ONE(1) executable file (and no libraries) that will run the program
> 
> you should notice that there is NO .a file, anywhere, ever, nowhere.  You got
> that? Nowhere!

What is wrong with producing a static library as part of the compile?  The
static library doesn't need to be installed as part of the build.  It is
just an intermediate file like object files are.

> 
> so after all that someone please tell me please what is supposed to go in the
> Makefile.am files in the /src directory and the /src/menu directory

People did tell you what to do, and gave examples you could use as a
guide.  Creating a non installed static library is the solution
mentioned in the automake manual.  So far, you have chosen to ignore the
help people have provided.

James.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]