This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Directory dependent includes (deep package)
- To: automake@gnu.org
- Subject: Directory dependent includes (deep package)
- From: Matt Armstrong <matt@lickey.com>
- Date: Tue, 22 Jun 1999 22:38:09 -0900
I've got a package that can be built with Gnome/GTK or Motif (and
there is even fledgling code in there for KDE/QT). I have some
questions about how I should handle this, both from a "what do I pass
the compiler" point of view and a "what source files get compiled"
point of view.
Right now I have a few ./configure time flags --with-gnome-toolkit and
--with-motif-toolkit. In Makefile.am I'm doing stuff like this to
include the toolkit specific source files in the compile:
if WITH_MOTIF_TOOLKIT
TOOLKIT_SRCS = table-motif.c combocell-motif.c
TOOLKIT_INCLUDE = -I@top_srcdir@/lib/ComboBox-1.33\
-I@top_srcdir@/lib/Xbae-4.6.2-linas @X_CFLAGS@
else
if WITH_GNOME_TOOLKIT
TOOLKIT_SRCS = table-gtk.c combocell-gtk.c
TOOLKIT_INCLUDE = @GNOME_INCLUDEDIR@
-I@top_srcdir@/lib/${GTKSHEET_DIR}
else
if WITH_KDE_TOOLKIT
TOOLKIT_SRCS = table-qt.cpp combocell-qt.cpp
TOOLKIT_INCLUDE = FIXME
endif
endif
endif
It is a deep package with each dir being built into a library, so the
above example is continued by:
libregister_a_SOURCES = basiccell.c cellblock.c datecell.c pricecell.c \
QuickFill.c quickfillcell.c recncell.c splitreg.c \
table-allgui.c table-html.c textcell.c $(TOOLKIT_SRCS)
#
# Objects added via configure according to the target build.
#
libregister_a_LIBADD = $(TOOLKIT_SRCS)
INCLUDES = \
-I@top_srcdir@/src \
-I@top_srcdir@/include \
-I@top_srcdir@/src/engine \
$(TOOLKIT_INCLUDE)
--------------------------------------------------------------
Questions:
Is INCLUDES the correct way to add compile time flags like
@X_CFLAGS@??
Am I going about it the right way to built each directory of the deep
package into a library? If not, how best can I compile groups of code
with different sets of compile time flags? (for example, this package
has some code that should remain completely GUI independent -- I would
like to avoid having that code compiled with GTK or Motif include dirs
as a way of maintaining that invariant)
I'm new to automake, so any suggestions are welcome!
P.S. I'm using automake 1.4 and would like to stay away from using the
latest CVS.