[cgma-dev] r1612 - in cgm/trunk: . geom geom/ACIS_SRC geom/Cholla geom/OCC geom/facet geom/facetbool geom/parallel geom/virtual test

kraftche at mcs.anl.gov kraftche at mcs.anl.gov
Thu Feb 21 13:20:44 CST 2008


Author: kraftche
Date: 2008-02-21 13:20:44 -0600 (Thu, 21 Feb 2008)
New Revision: 1612

Modified:
   cgm/trunk/configure.in
   cgm/trunk/geom/ACIS_SRC/Makefile.am
   cgm/trunk/geom/Cholla/Makefile.am
   cgm/trunk/geom/Makefile.am
   cgm/trunk/geom/OCC/Makefile.am
   cgm/trunk/geom/facet/Makefile.am
   cgm/trunk/geom/facetbool/Makefile.am
   cgm/trunk/geom/parallel/Makefile.am
   cgm/trunk/geom/virtual/Makefile.am
   cgm/trunk/test/Makefile.am
Log:
o Correctly specify library dependencies on exteran libs (e.g. ACIS or OCC libs)
o Specify inter-library dependencies for CGMA libs.
  - fixes possible broken shared library build on some platforms (those
     that require shared lib to have all symbols resolved)
  - can simplify linking w/in CGMA (e.g. specifying libcubit_ACIS.la 
     automatically includes libcubit_util.la and libcubit_geom.la)
  - libtool might be able to resolve link order better
  - shared libraries have correct dependencies 
o Specify rpath (-R) for tests.  
  - libtool seems to determine required rpaths automatically only for *.la 
    libraries (such as OpenCascade build with libtool.)  Or maybe it
    just doesn't like ACIS, but either way this fixes the problem.




Modified: cgm/trunk/configure.in
===================================================================
--- cgm/trunk/configure.in	2008-02-21 17:38:11 UTC (rev 1611)
+++ cgm/trunk/configure.in	2008-02-21 19:20:44 UTC (rev 1612)
@@ -256,11 +256,13 @@
   # Set OCC_INC_FLAG and OCC_LIB_FLAG based on --with-occ option
   if test "x$occ_DIR" = "x"; then
     OCC_INC_FLAG=
+    OCC_LIB_DIR=
     OCC_LIB_FLAG=
   else
     uname=`uname`
     OCC_INC_FLAG="-I${occ_DIR}/ros/inc"
-    OCC_LIB_FLAG="-L${occ_DIR}/ros/${uname}/lib"
+    OCC_LIB_DIR="${occ_DIR}/ros/${uname}/lib"
+    OCC_LIB_FLAG='-L$(OCC_LIB_DIR)'
   fi
 
   # Check of OCC is present and working
@@ -269,7 +271,7 @@
   old_CPPFLAGS="$CPPFLAGS"
   old_LDFLAGS="$LDFLAGS"
   CPPFLAGS="$CPPFLAGS ${OCC_INC_FLAG}"
-  LDFLAGS="$LDFLAGS ${OCC_LIB_FLAG}"
+  LDFLAGS="$LDFLAGS -L$OCC_LIB_DIR"
 
   # Check if 64-bit
   AC_MSG_CHECKING([if platform is 64-bit (-D_OCC64)])
@@ -304,6 +306,7 @@
 
 # Export these variables as variables in Makefiles
 AC_SUBST(OCC_INC_FLAG)
+AC_SUBST(OCC_LIB_DIR)
 AC_SUBST(OCC_LIB_FLAG)
 AC_SUBST(OCC_LIBS)
 AC_SUBST(CUBIT_OCC_LIB)

Modified: cgm/trunk/geom/ACIS_SRC/Makefile.am
===================================================================
--- cgm/trunk/geom/ACIS_SRC/Makefile.am	2008-02-21 17:38:11 UTC (rev 1611)
+++ cgm/trunk/geom/ACIS_SRC/Makefile.am	2008-02-21 19:20:44 UTC (rev 1612)
@@ -6,7 +6,6 @@
        $(LITTLE_ENDIAN) $(ACIS_STEP_TRANSLATOR) $(ACIS_IGES_TRANSLATOR) \
        -DCUBIT_ACIS_VERSION=$(ACIS_VERSION) -DACIS_VERSION=$(ACIS_VERSION) \
        -D$(ACIS_PLATFORM) -DACIS_LOCAL_OPS -DACIS_VER=$(ACIS_VERSION)
-LIBS := -L$(ACIS_LIB_DIR) $(ACIS_LIBS) $(LIBS)
 INCLUDES = -I$(top_srcdir)/util \
            -I$(top_srcdir)/geom \
            -I$(srcdir)/gtcAttrib/incl \
@@ -81,3 +80,6 @@
     gtcAttrib/incl/attrib_name.h \
     gtcAttrib/incl/gtcAttrib_exConst.h
   
+libcubit_ACIS_la_LIBADD = -L$(ACIS_LIB_DIR) $(ACIS_LIBS) \
+                          ../libcubit_geom.la 
+

Modified: cgm/trunk/geom/Cholla/Makefile.am
===================================================================
--- cgm/trunk/geom/Cholla/Makefile.am	2008-02-21 17:38:11 UTC (rev 1611)
+++ cgm/trunk/geom/Cholla/Makefile.am	2008-02-21 19:20:44 UTC (rev 1612)
@@ -11,6 +11,8 @@
   lib_LTLIBRARIES += libcholla.la
 endif
 
+libcholla_la_LIBADD = ../libcubit_geom.la
+
 # The directory where headers will be installed
 libcholla_la_includedir = $(includedir)
 

Modified: cgm/trunk/geom/Makefile.am
===================================================================
--- cgm/trunk/geom/Makefile.am	2008-02-21 17:38:11 UTC (rev 1611)
+++ cgm/trunk/geom/Makefile.am	2008-02-21 19:20:44 UTC (rev 1612)
@@ -4,7 +4,7 @@
 # Subdirectories
 # The values checked are defined in AM_CONDITIONAL statements
 # in configure.in
-SUBDIRS = Cholla facet facetbool virtual
+SUBDIRS = . Cholla facetbool facet virtual
 if build_ACIS
   SUBDIRS += ACIS
 endif
@@ -25,6 +25,8 @@
   lib_LTLIBRARIES += libcubit_geom.la
 endif
 
+libcubit_geom_la_LIBADD = ../util/libcubit_util.la
+
 # The directory where headers will be installed
 libcubit_geom_la_includedir = $(includedir)
 

Modified: cgm/trunk/geom/OCC/Makefile.am
===================================================================
--- cgm/trunk/geom/OCC/Makefile.am	2008-02-21 17:38:11 UTC (rev 1611)
+++ cgm/trunk/geom/OCC/Makefile.am	2008-02-21 19:20:44 UTC (rev 1612)
@@ -4,7 +4,6 @@
 # Override default defines with the ones we want from the configure script
 DEFAULT_INCLUDES=-I.
 DEFS = $(TEMPLATE_DEFS_INCLUDED) $(LITTLE_ENDIAN)
-LIBS := $(OCC_LIB_FLAG) 
 INCLUDES = -I$(top_srcdir)/util \
            -I$(top_srcdir)/geom \
            -I$(top_srcdir)/geom/Cholla \
@@ -22,6 +21,9 @@
   lib_LTLIBRARIES += $(OCC_TARGET)
 endif
 
+libcubit_OCC_la_LIBADD = $(OCC_LIB_FLAG) $(OCC_LIBS) \
+                         ../libcubit_geom.la
+
 # The directory where headers will be installed
 libcubit_OCC_la_includedir = $(includedir)
 

Modified: cgm/trunk/geom/facet/Makefile.am
===================================================================
--- cgm/trunk/geom/facet/Makefile.am	2008-02-21 17:38:11 UTC (rev 1611)
+++ cgm/trunk/geom/facet/Makefile.am	2008-02-21 19:20:44 UTC (rev 1612)
@@ -14,6 +14,10 @@
   lib_LTLIBRARIES += libcubit_facet.la
 endif
 
+libcubit_facet_la_LIBADD = ../libcubit_geom.la \
+                           ../facetbool/libcubit_facetbool.la \
+                           ../Cholla/libcholla.la 
+
 # The directory where headers will be installed
 libcubit_facet_la_includedir = $(includedir)
 

Modified: cgm/trunk/geom/facetbool/Makefile.am
===================================================================
--- cgm/trunk/geom/facetbool/Makefile.am	2008-02-21 17:38:11 UTC (rev 1611)
+++ cgm/trunk/geom/facetbool/Makefile.am	2008-02-21 19:20:44 UTC (rev 1612)
@@ -12,6 +12,8 @@
   lib_LTLIBRARIES += libcubit_facetbool.la
 endif
 
+libcubit_facetbool_la_LIBADD= ../libcubit_geom.la
+
 # The directory where headers will be installed
 libcubit_facetbool_la_includedir = $(includedir)
 

Modified: cgm/trunk/geom/parallel/Makefile.am
===================================================================
--- cgm/trunk/geom/parallel/Makefile.am	2008-02-21 17:38:11 UTC (rev 1611)
+++ cgm/trunk/geom/parallel/Makefile.am	2008-02-21 19:20:44 UTC (rev 1612)
@@ -8,8 +8,6 @@
        -DCUBIT_ACIS_VERSION=$(ACIS_VERSION) -DACIS_VERSION=$(ACIS_VERSION) \
        -D$(ACIS_PLATFORM)
 
-LIBS := -L$(ACIS_LIB_DIR) $(ACIS_LIBS) $(LIBS)
-
 INCLUDES = -I$(top_srcdir)/util \
            -I$(top_srcdir)/geom \
            -I$(top_srcdir)/geom/ACIS \
@@ -22,6 +20,8 @@
   lib_LTLIBRARIES += libcubit_parallel.la
 endif
 
+libcubit_parallel_la_LIBADD = ../libcubit_geom.la ../ACIS/libcubit_ACIS.la
+
 # The directory where headers will be installed
 libcubit_parallel_la_includedir = $(includedir)
 

Modified: cgm/trunk/geom/virtual/Makefile.am
===================================================================
--- cgm/trunk/geom/virtual/Makefile.am	2008-02-21 17:38:11 UTC (rev 1611)
+++ cgm/trunk/geom/virtual/Makefile.am	2008-02-21 19:20:44 UTC (rev 1612)
@@ -14,6 +14,8 @@
   lib_LTLIBRARIES += libcubit_virtual.la
 endif
 
+libcubit_virtual_la_LIBADD = ../libcubit_geom.la
+
 # The directory where headers will be installed
 libcubit_virtual_la_includedir = $(includedir)
 

Modified: cgm/trunk/test/Makefile.am
===================================================================
--- cgm/trunk/test/Makefile.am	2008-02-21 17:38:11 UTC (rev 1611)
+++ cgm/trunk/test/Makefile.am	2008-02-21 19:20:44 UTC (rev 1612)
@@ -9,37 +9,29 @@
            -I$(top_srcdir)/geom/Cholla \
 	   -I$(top_srcdir)/geom/OCC \
 	   -I$(srcdir) \
-	   $(OCC_INC_FLAG) \
-	   -I..\$(OCC_INC_FLAG)
+	   $(OCC_INC_FLAG)
 
 TESTS=
-if WITH_OCC
-  TESTS += makept
-endif
 if build_ACIS
   TESTS += webcut
 endif
+if WITH_OCC
+  TESTS += makept
+endif
 
 CPPFLAGS += -DSRCDIR=@srcdir@
 check_PROGRAMS = $(TESTS)
 
 webcut_SOURCES = webcut.cpp
 makept_SOURCES = makept.cpp
-opt_libs=
 LDADD = ../geom/virtual/libcubit_virtual.la \
         ../geom/facetbool/libcubit_facetbool.la \
-	$(opt_libs) \
         ../geom/Cholla/libcholla.la \
         ../geom/facet/libcubit_facet.la \
         ../geom/libcubit_geom.la \
         ../util/libcubit_util.la 
+webcut_LDFLAGS = $(LDFLAGS) -R$(ACIS_LIB_DIR)
+webcut_LDADD = ../geom/ACIS/libcubit_ACIS.la  $(LDADD)
+makept_LDFLAGS = $(LDFLAGS) -R$(OCC_LIB_DIR)
+makept_LDADD = ../geom/OCC/libcubit_OCC.la $(LDADD)
 
-if build_ACIS
-  opt_libs += ../geom/ACIS/libcubit_ACIS.la 
-endif
-if WITH_OCC
-  opt_libs += ../geom/OCC/libcubit_OCC.la $(OCC_LIB_FLAG) $(OCC_LIBS)
-endif
-
-
-




More information about the cgma-dev mailing list