| 1 | AUTOMAKE_OPTIONS = foreign |
|---|
| 2 | |
|---|
| 3 | DEFS = $(TEMPLATE_DEFS_INCLUDED) $(HAVE_ACIS_DEF) |
|---|
| 4 | |
|---|
| 5 | if USE_BABEL |
|---|
| 6 | SIDL_DIR = SIDL |
|---|
| 7 | else |
|---|
| 8 | SIDL_DIR = |
|---|
| 9 | endif |
|---|
| 10 | |
|---|
| 11 | SUBDIRS = . $(SIDL_DIR) |
|---|
| 12 | |
|---|
| 13 | lib_LTLIBRARIES = libiGeom.la |
|---|
| 14 | |
|---|
| 15 | if build_ACIS |
|---|
| 16 | TEST_ACISLIBS = $(top_builddir)/geom/ACIS/libcubit_ACIS.la |
|---|
| 17 | else |
|---|
| 18 | TEST_ACISLIBS = |
|---|
| 19 | endif |
|---|
| 20 | |
|---|
| 21 | if BUILD_CGM |
|---|
| 22 | TEST_XLIBS = $(TEST_ACISLIBS) \ |
|---|
| 23 | $(top_builddir)/geom/facet/libcubit_facet.la \ |
|---|
| 24 | $(top_builddir)/geom/facetbool/libcubit_facetbool.la \ |
|---|
| 25 | $(top_builddir)/geom/libcubit_geom.la \ |
|---|
| 26 | $(top_builddir)/util/libcubit_util.la |
|---|
| 27 | TEST_XLDFLAGS = -R$(ACIS_LIB_DIR) |
|---|
| 28 | else |
|---|
| 29 | TEST_XLDFLAGS = $(CUBIT_LDFLAGS) $(CUBIT_LTFLAGS) |
|---|
| 30 | TEST_XLIBS = $(CUBIT_LIBS) |
|---|
| 31 | endif |
|---|
| 32 | |
|---|
| 33 | if build_ACIS |
|---|
| 34 | ACIS_CGM_INCLUDES = -I$(top_srcdir)/geom/ACIS |
|---|
| 35 | else |
|---|
| 36 | ACIS_CGM_INCLUDES = |
|---|
| 37 | endif |
|---|
| 38 | |
|---|
| 39 | libiGeom_la_includedir = $(includedir) |
|---|
| 40 | |
|---|
| 41 | libiGeom_la_libadd = $(top_builddir)/init/libcgma_init.la $(TEST_XLIBS) |
|---|
| 42 | |
|---|
| 43 | INCLUDES = -I$(top_srcdir)/util \ |
|---|
| 44 | -I$(top_srcdir)/geom \ |
|---|
| 45 | -I$(top_srcdir)/init \ |
|---|
| 46 | -I. |
|---|
| 47 | |
|---|
| 48 | libiGeom_la_SOURCES = \ |
|---|
| 49 | CATag.hpp \ |
|---|
| 50 | CATag.cpp \ |
|---|
| 51 | iGeom_CGMA.cc \ |
|---|
| 52 | iGeomError.cc \ |
|---|
| 53 | iGeomError.h |
|---|
| 54 | |
|---|
| 55 | libiGeom_la_include_HEADERS = \ |
|---|
| 56 | iBase.h \ |
|---|
| 57 | iGeom.h \ |
|---|
| 58 | iBase_FCDefs.h \ |
|---|
| 59 | iGeom_protos.h |
|---|
| 60 | |
|---|
| 61 | TESTS = testgeom |
|---|
| 62 | |
|---|
| 63 | check_PROGRAMS = $(TESTS) |
|---|
| 64 | |
|---|
| 65 | testgeom_SOURCES = testgeom.cc |
|---|
| 66 | testgeom_LDFLAGS = $(TEST_XLDFLAGS) |
|---|
| 67 | testgeom_LDADD = libiGeom.la $(TEST_XLIBS) |
|---|
| 68 | |
|---|
| 69 | |
|---|
| 70 | # Automake doesn't seem to have a directory defined for |
|---|
| 71 | # platform-dependent data (or include) files. So put |
|---|
| 72 | # in $(libdir). Define a $(cfgdir) to get around automake's |
|---|
| 73 | # check that only libraries are going in $(libdir) |
|---|
| 74 | cfgdir = $(libdir) |
|---|
| 75 | cfg_DATA = iGeom-Defs.inc |
|---|
| 76 | |
|---|
| 77 | # By default, iGeom-Defs.inc will define these to $(srcdir). We |
|---|
| 78 | # want to override that during the INSTALL of the file so |
|---|
| 79 | # that the correct values are set (e.g. if someone does |
|---|
| 80 | # 'make prefix=/foo install', we don't know the correct install |
|---|
| 81 | # directory until we're doing the install. |
|---|
| 82 | install-data-hook: |
|---|
| 83 | echo "iGeom_SRCDIR=${includedir}" >> $(DESTDIR)$(cfgdir)/iGeom-Defs.inc |
|---|
| 84 | echo "iGeom_BLDDIR=${includedir}" >> $(DESTDIR)$(cfgdir)/iGeom-Defs.inc |
|---|
| 85 | echo "iGeom_DIR=${DESTDIR}${cfgdir}/.." >> $(DESTDIR)$(cfgdir)/iGeom-Defs.inc |
|---|
| 86 | echo "iGeom_LIBDIR=${libdir}" >> $(DESTDIR)$(cfgdir)/iGeom-Defs.inc |
|---|
| 87 | echo "CGM_LDFLAGS=-L${libdir}" >> $(DESTDIR)$(cfgdir)/iGeom-Defs.inc |
|---|
| 88 | echo "CGM_INCLUDEDIR=${includedir}" >> $(DESTDIR)$(cfgdir)/iGeom-Defs.inc |
|---|