-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
140 lines (109 loc) · 4.83 KB
/
Copy pathmakefile
File metadata and controls
140 lines (109 loc) · 4.83 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
##############################################################################
################################ makefile ####################################
##############################################################################
# #
# makefile of cpx_pars / scip_pars / grb_pars / highs_pars #
# #
# Antonio Frangioni #
# Dipartimento di Informatica #
# Universita' di Pisa #
# #
##############################################################################
# basic directory
DIR = .
# define the directory of "core" SMS++ as required by the following includes
SMS++SDR = $(DIR)/../../SMS++
# OS-specific settings
# defines some general values, like UNAME_S, which identify the type of OS
# and architecture for which the project is being compiled, so that other
# makefiles can rely on these to automatically adapt without a need for the
# user to manually edit them
include $(SMS++SDR)/lib/makefile-OS
# default paths
# include a makefile that defines all the *_ROOT paths needed by every other
# makefile (possibly after automatic OS adaptation, see above) relatively to
# the places where all external libraries are to be found; use the previously
# defined UNAME_S to load the one of the current architecture
ifeq ($(UNAME_S),Linux)
include $(SMS++SDR)/../extlib/makefile-default-paths-linux
endif
ifeq ($(UNAME_S),Darwin)
include $(SMS++SDR)/../extlib/makefile-default-paths-macos
endif
# non-default paths
# optionally (note the "-" in front) include a makefile that defines all the
# *_ROOT paths needed by every other makefile (possibly after automatic OS
# adaptation, see above) to cater for external libraries being located in
# non-standard locations.
-include $(SMS++SDR)/../extlib/makefile-paths
# common flags
COMMON_SW = -std=c++20
# debug switches
SW_DEBUG = -g -glldb -fno-inline
# production switches
SW_RELEASE = -O3 -DNDEBUG
# compiler
CC = clang++
# switches: the debug and release targets override these, but a specific
# *_pars target can be requested directly, and it needs them as well
SW = $(COMMON_SW) $(SW_RELEASE)
# default target- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
default: release
# debug target- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
debug: SW = $(COMMON_SW) $(SW_DEBUG)
# release target- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
release: SW = $(COMMON_SW) $(SW_RELEASE)
# include the makefiles of the individual *_pars- - - - - - - - - - - - - - -
# if you are not interested in some of them, just comment them away here
#
# If a specific target is requested, only include the makefile(s) strictly
# needed for that target, so that missing optional dependencies do not prevent
# building the requested parser.
# no explicit target, or generic targets requiring all pars
ifeq ($(strip $(MAKECMDGOALS)),)
include $(DIR)/makefile_cpx
include $(DIR)/makefile_grb
include $(DIR)/makefile_highs
include $(DIR)/makefile_scip
include $(DIR)/makefile_pips
else ifneq ($(filter default debug release clean distclean,$(MAKECMDGOALS)),)
include $(DIR)/makefile_cpx
include $(DIR)/makefile_grb
include $(DIR)/makefile_highs
include $(DIR)/makefile_scip
include $(DIR)/makefile_pips
else
ifneq ($(filter cpx_pars,$(MAKECMDGOALS)),)
include $(DIR)/makefile_cpx
endif
ifneq ($(filter grb_pars,$(MAKECMDGOALS)),)
include $(DIR)/makefile_grb
endif
ifneq ($(filter highs_pars,$(MAKECMDGOALS)),)
include $(DIR)/makefile_highs
endif
ifneq ($(filter scip_pars,$(MAKECMDGOALS)),)
include $(DIR)/makefile_scip
endif
ifneq ($(filter pips_pars,$(MAKECMDGOALS)),)
include $(DIR)/makefile_pips
endif
endif
# collate all (defined) executables
NAME = $(CPX_PARS) $(GRB_PARS) $(HIGHS_PARS) $(SCIP_PARS) $(PIPS_PARS)
# default target- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#default: release
# debug target- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#debug: SW = $(SW_DEBUG)
debug: $(NAME)
# release target- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#release: SW = $(SW_RELEASE)
release: $(NAME)
# clean target- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
clean::
rm -f $(DIR)/*.o $(DIR)/*~ $(NAME)
# distclean target- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
distclean: clean
# phony targets - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
.PHONY: debug release clean distclean
############################ End of makefile #################################