-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
98 lines (74 loc) · 3.64 KB
/
Copy pathmakefile
File metadata and controls
98 lines (74 loc) · 3.64 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
##############################################################################
################################ makefile ####################################
##############################################################################
# #
# makefile of test (for FrankWolfeSolver) #
# #
# Antonio Frangioni #
# Dipartimento di Informatica #
# Universita' di Pisa #
# #
##############################################################################
# module name
NAME = FWS_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 >
# MCFBlock (its makefile-c brings in the core SMS++)
MCFBkSDR = ../../MCFBlock
include $(MCFBkSDR)/makefile-c
# MCFClass, needed by MCFClassSolver (now a separate module)
MCFC_NO_PATHS = 0
libMCFClDIR = ../../MCFClassSolver/MCFClass
include $(libMCFClDIR)/lib/makefile-inc
# MCFClassSolver (the MCFSolver<...> LMO of each MCFBlock sub-Block); deps
# (SMS++, MCFBlock, MCFClass) are defined above
MCFCSSDR = ../../MCFClassSolver
include $(MCFCSSDR)/makefile
# MILPSolver (the core SMS++ is already defined by MCFBlock above)
MILPSSDR = ../../MILPSolver
include $(MILPSSDR)/makefile-s
# FrankWolfeSolver (the core SMS++ is already defined above)
FWSlvSDR = ../../FrankWolfeSolver
include $(FWSlvSDR)/makefile-s
# UCBlock (ThermalUnitBlock + ThermalUnitDPSolver for the TUB test); the core
# SMS++ is already defined above, this brings the UCBlock objects/includes
UCBckDIR = ../../UCBlock
include $(UCBckDIR)/lib/makefile
# the common_utils macros ($(CMMNU*)) and build rule come from makefile_common
# main module (linking phase) - - - - - - - - - - - - - - - - - - - - - - - -
# object files
MOBJ = $(CMMNUOBJ) $(MCFBkOBJ) $(MCFCSOBJ) $(libMCFClOBJ) $(MILPSOBJ) \
$(FWSlvOBJ) $(UCBckOBJ)
# libraries
MLIB = $(MCFBkLIB) $(libMCFClLIB) $(MILPSLIB) $(FWSlvLIB) $(UCBckLIB)
# include directives
MINC = $(MCFBkINC) $(MCFCSINC) $(libMCFClINC) $(MILPSINC) $(FWSlvINC) \
$(UCBckINC) $(CMMNUINC)
# includes
MH = $(MCFBkH) $(MCFCSH) $(MILPSH) $(FWSlvH) $(UCBckH) $(CMMNUH)
$(DIR)/$(NAME): $(MOBJ) $(DIR)/test.o
$(CC) -o $(DIR)/$(NAME) $(DIR)/test.o $(MOBJ) $(MLIB) $(SW)
# second executable: the MCFBlock-specific Modification tester. Built on demand
# with "make mcf" (which sets the release compile flags, like the default
# "release" target does for the main executable)
mcf: SW = $(SW_RELEASE)
mcf: $(DIR)/FWS_mcf_test
$(DIR)/FWS_mcf_test: $(MOBJ) $(DIR)/test-mcf.o
$(CC) -o $(DIR)/FWS_mcf_test $(DIR)/test-mcf.o $(MOBJ) $(MLIB) $(SW)
# dependencies: every .o from its .cpp + every recursively included .h- - - -
# compile command
$(DIR)/test.o: $(DIR)/test.cpp $(DIR)/fw_test_common.h $(MH)
$(CC) -c $*.cpp -o $@ $(MINC) $(SW)
$(DIR)/test-mcf.o: $(DIR)/test-mcf.cpp $(DIR)/fw_test_common.h $(MH)
$(CC) -c $*.cpp -o $@ $(MINC) $(SW)
############################ End of makefile ################################