[cgma-dev] r2185 - in cgm/trunk: . itaps
kraftche at mcs.anl.gov
kraftche at mcs.anl.gov
Wed Oct 29 16:07:27 CDT 2008
Author: kraftche
Date: 2008-10-29 16:07:27 -0500 (Wed, 29 Oct 2008)
New Revision: 2185
Modified:
cgm/trunk/Makefile.am
cgm/trunk/cgm.make.in
cgm/trunk/configure.in
cgm/trunk/itaps/Makefile.am
cgm/trunk/itaps/iGeom-Defs.inc.in
Log:
fix broken makefile stubs
Modified: cgm/trunk/Makefile.am
===================================================================
--- cgm/trunk/Makefile.am 2008-10-29 19:49:31 UTC (rev 2184)
+++ cgm/trunk/Makefile.am 2008-10-29 21:07:27 UTC (rev 2185)
@@ -12,10 +12,6 @@
lib_LTLIBRARIES = libcgm.la
-EXT_LINK_FLAGS =
-EXT_LIBTOOL_FLAGS =
-EXT_LIBS =
-EXT_INCLUDE =
if build_parallel
CGM_ll_LIB = geom/parallel/libcubit_parallel.la
else
@@ -23,19 +19,12 @@
endif
if build_ACIS
CGM_ACIS_LIB = $(CGM_ll_LIB) geom/ACIS/libcubit_ACIS.la
- EXT_LINK_FLAGS += -L$(ACIS_LIB_DIR)
- EXT_LIBTOOL_FLAGS += -R$(ACIS_LIB_DIR)
- EXT_LIBS += $(ACIS_LIBS)
- EXT_INCLUDE += $(ACIS_INCLUDES) $(ACIS_DEFINES)
+
else
CGM_ACIS_LIB =
endif
if WITH_OCC
CGM_OCC_LIB = geom/OCC/libcubit_OCC.la
- EXT_LINK_FLAGS += -L$(OCC_LIB_DIR)
- EXT_LIBTOOL_FLAGS += -R$(OCC_LIB_DIR)
- EXT_LIBS += $(OCC_LIBS)
- EXT_INCLUDE += $(OCC_INC_FLAG)
else
CGM_OCC_LIB =
endif
@@ -51,17 +40,12 @@
geom/libcubit_geom.la \
util/libcubit_util.la
else
- CORE_CGM_LIBS = $(CUBIT_LTFLAGS) $(CUBIT_LDFLAGS) $(CUBIT_LIBS)
- EXT_LINK_FLAGS += $(CUBIT_LDFLAGS)
- EXT_LIBTOOL_FLAGS += $(CUBIT_LTFLAGS)
+ CORE_CGM_LIBS =
endif
-libcgm_la_LIBADD = init/libcgma_init.la \
- $(CORE_CGM_LIBS) \
- $(EXT_LINK_FLAGS) \
- $(EXT_LIBS)
+libcgm_la_LIBADD = init/libcgma_init.la $(CORE_CGM_LIBS) $(CGM_EXT_LINK)
libcgm_la_SOURCES =
@@ -73,9 +57,6 @@
# directory until we're doing the install.
CFG_FILE = $(DESTDIR)$(cfgdir)/cgm.make
install-data-hook:
- echo "CGM_EXT_INCLUDE = $(EXT_INCLUDE)" >> $(CFG_FILE)
- echo "CGM_EXT_LIBS = $(EXT_LIBS)" >> $(CFG_FILE)
- echo "CGM_EXT_LDFLAGS = $(EXT_LINK_FLAGS)" >> $(CFG_FILE)
- echo "CGM_EXT_LTFLAGS = $(EXT_LIBTOOL_FLAGS)" >> $(CFG_FILE)
- echo "CGM_LIBDIR = $(libdir)" >> $(CFG_FILE)
- echo "CGM_INCLUDEDIR = $(includedir)" >> $(CFG_FILE)
+ echo "CGM_INT_INCLUDE = -I$(includedir)" >> $(CFG_FILE)
+ echo "CGM_INT_LDFLAGS = -L$(libdir)" >> $(CFG_FILE)
+ echo "CGM_INT_LTFLAGS = -R$(libdir)" >> $(CFG_FILE)
Modified: cgm/trunk/cgm.make.in
===================================================================
--- cgm/trunk/cgm.make.in 2008-10-29 19:49:31 UTC (rev 2184)
+++ cgm/trunk/cgm.make.in 2008-10-29 21:07:27 UTC (rev 2185)
@@ -11,24 +11,33 @@
#
#==================================================================
-# The following variables are overridden when this file is installed
-CGM_EXT_INCLUDE =
-CGM_EXT_LIBS =
-CGM_EXT_LDFLAGS =
-CGM_EXT_LTFLAGS =
-CGM_INCLUDEDIR = @abs_srcdir@
-CGM_LIBDIR = @abs_builddir@/.libs
+# The following are initialized here for a non-installed CGM.
+# These values will be overridden when this file is installed.
+CGM_INT_LDFLAGS = -L at abs_top_builddir@/.libs
+CGM_INT_LTFLAGS = -R at abs_top_builddir@/.libs
+CGM_INT_INCLUDE = -I at abs_top_srcdir@ \
+ -I at abs_top_srcdir@/util \
+ -I at abs_top_builddir@/util \
+ -I at abs_top_srcdir@/init \
+ -I at abs_top_builddir@/init \
+ -I at abs_top_srcdir@/geom \
+ -I at abs_top_builddir@/geom \
+ -I at abs_top_srcdir@/geom/ACIS \
+ -I at abs_top_srcdir@/geom/virtual \
+ -I at abs_top_srcdir@/geom/facet \
+ -I at abs_top_srcdir@/geom/facetbool \
+ -I at abs_top_srcdir@/geom/Cholla
# Pre-processor flags
CGM_DEFINES = @CANT_USE_STD@ @CANT_USE_STD_IO@ @TEMPLATE_DEFS_INCLUDED@
-CGM_INCLUDES = $(CGM_EXT_INCLUDE) -I$(CGM_INCLUDEDIR)
+CGM_INCLUDES = @CGM_EXT_INCLUDE@ $(CGM_INT_INCLUDE)
CGM_CPPFLAGS = $(CGM_DEFINES) $(CGM_INCLUDES)
# Link flags
-CGM_LDFLAGS = -L$(CGM_LIBDIR) $(CGM_EXT_LDFLAGS)
-CGM_LTFLAGS = -R$(CGM_LIBDIR) $(CGM_EXT_LTFLAGS)
-CGM_LIBS = -lcgm $(CGM_EXT_LIBS)
-CGM_LIBS_LINK = $(CGM_LDFLAGS) $(CGM_LIBS)
+CGM_LIBS = -lcgm @CGM_EXT_LIBS@
+CGM_LDFLAGS = $(CGM_INT_LDFLAGS) @CGM_EXT_LDFLAGS@
+CGM_LTFLAGS = $(CGM_INT_LTFLAGS) @CGM_EXT_LTFLAGS@
+CGM_LIBS_LINK = $(CGM_LTFLAGS) $(CGM_LIBS)
# Build-generated values appended after this line
Modified: cgm/trunk/configure.in
===================================================================
--- cgm/trunk/configure.in 2008-10-29 19:49:31 UTC (rev 2184)
+++ cgm/trunk/configure.in 2008-10-29 21:07:27 UTC (rev 2185)
@@ -60,7 +60,15 @@
AC_SUBST(TEMPLATE_DEFS_INCLUDED)
AM_CONDITIONAL(INCLUDE_TEMPLATE_DEFS, test x$TEMPLATE_DEFS_INCLUDED != x)
+################################################################################
+# Define variables for linking
+################################################################################
+AC_SUBST(CGM_EXT_LIBS)
+AC_SUBST(CGM_EXT_LDFLAGS)
+AC_SUBST(CGM_EXT_LTFLAGS)
+AC_SUBST(CGM_EXT_INCLUDE)
+
################################################################################
# Use Cubit shared libraries
################################################################################
@@ -123,9 +131,9 @@
if test "x$CUBIT_LIBS" = "xno"; then
AC_MSG_ERROR("Cubit library not found in $CUBIT_BIN_DIR")
fi
- CGM_LIBS_LINK='$(CUBIT_LDFLAGS) $(CUBIT_LIBS)'
- CGM_LIBS_FILES='$(CUBIT_FILE)'
- CGM_LIBS_LTFLAGS="$CGM_LIBS_LTFLAGS $CUBIT_LTFLAGS"
+ CGM_EXT_LIBS="$CGM_EXT_LIBS $CUBIT_LIBS"
+ CGM_EXT_LDFLAGS="$CGM_EXT_LDFLAGS $CUBIT_LDFLAGS"
+ CGM_EXT_LTFLAGS="$CGM_EXT_LTFLAGS $CUBIT_LTFLAGS"
CUBIT_CGM="-DCUBIT_CGM"
dnl AC_DEFINE( HAVE_ACIS, "Have CGM ACIS Implementation" )
HAVE_ACIS_DEF=-DHAVE_ACIS
@@ -137,9 +145,6 @@
AC_SUBST(CUBIT_LIBS)
AC_SUBST(CUBIT_FILE)
AC_SUBST(CUBIT_CGM)
-AC_SUBST(CGM_LIBS_LINK)
-AC_SUBST(CGM_LIBS_FILES)
-AC_SUBST(CGM_LIBS_LTFLAGS)
AM_CONDITIONAL(BUILD_CGM,[test x"$CUBIT_DIR" == x"no"])
@@ -200,7 +205,9 @@
ACIS_HEALER="-DACIS_HEALER"
ACIS_INCLUDES="-I$ACIS_DIR/include"
ACIS_LTFLAGS="-R$ACIS_LIB_DIR"
- CGM_LIBS_LTFLAGS="$CGM_LIBS_LTFLAGS $ACIS_LTFLAGS"
+ CGM_EXT_LIBS="$CGM_EXT_LIBS $ACIS_LIBS"
+ CGM_EXT_LDFLAGS="$CGM_EXT_LDFLAGS $ACIS_LINK_FLAGS"
+ CGM_EXT_INCLUDE="$CGM_EXT_INCLUDE $ACIS_INCLUDES"
if test "x$GXX" = "xyes"; then
CPPFLAGS="$CPPFLAGS -isystem $ACIS_DIR/include"
fi
@@ -366,6 +373,12 @@
CPPFLAGS="$old_CPPFLAGS"
LDFLAGS="$old_LDFLAGS"
HAVE_OCC_DEF="-DHAVE_OCC"
+
+ # Append to CGM global values
+ CGM_EXT_LIBS="$CGM_EXT_LIBS $OCC_LIBS"
+ CGM_EXT_LDFLAGS="$CGM_EXT_LDFLAGS $OCC_LIB_FLAG"
+ CGM_EXT_INCLUDE="$CGM_EXT_INCLUDE $OCC_INC_FLAG"
+ # NOTE: No CGM_EXT_LTFLAGS because OCC libs are .la files (not needed)
fi
# Export these variables as variables in Makefiles
Modified: cgm/trunk/itaps/Makefile.am
===================================================================
--- cgm/trunk/itaps/Makefile.am 2008-10-29 19:49:31 UTC (rev 2184)
+++ cgm/trunk/itaps/Makefile.am 2008-10-29 21:07:27 UTC (rev 2185)
@@ -59,14 +59,11 @@
# that the correct values are set (e.g. if someone does
# 'make prefix=/foo install', we don't know the correct install
# directory until we're doing the install.
+CFG_FILE = $(DESTDIR)$(cfgdir)/iGeom-Defs.inc
install-data-hook:
- echo "include $(libdir)/cgm.make" >> $(DESTDIR)$(cfgdir)/iGeom-Defs.inc
- echo 'IGEOM_LDFLAGS = $$(CGM_LDFLAGS) $$(IGEOM_CXX_LDFLAGS)' >> $(DESTDIR)$(cfgdir)/iGeom-Defs.inc
- echo 'IGEOM_LTFLAGS = $$(CGM_LTFLAGS)' >> $(DESTDIR)$(cfgdir)/iGeom-Defs.inc
- echo 'IGEOM_LIBS = $$(CGM_LIBS) $$(IGEOM_CXX_LIBS)' >> $(DESTDIR)$(cfgdir)/iGeom-Defs.inc
- echo 'IGEOM_DEFINES = $$(CGM_DEFINES)' >> $(DESTDIR)$(cfgdir)/iGeom-Defs.inc
- echo 'IGEOM_INCLUDES = $$(CGM_INCLUDES)' >> $(DESTDIR)$(cfgdir)/iGeom-Defs.inc
- echo 'IGEOM_CPPFLAGS = $$(CGM_CPPFLAGS)' >> $(DESTDIR)$(cfgdir)/iGeom-Defs.inc
+ echo "IGEOM_CXX_LDFLAGS = -L${libdir}" >> $(CFG_FILE)
+ echo "IGEOM_CXX_LTFLAGS = -R${libdir}" >> $(CFG_FILE)
+ echo "IGEOM_INCLUDES = -I${includedir}" >> $(CFG_FILE)
EXTRA_DIST = testgeom.sat
Modified: cgm/trunk/itaps/iGeom-Defs.inc.in
===================================================================
--- cgm/trunk/itaps/iGeom-Defs.inc.in 2008-10-29 19:49:31 UTC (rev 2184)
+++ cgm/trunk/itaps/iGeom-Defs.inc.in 2008-10-29 21:07:27 UTC (rev 2185)
@@ -1,13 +1,19 @@
IGEOM_FC = @FC@
IGEOM_FCFLAGS = @FCFLAGS@
IGEOM_FCDEFS = @DEFS@
-IGEOM_CXX_LDFLAGS = @CGM_CXX_LINKFLAGS@
-IGEOM_CXX_LIBS = @CGM_CXX_LIBS@
-include @abs_builddir@/../cgm.make
-IGEOM_LDFLAGS = $(CGM_LDFLAGS) $(IGEOM_CXX_LDFLAGS)
-IGEOM_LTFLAGS = $(CGM_LTFLAGS)
-IGEOM_LIBS = $(CGM_LIBS) $(IGEOM_CXX_LIBS)
-IGEOM_DEFINES = $(CGM_DEFINES)
-IGEOM_INCLUDES = $(CGM_INCLUDES)
-IGEOM_CPPFLAGS = $(CGM_CPPFLAGS)
+# These should never be required for the iGeom interface
+IGEOM_INCLUDES = -I at abs_srcdir@ -I at abs_builddir@
+IGEOM_DEFINES =
+IGEOM_CPPFLAGS = $(IGEOM_DEFINES) $(IGEOM_INCLUDES)
+
+# The useful flags we are providing
+IGEOM_LDFLAGS = $(IGEOM_CXX_LDFLAGS) @CGM_EXT_LDFLAGS@ @CGM_CXX_LINKFLAGS@
+IGEOM_LTFLAGS = $(IGEOM_CXX_LTFLAGS) @CGM_EXT_LTFLAGS@
+IGEOM_LIBS = -liGeom -lcgm @CGM_EXT_LIBS@ @CGM_CXX_LIBS@
+
+# These are overridden after this file in installed
+IGEOM_CXX_LDFLAGS = -L at abs_top_builddir@/.libs -L at abs_builddir@/.libs
+IGEOM_CXX_LTFLAGS = -R at abs_top_builddir@/.libs -R at abs_builddir@/.libs
+
+# Below here goes the overrides that happen during installation
More information about the cgma-dev
mailing list