automake
[Top][All Lists]
Advanced

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

Makefiles and libraries problem


From: Matí­as Alejandro Torres
Subject: Makefiles and libraries problem
Date: Wed, 11 Apr 2007 20:40:30 -0300
User-agent: Thunderbird 1.5.0.10 (X11/20070306)

Hi,

I'm a complete newbie with making automake makefiles. Before writing to this list I read the manual , I tried to look at source codes but I can't get things done.

Lets say i have a program i want to build and two libraries that resides in the same tarball, this is what the program structure looks:

src:
   Source code *.c *.h      #binary

   database/   #This should be a shared library.
   gtk/            #This should be a shared library.


The command `make` throws an error when trying to build the database directory that says that there is no rule to build the objective `all`


The three makefiles  follow


******************************
The Makefile.am file in the src directory:
******************************

## Process this file with automake to produce Makefile.in

SUBDIRS = database gtk

INCLUDES = \
   -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
   -DPACKAGE_SRC_DIR=\""$(srcdir)"\" \
   -DPACKAGE_DATA_DIR=\""$(datadir)"\" \
   $(PACKAGE_CFLAGS)

AM_CFLAGS =\
    -Wall\
    -g

bin_PROGRAMS = contacts

contacts_SOURCES = \
   callbacks.c\
   category.c\
   category.h\
   comparefunctions.c\
   comparefunctions.h\
   contact.c\
   contact.h\
   contacts.c\
   controllerfunctions.c\
   controllerfunctions.h\
   datefunctions.c\
   datefunctions.h\
   support.h\
   types.h

contacts_LDFLAGS =

contacts_LDADD = $(PACKAGE_LIBS)

EXTRA_DIST =


******************************
The Makefile.am in the database/ directory (a library)
******************************

contactsdb_la_SOURCES = idatabase.c\
   idatabase.h\
   sqlitedatabase.c\
   sqlitedatabase.h

lib_LTLIBRARIES = libcontactsdb.la


******************************
The Makefile.am in the gtk/ directory (a library)
******************************
contactsgui_la_SOURCES = aboutdialog.c \
   aboutdialog.h \
   calendarentry.c \
   calendarentry.h \
   categorybox.c \
   categorybox.h \
   categorycontroller.c \
   categorycontroller.h \
   categorymodel.c \
   categorymodel.h \
   contactbox.c \
   contactbox.h \
   contactcontroller.c \
   contactcontroller.h \
   contactmodel.c \
   contactmodel.h \
   contactwindow.c \
   contactwindow.h \
   menubar.c \
   menubar.h \
   optionbox.c \
   optionbox.h \
   toolbar.c \
   toolbar.h

lib_LTLIBRARIES = libcontactsgui.la





reply via email to

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