1# Copyright (C) 2006, 2007 International Business Machines and others.
2# All Rights Reserved.
3# This file is distributed under the Eclipse Public License.
4
5## $Id$
6
7# Author:  Andreas Waechter           IBM    2006-04-13
8
9AUTOMAKE_OPTIONS = foreign
10
11# What is done in this directory:
12
13if COIN_HAS_ASL
14  bin_PROGRAMS = bonmin
15  noinst_PROGRAMS = BonNodeSolver
16endif
17
18########################################################################
19#                                bonmin                                #
20########################################################################
21
22bonmin_SOURCES = BonMin.cpp
23
24bonmin_LDADD = \
25	../CbcBonmin/libbonminampl.la \
26	../CbcBonmin/libbonmin.la \
27	$(BONMINLIB_LIBS) \
28	$(ASL_LIBS)
29
30bonmin_DEPENDENCIES = \
31	../CbcBonmin/libbonminampl.la \
32	../CbcBonmin/libbonmin.la \
33	$(BONMINLIB_DEPENDENCIES) \
34	$(ASL_DEPENDENCIES)
35
36# Here list all include flags, relative to this "srcdir" directory.  This
37# "cygpath" stuff is necessary to compile with native compilers on Windows
38AM_CPPFLAGS = \
39	-I`$(CYGPATH_W) $(srcdir)/../Algorithms` \
40	-I`$(CYGPATH_W) $(srcdir)/../Algorithms/Branching` \
41	-I`$(CYGPATH_W) $(srcdir)/../Algorithms/OaGenerators` \
42	-I`$(CYGPATH_W) $(srcdir)/../Algorithms/Ampl` \
43	-I`$(CYGPATH_W) $(srcdir)/../Interfaces` \
44	-I`$(CYGPATH_W) $(srcdir)/../Interfaces/Ipopt` \
45	-I`$(CYGPATH_W) $(srcdir)/../Interfaces/Ampl` \
46	-I`$(CYGPATH_W) $(srcdir)/../CbcBonmin` \
47	$(BONMINLIB_CFLAGS)
48
49# This line is necessary to allow VPATH compilation
50DEFAULT_INCLUDES = -I. -I`$(CYGPATH_W) $(srcdir)` -I$(top_builddir)/src/Interfaces
51
52########################################################################
53#                              nodeSolver                              #
54########################################################################
55
56BonNodeSolver_SOURCES = BonNodeSolver.cpp
57
58BonNodeSolver_LDADD = \
59	../CbcBonmin/libbonminampl.la \
60	../CbcBonmin/libbonmin.la \
61	$(BONMINLIB_LIBS) \
62	$(ASL_LIBS)
63
64BonNodeSolver_DEPENDENCIES = \
65	../CbcBonmin/libbonminampl.la \
66	../CbcBonmin/libbonmin.la \
67	$(BONMINLIB_DEPENDENCIES) \
68	$(ASL_DEPENDENCIES)
69
70########################################################################
71#                     Installing manifest (MSVC++)                     #
72########################################################################
73
74if COIN_HAS_ASL
75if COIN_CXX_IS_CL
76install-exec-hook:
77	test -s bonmin.exe.manifest && \
78	mt -manifest bonmin.exe.manifest -outputresource:bonmin.exe;\
79	cp bonmin.exe $(bindir)/bonmin.exe
80endif
81endif
82
83########################################################################
84#                            Astyle stuff                              #
85########################################################################
86
87# Here repeat all source files, with "bak" appended
88ASTYLE_FILES = \
89             BonMin.cppbak \
90             BonNodeSolver.cppbak
91
92CLEANFILES = $(ASTYLE_FILES)
93
94DISTCLEANFILES =
95
96SUFFIXES = .cppbak .hppbak
97
98astyle: $(ASTYLE_FILES)
99
100.hpp.hppbak:
101	mv $< $@
102	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
103	touch $@
104
105.cpp.cppbak:
106	mv $< $@
107	$(ASTYLE) $(ASTYLEFLAGS) < $@ > $<
108	touch $@
109