Gentoo Archives: gentoo-user

From: "Rafael Fernández López" <info@××××××××××××××××××.com>
To: gentoo-user@l.g.o
Cc: Zac Slade <krakrjak@××××××××××.net>
Subject: Re: [gentoo-user] [OT] AUTOTOOLS
Date: Mon, 20 Feb 2006 18:41:08
Message-Id: 200602201945.40091.info@maestroprogramador.com
In Reply to: Re: [gentoo-user] [OT] AUTOTOOLS by Zac Slade
1 Sorry but my english got worst (you know, 'if you don't use it, you lose
2 it').
3
4 I'll start again and maybe you'll understand me better: My problem is that
5 I've been downloading some QT apps (KDE apps) to know how autotools code is
6 written (I read the manual, but I need some practising or reading code). All
7 'big' apps that could have some strange structure (like amaroK) that I've
8 downloaded have been written through KDevelop help, and I don't want an
9 automatic Makefile. I'll use IDE's when I know how to write it by my own.
10
11 So, as I've seen, KDevelop copies all files (*.cpp, *.h and *.ui) to src
12 path. Well, I'm pretty organized, and I like to have src/gui for *.ui files
13 for example. All Makefile.am that I've seen suppose that all sources and *.ui
14 files are in src, so they have something like:
15
16 bin_PROGRAMS = amarokapp
17
18 SUBDIRS = \
19 amarokcore \
20 $(SQLITE_SUBDIR) \
21 analyzers \
22 [...]
23
24
25 INCLUDES = \
26 -I$(top_builddir)/amarok/src/amarokcore \
27 [...]
28
29 amarokapp_SOURCES = \
30 Options1.ui \
31 Options2.ui \
32 Options4.ui \
33 Options5.ui \
34 Options7.ui \
35 Options8.ui \
36 actionclasses.cpp \
37 app.cpp \
38 [...]
39
40 METASOURCES = \
41 AUTO
42
43 Well, in this case it's pretty easy, because all necessary files for building
44 amaroK are on src.
45
46 My question is: If I have a path like src, and inside it I have another
47 directory called gui. (src/gui), then Makefile.am inside src/gui should be
48 like this?
49
50 noinst_LTLIBRARIES = \
51 whatever.la
52
53 noinst_HEADERS = \
54 header1.h \
55 header2.h
56
57 whatever_la_SOURCES = \
58 main.cpp \
59
60 METASOURCES = \
61 AUTO
62
63 With noinst, because my objective is an unique executable file, and no
64 libraries. Would that be correct?
65
66 My problem is that it seems that there is no trouble in compiling process,
67 but it seems that when it is going to link it fails, and it throws me some
68 vtable failures (if you want I can write them here, but I've got some and
69 different, because I've been changing my test code depending on what errors I
70 have been getting).
71
72 Thank you very much,
73 Rafael Fernández López.