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

Last change on this file since 3335 was 3335, checked in by stefan, 5 years ago

merge r3256 from stable/1.4

  • Property svn:keywords set to Author Date Id Revision
File size: 4.0 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 3335 2015-01-18 08:32:41Z 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 = coinhsl/common/deps.f
19
20if COIN_HAS_MC19
21  libcoinhsl_la_SOURCES += coinhsl/mc19/mc19d.f
22endif
23
24if COIN_HAS_MA27
25  libcoinhsl_la_SOURCES += coinhsl/ma27/ma27d.f
26endif
27
28if COIN_HAS_MA28
29  libcoinhsl_la_SOURCES += coinhsl/ma28/ma28d.f
30endif
31
32if COIN_HAS_MA57
33  libcoinhsl_la_SOURCES += coinhsl/ma57/ma57d.f
34endif
35
36if COIN_HAS_DEPSF90
37  libcoinhsl_la_SOURCES += coinhsl/common/deps90.f90
38endif
39
40if COIN_HAS_HSL_MC68
41  libcoinhsl_la_SOURCES += coinhsl/hsl_mc68/C/hsl_mc68i_ciface.f90
42  includecoin_HEADERS += coinhsl/hsl_mc68/C/hsl_mc68i.h
43endif
44
45if COIN_HAS_HSL_MA77
46  libcoinhsl_la_SOURCES += coinhsl/hsl_ma77/hsl_ma77d.f90 coinhsl/hsl_ma77/C/hsl_ma77d_ciface.f90
47  includecoin_HEADERS += coinhsl/hsl_ma77/C/hsl_ma77d.h
48endif
49
50if COIN_HAS_HSL_MA86
51  libcoinhsl_la_SOURCES += coinhsl/hsl_ma86/hsl_ma86d.f90 coinhsl/hsl_ma86/C/hsl_ma86d_ciface.f90
52  includecoin_HEADERS += coinhsl/hsl_ma86/C/hsl_ma86d.h
53endif
54
55if COIN_HAS_HSL_MA97
56  libcoinhsl_la_SOURCES += coinhsl/hsl_ma97/hsl_ma97d.f90 coinhsl/hsl_ma97/C/hsl_ma97d_ciface.f90
57  includecoin_HEADERS += coinhsl/hsl_ma97/C/hsl_ma97d.h
58endif
59
60if COIN_HAS_METIS
61else
62  libcoinhsl_la_SOURCES += metis_dummy.c
63endif
64
65if DEPENDENCY_LINKING
66libcoinhsl_la_LIBADD = $(HSL_LIBS) $(HSL_PCLIBS)
67endif
68
69libcoinhsl_la_LDFLAGS = $(LT_LDFLAGS)
70
71# dependencies
72#  need to define dependencies in terms of variables, since automake does not allow multiple rules for the same target
73ma77=hsl_ma77d
74ma86=hsl_ma86d
75ma97=hsl_ma97d
76mc68=hsl_mc68i
77$(ma77).lo: deps90.lo
78$(ma86).lo: deps90.lo
79$(ma97).lo: deps90.lo
80$(ma77)_ciface.lo: $(ma77).lo
81$(ma86)_ciface.lo: $(ma86).lo
82$(ma97)_ciface.lo: $(ma97).lo
83$(mc68)_ciface.lo: deps90.lo
84
85#############################################################################
86#  Generating a shared library for delay loading
87
88if EXTRA_SHARED_COMMAND
89
90$(HSL_SHARED_LIB): $(thirdpartylib_LTLIBRARIES) $(DEFFILE)
91        bla=; \
92        for i in $(libcoinhsl_la_SOURCES); do \
93          case $$i in \
94            *.f) \
95              obj=`echo $$i| sed -e 's|\(.*\).[cf]|.libs/\1.$(OBJEXT)|g'` ;\
96              if test -r $$obj; then \
97                bla="$$bla $$obj" ;\
98              else \
99                bla="$$bla `echo $$i| sed -e 's|\(.*\).[cf]|\1.$(OBJEXT)|g'`" ;\
100              fi ;\
101              ;; \
102          esac ;\
103        done ;\
104        $(F77_SHARED_CMD) $$bla -o $(HSL_SHARED_LIB) $(F77_DLL_LINKFLAGS)
105
106if NEED_DEFFILE
107$(DEFFILE): config.status
108        echo 'LIBRARY LIBHSL' > $(DEFFILE)
109        echo 'EXPORTS' >> $(DEFFILE)
110        for i in $(EXPORT_SYMBOLS); do \
111          echo "  $$i" >> $(DEFFILE); \
112        done
113endif
114
115endif  # EXTRA_SHARED_COMMAND
116
117install-exec-local: $(HSL_SHARED_LIB)
118if EXTRA_SHARED_COMMAND
119        test -z "$(DESTDIR)$(libdir)/coin/ThirdParty" || $(mkdir_p) "$(DESTDIR)$(libdir)/coin/ThirdParty"
120        $(libLTLIBRARIES_INSTALL) $(HSL_SHARED_LIB) "$(DESTDIR)$(libdir)/coin/ThirdParty/$(HSL_SHARED_LIB)"
121endif
122        $(install_sh_DATA) config_coinhsl.h $(DESTDIR)$(includecoindir)/CoinHslConfig.h
123
124uninstall-local:
125        rm -f "$(DESTDIR)$(libdir)/coin/ThirdParty/$(HSL_SHARED_LIB)"
126        rm -f $(DESTDIR)$(includecoindir)/CoinHslConfig.h
127
128pkgconfiglibdir = $(libdir)/pkgconfig
129pkgconfiglib_DATA = coinhsl.pc
130
131endif  # BUILD_COINHSL
132
133test:
134        @echo "No test available for HSL."
135
136# Need to overwrite automake definition since otherwise libtool does not
137# understand the fortran file (need to add --tag=F77)
138LTFCCOMPILE = $(LIBTOOL) --tag=F77 --mode=compile $(FC) $(AM_FCFLAGS) $(FCFLAGS)
139
140
141########################################################################
142#                         Maintainer Stuff                             #
143########################################################################
144
145CLEANFILES = $(HSL_SHARED_LIB) $(DEFFILE) *.mod
146
147# Files that are generated and should be cleaned with make distclean
148DISTCLEANFILES =
149
150include BuildTools/Makemain.inc
Note: See TracBrowser for help on using the repository browser.