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

Last change on this file since 2864 was 2864, checked in by stefan, 6 years ago

fix variable name in rule for building shared lib

  • Property svn:keywords set to Author Date Id Revision
File size: 3.9 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 2864 2013-08-28 12:58:46Z 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
65libcoinhsl_la_LDFLAGS = $(LT_LDFLAGS)
66
67# dependencies
68#  need to define dependencies in terms of variables, since automake does not allow multiple rules for the same target
69ma77=hsl_ma77d
70ma86=hsl_ma86d
71ma97=hsl_ma97d
72mc68=hsl_mc68i
73$(ma77).lo: deps90.lo
74$(ma86).lo: deps90.lo
75$(ma97).lo: deps90.lo
76$(ma77)_ciface.lo: $(ma77).lo
77$(ma86)_ciface.lo: $(ma86).lo
78$(ma97)_ciface.lo: $(ma97).lo
79$(mc68)_ciface.lo: deps90.lo
80
81#############################################################################
82#  Generating a shared library for delay loading
83
84if EXTRA_SHARED_COMMAND
85
86$(HSL_SHARED_LIB): $(thirdpartylib_LTLIBRARIES) $(DEFFILE)
87        bla=; \
88        for i in $(libcoinhsl_la_SOURCES); do \
89          case $$i in \
90            *.f) \
91              obj=`echo $$i| sed -e 's|\(.*\).[cf]|.libs/\1.$(OBJEXT)|g'` ;\
92              if test -r $$obj; then \
93                bla="$$bla $$obj" ;\
94              else \
95                bla="$$bla `echo $$i| sed -e 's|\(.*\).[cf]|\1.$(OBJEXT)|g'`" ;\
96              fi ;\
97              ;; \
98          esac ;\
99        done ;\
100        $(F77_SHARED_CMD) $$bla -o $(HSL_SHARED_LIB) $(F77_DLL_LINKFLAGS)
101
102if NEED_DEFFILE
103$(DEFFILE): config.status
104        echo 'LIBRARY LIBHSL' > $(DEFFILE)
105        echo 'EXPORTS' >> $(DEFFILE)
106        for i in $(EXPORT_SYMBOLS); do \
107          echo "  $$i" >> $(DEFFILE); \
108        done
109endif
110
111endif  # EXTRA_SHARED_COMMAND
112
113install-exec-local: $(HSL_SHARED_LIB)
114if EXTRA_SHARED_COMMAND
115        test -z "$(DESTDIR)$(libdir)/coin/ThirdParty" || $(mkdir_p) "$(DESTDIR)$(libdir)/coin/ThirdParty"
116        $(libLTLIBRARIES_INSTALL) $(HSL_SHARED_LIB) "$(DESTDIR)$(libdir)/coin/ThirdParty/$(HSL_SHARED_LIB)"
117endif
118        $(install_sh_DATA) config_coinhsl.h $(DESTDIR)$(includecoindir)/CoinHslConfig.h
119
120uninstall-local:
121        rm -f "$(DESTDIR)$(libdir)/coin/ThirdParty/$(HSL_SHARED_LIB)"
122        rm -f $(DESTDIR)$(includecoindir)/CoinHslConfig.h
123
124pkgconfiglibdir = $(libdir)/pkgconfig
125pkgconfiglib_DATA = coinhsl.pc
126
127endif  # BUILD_COINHSL
128
129test:
130        @echo "No test available for HSL."
131
132# Need to overwrite automake definition since otherwise libtool does not
133# understand the fortran file (need to add --tag=F77)
134LTFCCOMPILE = $(LIBTOOL) --tag=F77 --mode=compile $(FC) $(AM_FCFLAGS) $(FCFLAGS)
135
136
137########################################################################
138#                         Maintainer Stuff                             #
139########################################################################
140
141CLEANFILES = $(HSL_SHARED_LIB) $(DEFFILE) *.mod
142
143# Files that are generated and should be cleaned with make distclean
144DISTCLEANFILES =
145
146include BuildTools/Makemain.inc
Note: See TracBrowser for help on using the repository browser.