Repository navigation
Expand file tree
/
Copy pathmakefile-s
More file actions
78 lines (69 loc) · 4.39 KB
/
Copy pathmakefile-s
File metadata and controls
78 lines (69 loc) · 4.39 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
##############################################################################
################################ makefile-s ##################################
##############################################################################
# #
# makefile of LagrangianDualSolver and its dependencies, excluding SMS++ #
# #
# The makefile defines internally all external libraries required by #
# LagrangianDualSolver, excluding the SMS++ core ones whose symbols are #
# assumed to have been defined already (e.g. by including #
# SMS++/lib/makefile). Accordingly, all necessary OBJ, H, -I directives, #
# external libraries + -L< libdirs > are added to the corresponding #
# LgDSLV* macros. #
# #
# Input: $(CC) = compiler command #
# $(SW) = compiler options #
# $(SMS++INC) = the -I$( core SMS++ directory ) #
# $(SMS++OBJ) = the core SMS++ library #
# $(LgDSLVSDR) = the directory where LagrangianDualSolver source #
# is #
# $(LgDSLVODR) = the directory where the objects have to be put #
# #
# Output: $(LgDSLVOBJ) = the final object(s) / library #
# $(LgDSLVLIB) = external libraries + -L< libdirs > #
# $(LgDSLVH) = the .h files to include for LagrangianDualSolver #
# $(LgDSLVINC) = the -I$( LagrangianDualSolver directory ) #
# #
# Antonio Frangioni #
# Enrico Gorgone #
# Dipartimento di Informatica #
# Universita' di Pisa #
# #
##############################################################################
# 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/library
# *H is the list of all include files
# *INC is the -I< include directories >
# define input macros for MILPSolver makefile + dependencies, then include
# it; use the makefile-s version since the SMS++ stuff is supposed to be
# there already
MILPSSDR = $(LgDSLVSDR)/../MILPSolver
include $(MILPSSDR)/makefile-s
# define input macros for BranchAndXSolver makefile + dependencies, then
# include it; LagrangianDualRelaxationSolver uses its components for the
# choice of the branching variable (BranchingRule.h)
BAXSLVSDR = $(LgDSLVSDR)/../BranchAndXSolver
include $(BAXSLVSDR)/makefile-s
# define input macros for Torch library makefile, then include it;
# LagrangianDualRelaxationSolverML is only compiled in if Torch is actually
# installed at $(Torch_ROOT)
LgDSLVTORCHH = $(subst $\",,$(Torch_ROOT))/include/torch/csrc/api/include
ifneq ($(wildcard $(LgDSLVTORCHH)/torch/torch.h),)
include $(LgDSLVSDR)/../extlib/makefile-libTorch
LgDSLVML = 1
endif
# include the makefile requiring all external modules in input
include $(LgDSLVSDR)/makefile
# macros to be exported - - - - - - - - - - - - - - - - - - - - - - - - - - -
# append external stuff defined in the other makefiles to LgDSLVOBJ,
# LgDSLVINC and LgDSLVH, thus the := assignment has to be used (use GNU make)
LgDSLVOBJ := $(LgDSLVOBJ) $(MILPSOBJ) $(BAXSLVOBJ)
LgDSLVINC := $(LgDSLVINC) $(MILPSINC) $(BAXSLVINC) $(libTorchINC)
LgDSLVH := $(LgDSLVH) $(MILPSH) $(BAXSLVH)
# external libraries for LagrangianDualSolver (those of MILPSolver, and
# Torch for LagrangianDualRelaxationSolverML)
LgDSLVLIB = $(MILPSLIB) $(BAXSLVLIB) $(libTorchLIB)
############################ End of makefile #################################