Re: automake



On Fri, Jan 21, 2005 at 02:22:21AM +0100, Antonio Coralles <noche suapie reflex at> 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
Also have a look at Murrays autotools tutorials
http://www.openismus.com/documents/linux/automake/automake.shtml

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!

> 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

Regards,
Andreas Pokorny

Attachment: pgpastyaqsEgr.pgp
Description: PGP signature



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