[cgma-dev] r1755 - cgm/trunk

kraftche at mcs.anl.gov kraftche at mcs.anl.gov
Thu Apr 10 12:12:24 CDT 2008


Author: kraftche
Date: 2008-04-10 12:12:24 -0500 (Thu, 10 Apr 2008)
New Revision: 1755

Modified:
   cgm/trunk/Makefile.am
   cgm/trunk/cgm.make.in
Log:
o Back out previous change: linking of cgma_init needs to remain separate
  from other CGM libraries because all others are overriden if using an
  existing libcubit.
  
o Fix missing library search path for libcubit

o Fix self-recursive variable for OpenCascade link

o Separate uninstalled include and link paths from installed paths so
  as to retain the ability to use an installed CGM while greatly reducing
  the noise when referencing an installed one.



Modified: cgm/trunk/Makefile.am
===================================================================
--- cgm/trunk/Makefile.am	2008-04-10 16:17:17 UTC (rev 1754)
+++ cgm/trunk/Makefile.am	2008-04-10 17:12:24 UTC (rev 1755)
@@ -33,5 +33,8 @@
 # 'make prefix=/foo install', we don't know the correct install
 # directory until we're doing the install.
 install-data-hook:
+	echo 'CGM_LIBS_LDFLAGS=$$(CGM_LIBS_LDFLAGS_INSTALLED)' >> $(DESTDIR)$(cfgdir)/cgm.make
+	echo 'CGMA_INIT_LDFLAGS=$$(CGMA_INIT_LDFLAGS_INSTALLED)' >> $(DESTDIR)$(cfgdir)/cgm.make
+	echo 'CGM_INCLUDES=$$(CGM_INC_CPPFLAGS_INSTALLED)' >> $(DESTDIR)$(cfgdir)/cgm.make
 	echo "CGM_LIBDIR=${libdir}" >> $(DESTDIR)$(cfgdir)/cgm.make
 	echo "CGM_INCLUDEDIR=${includedir}" >> $(DESTDIR)$(cfgdir)/cgm.make

Modified: cgm/trunk/cgm.make.in
===================================================================
--- cgm/trunk/cgm.make.in	2008-04-10 16:17:17 UTC (rev 1754)
+++ cgm/trunk/cgm.make.in	2008-04-10 17:12:24 UTC (rev 1755)
@@ -2,7 +2,7 @@
 #
 # To build CGM applications, do the following:
 #
-# 0. include this file in your makefile (using 'include config.make')
+# 0. include this file in your makefile (using 'include cgm.make')
 # 1. Insert '${CGM_INCLUDES}' (w/o quotes) in your compile command, e.g.
 #      ${CXX} ${CGM_INCLUDES} -c mysource.cpp
 # 2. Insert '${CGM_LIBS_LINK}' (w/o quotes) on your link line
@@ -27,7 +27,8 @@
 ACIS_INCLUDES        = @ACIS_INCLUDES@
 
 OCC_INCLUDES	     = @OCC_INC_FLAG@
-OCC_LIB_DIR	     = @OCC_LIB_FLAG@
+OCC_LIB_DIR          = @OCC_LIB_DIR@
+OCC_LIB_FLAG	     = @OCC_LIB_FLAG@
 OCC_LIBS	     = @CUBIT_OCC_LIB@ @OCC_LIBS@
 
 CGM_PARALLEL_INCLUDE = @CGM_PARALLEL_INCLUDE@
@@ -45,38 +46,50 @@
 CGM_CFLAGS = @CFLAGS@
 CGM_LDFLAGS = @LDFLAGS@
 
-CGM_INCLUDES = -I$(CGM_INCLUDEDIR)/util \
-               -I$(CGM_INCLUDEDIR)/init \
-               -I$(CGM_INCLUDEDIR)/geom \
-               -I$(CGM_INCLUDEDIR)/geom/ACIS \
-               -I$(CGM_INCLUDEDIR)/geom/OCC \
+CGM_INC_CPPFLAGS_COMMON = ${ACIS_INCLUDES} ${OCC_INCLUDES}
+CGM_INC_CPPFLAGS_UNINSTALLED = \
+               -I at abs_srcdir@/util \
+               -I at abs_builddir@/util \
+               -I at abs_srcdir@/init \
+               -I at abs_srcdir@/geom \
+               -I at abs_builddir@/geom \
+               -I at abs_srcdir@/itaps \
+               -I at abs_builddir@/itaps \
+               -I at abs_srcdir@/geom/ACIS \
+               -I at abs_srcdir@/geom/OCC \
                $(CGM_PARALLEL_INCLUDE) \
+               $(CGM_INC_CPPFLAGS_COMMON)
+CGM_INC_CPPFLAGS_INSTALLED = \
                -I$(CGM_INCLUDEDIR) \
-               ${ACIS_INCLUDES} \
-               ${OCC_INCLUDES}
+               $(CGM_INC_CPPFLAGS_COMMON)
 
-CGM_LIBS_LINK_INTERNAL = ${LDFLAGS} \
-	-L$(CGM_LIBDIR) \
-        -L$(CGM_LIBDIR)/init/.libs \
-	-L$(CGM_LIBDIR)/geom/virtual/.libs \
-        -L$(CGM_LIBDIR)/geom/facetbool/.libs \
-        -L$(CGM_LIBDIR)/geom/facet/.libs \
-	-L$(CGM_LIBDIR)/geom/Cholla/.libs \
-        -L$(CGM_LIBDIR)/geom/ACIS/.libs \
-        -L$(CGM_LIBDIR)/geom/OCC/.libs \
-        -L$(CGM_LIBDIR)/geom/.libs \
-        -L$(CGM_LIBDIR)/util/.libs \
-	-L$(CGM_LIBDIR)/geom/virtual \
-        -L$(CGM_LIBDIR)/geom/facetbool \
-        -L$(CGM_LIBDIR)/geom/facet \
-	-L$(CGM_LIBDIR)/geom/Cholla \
-        -L$(CGM_LIBDIR)/geom/ACIS \
-        -L$(CGM_LIBDIR)/geom \
-        -L$(CGM_LIBDIR)/util \
-	-L${ACIS_LIB_DIR} \
-        ${OCC_LIB_DIR} \
-        -lcgma_init \
-	${ACIS_LIBS} \
+# will be overriden upon install
+CGM_INCLUDES = $(CGM_INC_CPPFLAGS_UNINSTALLED)
+
+CGM_LIBS_LDFLAGS_COMMON = -L$(ACIS_LIB_DIR) $(OCC_LIB_FLAG)
+
+CGM_LIBS_LDFLAGS_UNINSTALLED = \
+	-L at abs_builddir@/geom/virtual/.libs \
+        -L at abs_builddir@/geom/facetbool/.libs \
+        -L at abs_builddir@/geom/facet/.libs \
+	-L at abs_builddir@/geom/Cholla/.libs \
+        -L at abs_builddir@/geom/ACIS/.libs \
+        -L at abs_builddir@/geom/OCC/.libs \
+        -L at abs_builddir@/geom/.libs \
+        -L at abs_builddir@/util/.libs \
+	-L at abs_builddir@/geom/virtual \
+        -L at abs_builddir@/geom/facetbool \
+        -L at abs_builddir@/geom/facet \
+	-L at abs_builddir@/geom/Cholla \
+        -L at abs_builddir@/geom/ACIS \
+        -L at abs_builddir@/geom \
+        -L at abs_builddir@/util \
+        $(CGM_LIBS_LDFLAGS_COMMON)
+
+CGM_LIBS_LDFLAGS_INSTALLED = -L$(CGM_LIBDIR) $(CGM_LIBS_LDFLAGS_COMMON)
+
+CGM_LIBS_LIBRARIES = \
+        ${ACIS_LIBS} \
         -lcubit_virtual \
         -lcubit_facet \
         -lcubit_facetbool \
@@ -87,6 +100,17 @@
 	${CGM_PARALLEL_LIB} \
         ${OCC_LIBS} 
 
+# Will be overridden upon install
+CGM_LIBS_LDFLAGS = $(CGM_LIBS_LDFLAGS_UNINSTALLED)
+
+CGM_LIBS_LINK_INTERNAL = $(LDFLAGS) $(CGM_LIBS_LDFLAGS) $(CGM_LIBS_LIBRARIES)
+
+CGMA_INIT_LDFLAGS_UNINSTALLED = -L$(CGM_LIBDIR)/init -L$(CGM_LIBDIR)/init/.libs 
+CGMA_INIT_LDFLAGS_INSTALLED = -L$(CGM_LIBDIR)
+
+# Will be overridden upon install
+CGMA_INIT_LDFLAGS = $(CGMA_INIT_LDFLAGS_UNINSTALLED)
+
 CGM_LIBS_FILES_INTERNAL = \
        $(CGM_LIBDIR)/libcgma_init.la \
        $(CGM_LIBDIR)/libcubit_virtual.la \
@@ -97,12 +121,13 @@
        $(CGM_LIBDIR)/libcubit_util.la \
        ${CGM_PARALLEL_LIB_FILE}
        
-CUBIT_LDFwAGS = @CUBIT_LDFLAGS@
-
 CUBIT_LTFLAGS = @CUBIT_LTFLAGS@
+CUBIT_LDFLAGS = @CUBIT_LDFLAGS@
 CUBIT_LIBS = @CUBIT_LIBS@
 CUBIT_FILE = @CUBIT_FILE@
 
-CGM_LIBS_LINK = @CGM_LIBS_LINK@  
+# CGM_LIBS_LINK is set by configure script to be either
+# "$(CUBIT_LDFLAGS) $(CUBIT_LIBS)" or "$(CGM_LIBS_LINK_INTERNAL)"
+CGM_LIBS_LINK = $(CGMA_INIT_LDFLAGS) -lcgma_init @CGM_LIBS_LINK@  
 CGM_LIBS_FILES = @CGM_LIBS_FILES@ 
 CGM_LIBS_LTFLAGS = @CGM_LIBS_LTFLAGS@




More information about the cgma-dev mailing list