source: ThirdParty/ASL/trunk/Makefile.am @ 2141

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

build libtool library libcoinasl.la from static libamplsolver.a|lib

  • Property svn:keywords set to Author Date Id Revision
File size: 2.5 KB
Line 
1# Copyright (C) 2003, 2007 International Business Machines and others.
2# All Rights Reserved.
3# This file is distributed under the Eclipse Public License.
4
5## $Id: Makefile.am 2141 2011-03-27 16:40:30Z stefan $
6
7# the idea is to use the ASL Makefiles to build a static $(AMPLSOLVER_A) library via the compile_*_ASL scripts
8# from this library, we create a libcoinasl.la libtool library
9# in a MS VC build, we assume static libraries are used, so we can use the usual libtool machinery via LIBADD
10# in a normal build, we build the libcoinasl.la library by extracting the $(AMPLSOLVER_A) library and relinking it via libtool
11#    in a shared library build, this should give a shared libcoinasl.so library
12#    further, configure should have taken care of adding -fPIC -DPIC to the CFLAGS when compiling the ASL sources
13
14AUTOMAKE_OPTIONS = foreign
15
16EXTRA_DIST = get.ASL INSTALL.ASL
17
18if COIN_CC_IS_CL
19lib_LTLIBRARIES = libcoinasl.la
20
21libcoinasl_la_SOURCES =
22libcoinasl_la_LIBADD = $(AMPLSOLVER_A)
23
24# This is for libtool
25libcoinasl_la_LDFLAGS = $(LT_LDFLAGS)
26endif
27
28########################################################################
29#                           Extra Targets                              #
30########################################################################
31
32compdir = compdir
33
34alltargets = stdio1.h arith.h funcadd0.$(OBJEXT)
35
36if COIN_CC_IS_CL
37$(AMPLSOLVER_A):
38        ./compile_MS_ASL
39       
40else
41$(AMPLSOLVER_A):
42        ./compile_Unix_ASL
43
44libcoinasl.la : $(AMPLSOLVER_A)
45        mkdir tmp ; cd tmp ; $(AR) x ../$(AMPLSOLVER_A) ; cd ..
46        $(LIBTOOL) --tag=CC --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -rpath $(libdir) $(LT_LDFLAGS) tmp/*.o
47        rm -rf tmp
48
49alltargets += libcoinasl.la
50
51thirdpartylibdir = $(libdir)
52thirdpartylib_DATA = libcoinasl.la
53endif
54
55stdio1.h arith.h funcadd0.$(OBJEXT): $(AMPLSOLVER_A)
56
57all-local: $(alltargets)
58
59test:
60        @echo "No test available for ASL."
61
62thirdpartyincludedir = $(includedir)/coin/ThirdParty
63thirdpartyinclude_HEADERS = \
64  solvers/asl.h solvers/asl_pfg.h solvers/asl_pfgh.h solvers/psinfo.h solvers/funcadd.h \
65  solvers/nlp.h solvers/nlp2.h solvers/getstub.h solvers/opcode.hd solvers/r_opn.hd \
66  stdio1.h arith.h
67
68pkgconfiglibdir = $(libdir)/pkgconfig
69pkgconfiglib_DATA = coinasl.pc
70
71CLEANFILES = $(AMPLSOLVER_A) $(alltargets)
72
73########################################################################
74#                         Maintainer Stuff                             #
75########################################################################
76
77# Files that are generated and should be cleaned with make distclean
78DISTCLEANFILES =
79
80include BuildTools/Makemain.inc
Note: See TracBrowser for help on using the repository browser.