Repository navigation
Expand file tree
/
Copy pathmakefile
More file actions
125 lines (94 loc) · 4.26 KB
/
Copy pathmakefile
File metadata and controls
125 lines (94 loc) · 4.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
##############################################################################
################################ makefile ####################################
##############################################################################
# #
# makefile of test (for CapacitatedFacilityLocationBlock) #
# #
# Antonio Frangioni #
# Dipartimento di Informatica #
# Universita' di Pisa #
# #
##############################################################################
# module name
NAME = CFL_test
# basic directory
DIR = .
# common stuff
include ../makefile_common
# define & include the necessary modules- - - - - - - - - - - - - - - - - - -
# if a module is not used in the current configuration, just comment out the
# corresponding include line
# each module outputs some macros to be used here:
# *OBJ is the final object(s) / library
# *LIB is the external libraries + -L< libdirs >
# *H is the list of all include files
# *INC is the -I< include directories >
# define input macros for SMS++ complete makefile, then include it
SMS++SDR = ../../SMS++
include $(SMS++SDR)/lib/makefile-inc
# CapacitatedFacilityLocationBlock
CFLBkSDR = ../../CapacitatedFacilityLocationBlock
include $(CFLBkSDR)/makefile-s
# BundleSolver
BNDSLVSDR = ../../BundleSolver
include $(BNDSLVSDR)/makefile-s
# LagrangianDualSolver
LgDSLVSDR = ../../LagrangianDualSolver
include $(LgDSLVSDR)/makefile
# not necessary, BundleSolver does that already
# MILPSolver
#MILPSSDR = ../../MILPSolver
#include $(MILPSSDR)/makefile-c
# MCFClass, needed by MCFClassSolver
MCFC_NO_PATHS = 0
libMCFClDIR = ../../MCFClassSolver/MCFClass
include $(libMCFClDIR)/lib/makefile-inc
# MCFClassSolver, assuming all dependencies (SMS++, MCFBlock, MCFClass) are
# there already (comment out if not required)
MCFCSSDR = ../../MCFClassSolver
include $(MCFCSSDR)/makefile
# MCFLemonSolver, assuming all dependencies (MCFBlock) are there already
# (comment out if not required)
# note: -std=c++20 is required if this is included
#MCFLESDR = ../../MCFLemonSolver
#include $(MCFLESDR)/makefile
# main module (linking phase) - - - - - - - - - - - - - - - - - - - - - - - -
# object files
MOBJ = $(BNDSLVOBJ) $(LgDSLVOBJ) $(CFLBkOBJ) $(SMS++OBJ) $(MCFBkOBJ) \
$(MCFCSOBJ) $(libMCFClOBJ) $(MCFLEOBJ) $(CMMNUOBJ)
# libraries
MLIB = $(BNDSLVLIB) $(LgDSLVLIB) $(CFLBkLIB) $(SMS++LIB) $(MCFBkLIB) \
$(libMCFClLIB) $(MCFLELIB)
$(DIR)/$(NAME): $(MOBJ) $(DIR)/test.o
$(CC) -o $(DIR)/$(NAME) $^ $(MLIB) $(SW)
# dependencies: every .o from its .cpp + every recursively included .h- - - -
# include directives
MINC = $(SMS++INC) $(BNDSLVINC) $(LgDSLVINC) $(CFLBkINC) $(MCFBkINC) \
$(MCFCSINC) $(libMCFClINC) $(MCFLEINC) $(CMMNUINC)
# includes
MH = $(SMS++H) $(BNDSLVH) $(LgDSLVH) $(CFLBkH) $(MCFBkH) $(MCFCSH) \
$(MCFLEH) $(CMMNUH)
# compile command
$(DIR)/test.o: $(DIR)/test.cpp $(MH)
$(CC) -c $(DIR)/test.cpp -o $@ $(MINC) $(SW)
# the generator of the scenarios of this Block- - - - - - - - - - - - - - - -
# it writes the TwoStageStochasticBlock that the battery of the reduction then
# solves; the two stochastic modules are only linked by it
StcBlkSDR = ../../StochasticBlock
include $(StcBlkSDR)/makefile-s
TSSBkSDR = ../../TwoStageStochasticBlock
include $(TSSBkSDR)/makefile
scenarios: SW = $(SW_RELEASE)
scenarios: $(DIR)/CFLScenarioGenerator
$(DIR)/CFLScenarioGenerator: $(MOBJ) $(StcBlkOBJ) $(TSSBkOBJ) \
$(DIR)/CFLScenarioGenerator.o
$(CC) -o $@ $(DIR)/CFLScenarioGenerator.o $(MOBJ) $(StcBlkOBJ) \
$(TSSBkOBJ) $(MLIB) $(StcBlkLIB) $(SW)
$(DIR)/CFLScenarioGenerator.o: $(DIR)/CFLScenarioGenerator.cpp $(MH) \
$(StcBlkH) $(TSSBkH)
$(CC) -c $(DIR)/CFLScenarioGenerator.cpp -o $@ $(MINC) $(StcBlkINC) \
$(TSSBkINC) $(SW)
.PHONY: scenarios
clean::
rm -f $(DIR)/CFLScenarioGenerator
############################ End of makefile #################################