autoconf
[Top][All Lists]
Advanced

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

Re: Need initial Help


From: Andre Caldas
Subject: Re: Need initial Help
Date: Thu, 08 Sep 2005 09:48:01 +0900
User-agent: Debian Thunderbird 1.0.2 (X11/20050602)

Hello!

bindir     = ./bin
srcdir     = ./src
objdir     = ./obj

In autoconf, you don't need to define any of the above.

The variable 'srcdir' means something else in autoconf, and it is defined automatically.

The variable 'objdir' will make no sense because you can separate the source tree and the build tree by running the 'configure' inside the directory obj. (ie: cd obj/ && ../configure)

The variable 'bindir' is also generated for you. But usually you don't really need to use it. (I think it is just './')


And this is working well, So when I tried to use autotools with it

I found in Documentation that I have to put my source code files

in srcdir and which is top_srcdir which in this case c2vcg and

I guess you got this wrong.

With autotools, you will not be defining 'srcdir' or 'top_srcdir'. One way to do things, is to have a Makefile.am in each directory of your project. For example, in your projects top directory:

Makefile.am (only one line)
==========================
SUBDIRS = src doc
==========================

in src: Makefile.am
==========================
bindir_PROGRAMS = your_prog_name
your_prog_name_SOURCES = c2vcg.h  dbugh.c  gramcalls.c  gram.y \
scan.l main.c
==========================

Then, you would have one Makefile for *each* subdirectory in your project. Those Makefiles will be generated by 'configure' in your build tree. When you type make at the 'build' top directory, the Makefiles will be called recursively.

'make all' will cause:
make -C src/ all
make -C doc/ all

The variables 'srcdir', 'top_srcdir', 'builddir', etc are defined automatically for each Makefile in your building tree. So, for src/Makefile, '$(srcdir)' is the same as '$(top_srcdir)/src'


Good luck,
Andre Caldas.




reply via email to

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