Debian Codegraph @

SYMPHONY/Applications/VRP/Makefile.orig

raw
1 ##############################################################################
2 ##############################################################################
3 # #
4 # This file is part of a demonstration application for use with the #
5 # SYMPHONY MILP Solver Framework. This application is a solver for #
6 # the Vehicle Routing Problem and the Traveling Salesman Problem. #
7 # #
8 # (c) Copyright 2000-2005 Ted Ralphs. All Rights Reserved. #
9 # #
10 # This application was developed by Ted Ralphs ([email protected]) #
11 # #
12 # This software is licensed under the Eclipse Public License. Please see #
13 # accompanying file for terms. #
14 # #
15 ##############################################################################
16 ##############################################################################
17
18 ##############################################################################
19 # First, we have to define some variables that will be used
20 ##############################################################################
21
22 ##############################################################################
23 # SYMPHONY's home directory
24 ##############################################################################
25
26 SYMPHONYROOT = ../..
27
28 ##############################################################################
29 # The home directory of the user files (must be an absolute path)
30 ##############################################################################
31
32 USERROOT = .
33
34 ##############################################################################
35 # The customized name of the master program (if desired)
36 ##############################################################################
37
38 MASTERNAME = vrp
39
40 ##############################################################################
41 # These are only needed if parallel computation is used. Please see the
42 # explanation of these variables in SYMPHONY's configuration file.
43 ##############################################################################
44
45 COMPILE_IN_TM = TRUE
46 COMPILE_IN_LP = TRUE
47 COMPILE_IN_CG = TRUE
48 COMPILE_IN_CP = TRUE
49
50 ##############################################################################
51 # This section is for listing VRP source file names
52 ##############################################################################
53
54 MACROS_SRC = vrp_macros.c
55 COST_SRC = compute_cost.c
56 NET_SRC = network.c
57 DG_FUNC_SRC = vrp_dg_functions.c
58
59 USER_MASTER_SRC = vrp_main.c vrp_master.c vrp_io.c vrp_master_functions.c
60 USER_MASTER_SRC += small_graph.c $(NET_SRC)
61 USER_MASTER_SRC += $(COST_SRC)
62 ifeq ($(COMPILE_IN_TM),TRUE)
63 USER_MASTER_SRC += $(USER_TM_SRC)
64 ifeq ($(COMPILE_IN_LP),FALSE)
65 USER_MASTER_SRC += $(MACROS_SRC) $(DG_FUNC_SRC)
66 endif
67 else
68 USER_MASTER_SRC += $(MACROS_SRC) $(DG_FUNC_SRC)
69 endif
70
71 ifeq ($(COMPILE_IN_LP),TRUE)
72 USER_TM_SRC = $(USER_LP_SRC)
73 endif
74 ifeq ($(COMPILE_IN_CP),TRUE)
75 USER_TM_SRC += vrp_cp.c
76 endif
77
78 USER_LP_SRC = vrp_lp_branch.c vrp_lp.c
79 USER_LP_SRC += $(MACROS_SRC) $(DG_FUNC_SRC)
80 ifeq ($(COMPILE_IN_LP),FALSE)
81 USER_LP_SRC += $(NET_SRC)
82 endif
83 ifeq ($(COMPILE_IN_CG),TRUE)
84 USER_LP_SRC += vrp_cg.c biconnected.c shrink.c
85 endif
86
87 USER_CG_SRC = vrp_cg.c biconnected.c
88 USER_CG_SRC += compute_cost.c shrink.c $(DG_FUNC_SRC)
89 USER_CG_SRC += $(MACROS_SRC) $(NET_SRC)
90
91 USER_CP_SRC = vrp_cp.c $(MACROS_SRC)
92
93 USER_DG_SRC = vrp_dg.c vrp_dg_network.c $(MACROS_SRC)
94
95 USER_INCDIR =
96 USER_SRCDIR =
97
98 ##############################################################################
99 # This section is for CONCORDE
100 ##############################################################################
101
102 ##############################################################################
103 # This solver can use separation routines from CONCORDE, the
104 # TSP solver of Applegate, Bixby, Chvatal, and Cook. To enable this option:
105 # 1. set the variables DO_CONCORDE_CUTS to TRUE.
106 # 2. Download the source code for CONCORDE and the qsopt LP solver from
107 # http://www.tsp.gatech.edu.
108 # 3. Put qsopt.a and qsopt.h in ~/lib (make the directory if it doesn't exist).
109 # 4. Put a copy of qsopt.h in ~/include (make this directory if it doesn't
110 # exist).
111 #.5. Rename qsopt.a libqsopt.a (so it is detected as a library).
112 # 6. Build concorde with qsopt as the LP solver (configure --with-qsopt=~/lib).
113 # 7. Move the resulting library concorde.a to ~/lib and rename it
114 # libconcorde.a (or create a soft link).
115 # 8. Put a copy of concorde.h in ~/include (or create a soft link).
116 # 9. Make the CNRP application as usual.
117 ##############################################################################
118
119 DO_CONCORDE_CUTS = FALSE
120
121 ifeq ($(DO_CONCORDE_CUTS),TRUE)
122 USER_BB_DEFINES += -DDO_TSP_CUTS
123 USERLIBS = -lconcorde -lcplex
124 USERLIBPATHS = ${HOME}/lib
125 USER_INCDIR += -I${HOME}/include
126
127 ifeq ($(COMPILE_IN_CG),TRUE)
128 USER_LP_SRC += tsp.c # $(TSP_SRC)
129 endif
130
131 USER_CG_SRC += tsp.c # $(TSP_SRC)
132 endif
133
134 ##############################################################################
135 # This is the flag for the SYMPHONY Makefile to determine whether
136 # an application is to be used. You shouldn't need to modify this
137 # variable.
138 ##############################################################################
139
140 USE_SYM_APPL = TRUE
141
142 ##############################################################################
143 # If you want to build SYMPHONY in a directory outside the source tree,
144 # uncomment this and fill in the directory here. Setting these variables will
145 # cause object, library, and binary files associated with SYMPHONY and the
146 # user's application to be built and installed in the corresponding
147 # directories. This is helpful if the user doesn't have write access to the
148 # directory where SYMPHONY is installed.
149 ##############################################################################
150
151 SYMBUILDDIR = $(SYMPHONYROOT)
152 USERBUILDDIR = $(USERROOT)
153
154 ##############################################################################
155 # Include the SYMPHONY makefile after all the source file names (and before
156 # any used-defined targets!)
157 ##############################################################################
158
159 include $(SYMPHONYROOT)/Makefile
160