-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathmakefile-c
97 lines (87 loc) · 5.46 KB
/
makefile-c
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
##############################################################################
################################ makefile-c ##################################
##############################################################################
# #
# complete makefile of libMCF #
# #
# The makefile defines internally all external libraries required by #
# libMCFCl. Accordingly, all necessary OBJ, H, -I directives, and #
# external libraries + -L< libdirs > are added to the corresponding #
# libMCFCl* macros. #
# #
# Input: $(CC) = compiler command #
# $(SW) = compiler options #
# $(libMCFClDIR) = the basic directory for the library #
# MCFC_NO_PATHS if the macro is defined (irrespectively from #
# the value it has) then the two files #
# $(libMCFClDIR)/extlib/makefile-default-paths #
# and $(libMCFClDIR)/extlib/makefile-paths are #
# *not* read (the second one, optionally) to #
# define the *_ROOT macros that contain the #
# install locations of the external libraries #
# needed by MCFClass, which means that they are #
# either not needed or defined already by #
# whichever "main" makefile is including this #
# #
# Output: $(libMCFClOBJ) = the library (that must be built) #
# $(libMCFClLIB) = the external libraries + -L< libdirs > #
# $(libMCFClH) = all the .h files of the MCF library #
# $(libMCFClINC) = all the -I$( include dirs ) of the MCF library #
# #
# Antonio Frangioni #
# Dipartimento di Informatica #
# Universita' di Pisa #
# #
##############################################################################
# OS-specific settings- - - - - - - - - - - - - - - - - - - - - - - - - - - -
# defines some general values, like UNAME_S, which identify the type of OS
# and UNAME_P which identify the 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 $(libMCFClDIR)/lib/makefile-OS
# paths for external libraries- - - - - - - - - - - - - - - - - - - - - - - -
ifndef MCFC_NO_PATHS
# 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 and UNAME_P to load the
# right one of the current architecture
ifeq ($(UNAME_S),Linux)
include $(libMCFClDIR)/extlib/makefile-default-paths-linux
endif
ifeq ($(UNAME_S),Darwin)
include $(libMCFClDIR)/extlib/makefile-default-paths-macos
endif
# non-default paths
# optionally (note the "-" in front), include a makefile that should
# define all the paths needed by every other makefile (possibly after
# automatic OS adaptation, see above) to cater for external libraries
# being located in non-standard locations. This file is .gitignore-d,
# so that its values are not lost when pulling any part of the project
# anew or need be manually ignored when pushing changes.
-include $(libMCFClDIR)/extlib/makefile-paths
endif
# 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
# *LIB external libraries + -L< libdirs >
# *H is the list of all include files
# *INC is the -I< include directories >
# OPTUtils.h
OPTUxH = $(libMCFClDIR)/OPTUtils/OPTUtils.h
OPTUxINC = -I$(libMCFClDIR)/OPTUtils
# cplex external libraries (comment out if MCFCplex is not compiled, or if
# the makefile-c of MCFCplex is included rather than the "plain" one)
include $(libMCFClDIR)/extlib/makefile-libCPLEX
# libMCFCl (the makefile requiring all external modules in input)
include $(libMCFClDIR)/lib/makefile
# macros to be exported - - - - - - - - - - - - - - - - - - - - - - - - - - -
# append external libraries to libMCFClLIB as defined in the makefile, thus
# the := assignment has to be used (hope you have GNU make)
# libraries
libMCFClLIB := $(libMCFClLIB) $(libCPLEXLIB)
libMCFClINC := $(libMCFClINC) $(libCPLEXINC)
############################ End of makefile #################################