[Top][All Lists]

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

Re: need help in "deep" project ..

From: Ralf Wildenhues
Subject: Re: need help in "deep" project ..
Date: Tue, 3 Jul 2007 19:36:20 +0200
User-agent: Mutt/1.5.15 (2007-05-20)

* Roberto Alejandro Espí Muñoz wrote on Tue, Jul 03, 2007 at 07:11:43PM CEST:
> AC_INIT([/src/main.cpp])

Please remove the leading slash:

Also note that there is a new form of AC_INIT/AM_INIT_AUTOMAKE,
used and explained in the manual:

> AM_INIT_AUTOMAKE([hmi], [0.3])
>    Makefile
>    src/Makefile
>    src/Base/Makefile
>    src/Cairo/Makefile
>    src/Commands/Makefile
>    src/Draw/Makefile
>    src/Events/Makefile
>    src/IO/Makefile
>    src/Middleware/Makefile
>    src/RIPC/Makefile
>    src/Utils/Makefile
>     ])
> My
> Here I defined my compile and link flags.
> SUBDIRS = src

> bin_PROGRAMS = main
> hmi_SOURCES = src/main.cpp

Two points here: if your program is to be called hmi, then above should
  bin_PROGRAMS = hmi

if it is to be called 'main', then above should be
  main_SOURCES = ...

but since you seem to build the thing in the src/ subdirectory, I would
not specify either of these lines here, but all in src/

> AM_CXXFLAGS = -I/usr/include/gtkmm-2.4 -I/usr/lib/gtkmm-2.4/include
> -I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include
> AM_LDFLAGS = -lglademm-2.4 -lgtkmm-2.4 -lglade-2.0 -lgdkmm-2.4 -latkmm-1.6 
> -
> -lboost_thread -lboost_signals

Both of these settings apply only to the in which you put
them, so you should put them in src/ if that's where they are
needed, or in an "include"d file if you need them in several Makefiles;
but actually I would not set them at all in a have some
test in that computes them (and lets the user override them
with options to configure).  Probably these packages use pkg-config
which can help you find out suitable values portably.

> My src/
> SUBDIRS = Base Cairo Commands Draw Events IO Middleware RIPC Utils
> bin_PROGRAMS = hmi
> hmi_SOURCES = main.cpp

Again, you need the "bin_PROGRAMS = hmi" line only in one

> Now, the question is.  What do I put in my Base/,

Start with empty files.  Go on from there, adding settings and rules for
stuff you want to get working.

Hope that helps.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]