# Copyright (C) 2007, 2008 International Business Machines and others.
# All Rights Reserved.
# This file is distributed under the Common Public License.

## $Id: Makefile.am 1276 2009-04-24 16:48:35Z andreasw $

AUTOMAKE_OPTIONS = foreign

EXTRA_DIST = get.mumps INSTALL.MUMPS

if SKIPMAKE
  noinst_LTLIBRARIES =
else
  noinst_LTLIBRARIES = libcoinmumps.la
endif

MUMPSDIR = @MUMPSDIR@

nodist_libcoinmumps_la_SOURCES = \
	$(MUMPSDIR)/src/dmumps_comm_buffer.F \
	$(MUMPSDIR)/src/dmumps_struc_def.F \
	$(MUMPSDIR)/src/mumps_ooc_common.F\
	$(MUMPSDIR)/src/mumps_static_mapping.F \
	$(MUMPSDIR)/src/dmumps_ooc_buffer.F \
	$(MUMPSDIR)/src/dmumps_load.F \
	$(MUMPSDIR)/src/dmumps_ooc.F \
	$(MUMPSDIR)/src/dmumps_part1.F \
	$(MUMPSDIR)/src/dmumps_part2.F \
	$(MUMPSDIR)/src/dmumps_part3.F \
	$(MUMPSDIR)/src/dmumps_part4.F \
	$(MUMPSDIR)/src/dmumps_part5.F \
	$(MUMPSDIR)/src/dmumps_part6.F \
	$(MUMPSDIR)/src/dmumps_part7.F \
	$(MUMPSDIR)/src/dmumps_part8.F \
	$(MUMPSDIR)/src/mumps_part9.F \
	$(MUMPSDIR)/src/mumps_c.c \
	$(MUMPSDIR)/src/mumps_common.c\
	$(MUMPSDIR)/src/mumps_orderings.c\
	$(MUMPSDIR)/src/mumps_io.c\
	$(MUMPSDIR)/src/mumps_io_basic.c\
	$(MUMPSDIR)/src/mumps_io_thread.c\
	$(MUMPSDIR)/src/mumps_io_err.c\
	$(MUMPSDIR)/libseq/mpi.f \
	$(MUMPSDIR)/libseq/mpic.c \
	$(MUMPSDIR)/libseq/elapse.c


DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)`

AM_CPPFLAGS = \
	-I`$(CYGPATH_W) $(srcdir)/$(MUMPSDIR)/src` \
	-I`$(CYGPATH_W) $(srcdir)/$(MUMPSDIR)/libseq` \
	-I`$(CYGPATH_W) $(srcdir)/$(MUMPSDIR)/include`


libcoinmumps_la_LDFLAGS = $(LT_LDFLAGS)

# Some dependecies for modules:

dmumps_load.lo dmumps_part1.lo dmumps_part2.lo dmumps_part3.lo \
dmumps_part4.lo dmumps_part5.lo dmumps_part6.lo dmumps_part8.lo: \
dmumps_comm_buffer.lo

dmumps_part1.lo dmumps_part2.lo dmumps_part3.lo \
dmumps_part4.lo dmumps_part5.lo dmumps_part6.lo: dmumps_load.lo

dmumps_part1.lo dmumps_ooc.lo: dmumps_ooc_buffer.lo

dmumps_load.lo dmumps_ooc.lo dmumps_part1.lo dmumps_part2.lo dmumps_part3.lo \
dmumps_part4.lo dmumps_part5.lo dmumps_part7.lo dmumps_part8.lo: \
dmumps_struc_def.lo

dmumps_ooc_buffer.lo dmumps_ooc.lo: mumps_ooc_common.lo

dmumps_part5.lo dmumps_ooc.lo: mumps_static_mapping.lo

dmumps_part1.lo dmumps_part2.lo dmumps_part3.lo dmumps_part4.lo dmumps_part5.lo dmumps_part6.lo dmumps_part8.lo: dmumps_ooc.lo


# Module files that need to be deleted
MODEXT = mod
CLEANFILES = *.$(MODEXT)

# Reset DEFS to that they don't show up for the Fortran compiler
DEFS =
CFLAGS += $(MY_DEFS)
FFLAGS += $(MY_FDEFS)

########################################################################
#                         Maintainer Stuff                             #
########################################################################

# Files that are generated and should be cleaned with make distclean
DISTCLEANFILES = $(MAKEOKFILE)

include ../../BuildTools/Makemain.inc
