source: ThirdParty/HSL/trunk/Makefile.am @ 2469

Last change on this file since 2469 was 2469, checked in by stefan, 9 years ago

make metis optional

  • Property svn:keywords set to Author Date Id Revision
File size: 3.5 KB
Line 
1# Copyright (C) 2003, 2009 International Business Machines and others
2# All Rights Reserved.
3# This file is distributed under the Eclipse Public License.
4
5## $Id: Makefile.am 2469 2011-10-15 18:15:24Z stefan $
6
7AUTOMAKE_OPTIONS = foreign
8
9EXTRA_DIST = INSTALL.HSL
10
11if BUILD_COINHSL
12
13includecoindir = $(includedir)/coin/ThirdParty
14includecoin_HEADERS =
15
16lib_LTLIBRARIES = libcoinhsl.la
17
18libcoinhsl_la_SOURCES = common/deps.f
19
20if COIN_HAS_MC19
21  libcoinhsl_la_SOURCES += mc19/mc19d.f
22endif
23
24if COIN_HAS_MA27
25  libcoinhsl_la_SOURCES += ma27/ma27d.f
26endif
27
28if COIN_HAS_MA28
29  libcoinhsl_la_SOURCES += ma28/ma28d.f
30endif
31
32if COIN_HAS_MA57
33  libcoinhsl_la_SOURCES += ma57/ma57d.f
34endif
35
36if COIN_HAS_DEPSF90
37  libcoinhsl_la_SOURCES += common/deps90.f90
38endif
39
40if COIN_HAS_HSL_MC68
41  libcoinhsl_la_SOURCES += hsl_mc68/C/hsl_mc68i_ciface.f90
42  includecoin_HEADERS += hsl_mc68/C/hsl_mc68i.h
43endif
44
45if COIN_HAS_HSL_MA77
46  libcoinhsl_la_SOURCES += hsl_ma77/hsl_ma77d.f90
47  nodist_includecoin_HEADERS = hsl_ma77_double.mod
48endif
49
50if COIN_HAS_HSL_MA86
51  libcoinhsl_la_SOURCES += hsl_ma86/hsl_ma86d.f90 hsl_ma86/C/hsl_ma86d_ciface.f90
52  includecoin_HEADERS += hsl_ma86/C/hsl_ma86d.h
53endif
54
55if COIN_HAS_HSL_MA97
56  libcoinhsl_la_SOURCES += hsl_ma97/hsl_ma97d.f90 hsl_ma97/C/hsl_ma97d_ciface.f90
57  includecoin_HEADERS += hsl_ma97/C/hsl_ma97d.h
58endif
59
60if COIN_HAS_METIS
61else
62  libcoinhsl_la_SOURCES += metis_dummy.c
63endif
64
65libcoinhsl_la_LDFLAGS = $(LT_LDFLAGS)
66
67# dependencies
68hsl_ma86d_ciface.lo: hsl_ma86d.lo
69hsl_ma97d_ciface.lo: hsl_ma97d.lo
70hsl_mc68i_ciface.lo: deps90.lo
71
72#############################################################################
73#  Generating a shared library for delay loading
74
75if EXTRA_SHARED_COMMAND
76
77$(HSL_SHARED_LIB): $(thirdpartylib_LTLIBRARIES) $(DEFFILE)
78        bla=; \
79        for i in $(nodist_libcoinhsl_la_SOURCES); do \
80          case $$i in \
81            *.f) \
82              obj=`echo $$i| sed -e 's|\(.*\).[cf]|.libs/\1.$(OBJEXT)|g'` ;\
83              if test -r $$obj; then \
84                bla="$$bla $$obj" ;\
85              else \
86                bla="$$bla `echo $$i| sed -e 's|\(.*\).[cf]|\1.$(OBJEXT)|g'`" ;\
87              fi ;\
88              ;; \
89          esac ;\
90        done ;\
91        $(F77_SHARED_CMD) $$bla -o $(HSL_SHARED_LIB) $(F77_DLL_LINKFLAGS)
92
93if NEED_DEFFILE
94$(DEFFILE): config.status
95        echo 'LIBRARY LIBHSL' > $(DEFFILE)
96        echo 'EXPORTS' >> $(DEFFILE)
97        for i in $(EXPORT_SYMBOLS); do \
98          echo "  $$i" >> $(DEFFILE); \
99        done
100endif
101
102endif  # EXTRA_SHARED_COMMAND
103
104install-exec-local: $(HSL_SHARED_LIB)
105if EXTRA_SHARED_COMMAND
106        test -z "$(DESTDIR)$(libdir)/coin/ThirdParty" || $(mkdir_p) "$(DESTDIR)$(libdir)/coin/ThirdParty"
107        $(libLTLIBRARIES_INSTALL) $(HSL_SHARED_LIB) "$(DESTDIR)$(libdir)/coin/ThirdParty/$(HSL_SHARED_LIB)"
108endif
109        $(install_sh_DATA) config_coinhsl.h $(DESTDIR)$(includecoindir)/CoinHslConfig.h
110
111uninstall-local:
112        rm -f "$(DESTDIR)$(libdir)/coin/ThirdParty/$(HSL_SHARED_LIB)"
113        rm -f $(DESTDIR)$(includecoindir)/CoinHslConfig.h
114
115pkgconfiglibdir = $(libdir)/pkgconfig
116pkgconfiglib_DATA = coinhsl.pc
117
118endif  # BUILD_COINHSL
119
120test:
121        @echo "No test available for HSL."
122
123# Need to overwrite automake definition since otherwise libtool does not
124# understand the fortran file (need to add --tag=F77)
125LTFCCOMPILE = $(LIBTOOL) --tag=F77 --mode=compile $(FC) $(AM_FCFLAGS) $(FCFLAGS)
126
127
128########################################################################
129#                         Maintainer Stuff                             #
130########################################################################
131
132CLEANFILES = $(HSL_SHARED_LIB) $(DEFFILE) *.mod
133
134# Files that are generated and should be cleaned with make distclean
135DISTCLEANFILES =
136
137include BuildTools/Makemain.inc
Note: See TracBrowser for help on using the repository browser.