Re: automake




If I were you I'd dump the whole make/auto* stuff and go with scons (www.scons.org). A lot better for one's mental health. It's not 'standard' in the Gnome world (yet) but for example Blender uses it. A lot easier if you want to develop cross-platform, as well.


cheers,

roel



Antonio Coralles wrote:
Andreas Pokorny wrote:

On Fri, Jan 21, 2005 at 02:22:21AM +0100, Antonio Coralles <noche suapie reflex at <mailto:>> wrote:

I know that this question doesn't really belong to this mailing list,
but i don't know where to ask instead....
Can somebody tell me whats wrong with this Makefile.am:

LDADD = -lboost_date_time -lsqlite

That wont work properly, you should let configure figure out the proper
linker flags for boost and sqlite. For boost you could use that m4
macro:
http://aspn.activestate.com/ASPN/Mail/Message/2266862


Thanks, I'll try that when the moment the rest is working.

Also have a look at Murrays autotools tutorials
http://www.openismus.com/documents/linux/automake/automake.shtml


Yes, I read that tutorials which are great. But the problem is that I used simple makefiles in my project till now [I started last august], so the directory structure is not really optimal for automake because the directories depend on each other. At first I tried to make static archives in every subdirectory - like Murray suggests in his tutorial. But this resulted in undefined referneces from the linker which partly vanished when I changed the order in which the libs are linked into an executable. This lead me to the assumption [which is propably wrong] that static archives should not contain undefined references. Maybe I should eaven reorganize my code into independent peaces which can be put into a tempory library without problems - but that would be some work, as all the include statements have to be changed than ...


In your position I would create the Makefiles in the subdirectories
like shared and utility. So this Makefile.am would degenerate into a simple:
SUBDIRS=shared utility ....

AM_CPPFLAGS = $(GTKMM_CFLAGS) -Wall -DNO_DB_QUERY -DONE_BEG_PER_DAY
-DNO_LONGER_THAN_HOURS24
################################################################################################ ################################################################################################
S_SHARED = shared/timePeriod.hpp shared/timePeriod.cc
shared/calendar.hpp shared/calendar.cc \
          shared/mem.hpp shared/shiftMemory.hpp shared/copiedPtr.hpp
shared/constants.hpp \
          shared/shared.hpp

[...]

testMem_SOURCES = $(S_TESTUTILS) $(S_SHARED) $(S_HELPERFUNCTIONS)
utility/simpleUtils.cc \
                 shared/tMem.hpp shared/tMem.cc shared/tMemMain.cc

You should not put header files into source variables.
If the source is shared you should consider building static archives
that contains all shared stuff, or a complete library. Keep it simple
and small!


"shared" is just a bad directory name; It means that the classes which live in this dir are the most basic and commonly used in my app - but you are right - static archives would be a good idea [but look above].


Sorry for misusing this mailinglist,

In my opinion you only missued your Makefile.am. I could not track your
problem, that file is just too huge


I guess you are right - just started working with autotools yesterday .... The main reason for that is, besides from the fact that my hand written makefiles are somtimes hard to mantain, that I want to put my prog under the GPL and host it on sourceforge. But before doing so I want to meet at least some standards ...


Regards,
Andreas Pokorny


_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org <mailto:>
http://mail.gnome.org/mailman/listinfo/gtkmm-list



_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list




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