[Top][All Lists]

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

Re: build package in sub folder not finding main

From: Ralf Wildenhues
Subject: Re: build package in sub folder not finding main
Date: Mon, 9 Jan 2006 15:42:33 +0100
User-agent: Mutt/1.5.9i

This is an automake question.  Please remove the autoconf list from
replies.  Thank you.

* Matt Hull wrote on Sat, Jan 07, 2006 at 11:02:09PM CET:
> i have a simple hello world i am trying to get working.  i have:
> src/main.c
> src/gtk/gtkmain.c
> src/gtk/gtkmain.h
> i almost got it working except that when it tries to build gtkmain it
> fails with undefined reference to main.  looks like its trying to build a
> final appllication and link it together.  but the gtkmain is only enabled
> when the user selects it from configure as such:

> how can i build the dependencies without linking ?

Just put

  bin_PROGRAMS = mine
  mine_SOURCES = main.c gtk/gtk.c gtk/gtk.h

in src/

If you're dying to have another Makefile in src/gtk, you can create a
library as an intermediate step (add AC_PROG_RANLIB in

bin_PROGRAMS = mine
mine_SOURCES = main.c
mine_LDADD = gtk/libgtkstuff.a

src/gtk/ has
noinst_LIBRARIES = libgtkstuff.a
libgtkstuff_a_SOURCES = gtk.c gtk.h

But I really recommend the first variant.


reply via email to

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