Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[OT] GNU Autoconf und Automake
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum
View previous topic :: View next topic  
Author Message
dot
Guru
Guru


Joined: 05 May 2003
Posts: 335
Location: Germany

PostPosted: Thu May 20, 2004 7:33 pm    Post subject: [OT] GNU Autoconf und Automake Reply with quote

Hallo,

ich hab da ein paar fragen, weil ich gerade für mein Spiel ein Buildtool brauche, damit
man das einfach und schnell durchkompilieren kann.
Wenn ich z.B. folgende Struktur habe:
Code:

/Makefile.am
/main.c
/main.h
/particle/particle.c
/particle/particle.h

Und ich folgendes in die Makefile.am schreibe:
Code:
CFLAGS = @CFLAGS@
bin_PROGRAMS = y
y_SOURCES = main.c particle/particle.c

Dann erhalte ich beim ausführen von automake folgenden Feher:
Code:
automake: src/Makefile.am: not supported: source file `particle/particle.c' is in subdirectory

Wie kann ich den dann die particle.c richtig kompilieren. Ich hab schon mal versucht, die
particle.c als Library zu kompilieren, aber das ist der absolute mist, weil ich es ja dann
sowieso wieder statisch gegen die main.c linke. Ausserdem habe ich dann ein Problem,
wenn ich jetzt z.B. noch ein Module z.B. Namens loader hinzufüge mit der Datei /loader/loader.c
und im Particlemodule dann funktionen aus dem Loader-Module verwende, muss ich erst
das Module Loader kompilieren und linken und dann das Module particle kompilieren und
dann gegen das Module Loader linken und dann die main.c kompilieren und dann
beide Module linken. Gibt es da nichts besseres?

Flo
Back to top
View user's profile Send private message
pablo_supertux
Advocate
Advocate


Joined: 25 Jan 2004
Posts: 2931
Location: Somewhere between reality and Middle-Earth and in Freiburg (Germany)

PostPosted: Thu May 20, 2004 7:39 pm    Post subject: Reply with quote

Wenn du unterverzeichnisse hast, dann musst du in makefile.am folgendes haben:

Code:

SUBDIRS = subdir1 subdir subdir3


Ohne kommas.
Und in diesen Subdirs auch makefile.am schreiben.

Nicht vergessen, dass in configure.ac auch
Code:

AC_CONFIG_FILES([Makefile
                 subdir1/Makefile
                 subdir2/Makefile... ])

_________________
A! Elbereth Gilthoniel!
silivren penna míriel
o menel aglar elenath,
Gilthoniel, A! Elbereth!
Back to top
View user's profile Send private message
dot
Guru
Guru


Joined: 05 May 2003
Posts: 335
Location: Germany

PostPosted: Thu May 20, 2004 7:44 pm    Post subject: Reply with quote

Hi,

danke, hatte ich vergessen zu posten:
Code:
SUBDIRS = particle

Das steht schon drin :?

Flo
Back to top
View user's profile Send private message
pablo_supertux
Advocate
Advocate


Joined: 25 Jan 2004
Posts: 2931
Location: Somewhere between reality and Middle-Earth and in Freiburg (Germany)

PostPosted: Thu May 20, 2004 7:52 pm    Post subject: Reply with quote

Für mehr Info: http://www.murrayc.com/learning/linux/automake/automake.shtml
_________________
A! Elbereth Gilthoniel!
silivren penna míriel
o menel aglar elenath,
Gilthoniel, A! Elbereth!
Back to top
View user's profile Send private message
dot
Guru
Guru


Joined: 05 May 2003
Posts: 335
Location: Germany

PostPosted: Thu May 20, 2004 7:56 pm    Post subject: Reply with quote

Hallo,

habs gelesen, aber die machen dort genau das, was ich hier machen mit den Bibliotheken,
dann werde ich wohl nicht drum herum kommen, auch zwischen den Modulen zu linken.

Na dann :(

Flo
Back to top
View user's profile Send private message
pablo_supertux
Advocate
Advocate


Joined: 25 Jan 2004
Posts: 2931
Location: Somewhere between reality and Middle-Earth and in Freiburg (Germany)

PostPosted: Thu May 20, 2004 8:00 pm    Post subject: Reply with quote

Dann lese die info pages, die sind gut, ich hab mit denen zusammen mit der andere Seite gelernt.
_________________
A! Elbereth Gilthoniel!
silivren penna míriel
o menel aglar elenath,
Gilthoniel, A! Elbereth!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum