28
28
29
29
# choose 32 bits by preference
30
30
ifdef MXE
31
- MXE_32bit =$(shell if which i686-w64-mingw32.shared-g++>&/dev/null; then echo 1; fi)
32
- MXE_64bit =$(shell if which x86_64-w64-mingw32.shared-g++>&/dev/null; then echo 1; fi)
33
- ifeq ($(MXE_32bit ) ,1)
34
- MXE_PREFIX =i686-w64-mingw32.shared
35
- else
36
- ifeq ($(MXE_64bit ) ,1)
37
- MXE_PREFIX =x86_64-w64-mingw32.shared
38
- else
39
- $(error "MXE compiler not found")
40
- endif
41
- BOOST_EXT =-mt-x64
42
- endif
31
+ MXE_32bit =$(shell if which i686-w64-mingw32.shared-g++>&/dev/null; then echo 1; fi)
32
+ MXE_64bit =$(shell if which x86_64-w64-mingw32.shared-g++>&/dev/null; then echo 1; fi)
33
+ ifeq ($(MXE_32bit),1)
34
+ MXE_PREFIX =i686-w64-mingw32.shared
35
+ else
36
+ ifeq ($(MXE_64bit),1)
37
+ MXE_PREFIX =x86_64-w64-mingw32.shared
38
+ else
39
+ $(error "MXE compiler not found")
40
+ endif
41
+ BOOST_EXT =-mt-x64
42
+ endif
43
43
44
- # force 64 bit build
45
- ifdef MXE64
46
- MXE_64bit =$(shell if which x86_64-w64-mingw32.shared-g++>&/dev/null; then echo 1; fi)
47
- ifeq ($(MXE_64bit ) ,1)
48
- MXE_PREFIX =x86_64-w64-mingw32.shared
49
- else
50
- $(error "MXE compiler not found")
51
- endif
44
+ # force 64 bit build
45
+ ifdef MXE64
46
+ MXE_64bit =$(shell if which x86_64-w64-mingw32.shared-g++>&/dev/null; then echo 1; fi)
47
+ ifeq ($(MXE_64bit),1)
48
+ MXE_PREFIX =x86_64-w64-mingw32.shared
49
+ else
50
+ $(error "MXE compiler not found")
51
+ endif
52
+ endif
52
53
endif
53
54
54
-
55
55
FLAGS+=-DECOLAB_HOME =\"$(ECOLAB_HOME ) \"
56
56
57
57
ifdef MPI_DEBUG
@@ -75,115 +75,123 @@ ICC=
75
75
AQUA =
76
76
77
77
ifneq ($(MAKECMDGOALS ) ,clean)
78
- # configuration variables generated by make configure
79
- include $(ECOLAB_HOME ) /include/Makefile.config
78
+ # configuration variables generated by make configure
79
+ include $(ECOLAB_HOME ) /include/Makefile.config
80
80
endif
81
81
82
82
.SUFFIXES : .cd .d .rc $(SUFFIXES )
83
83
VPATH =$(ECOLAB_HOME ) /classdesc $(ECOLAB_HOME ) /classdesc/json5_parser/json5_parser $(ECOLAB_HOME ) /graphcode $(ECOLAB_HOME ) /include
84
84
PATH: =$(ECOLAB_HOME ) /bin:$(PATH ) :$(HOME ) /usr/bin
85
85
CLASSDESC =$(ECOLAB_HOME ) /bin/classdesc
86
- PKG_CONFIG_PATH: =$(HOME ) /usr/lib/pkgconfig:/usr/local/lib/pkgconfig:/opt/local/lib/pkgconfig:$(PKG_CONFIG_PATH )
87
- PKG_CONFIG =env PKG_CONFIG_PATH=$(PKG_CONFIG_PATH ) pkg-config
88
-
89
- # where to look for installed software (prefix values)
90
- # nb Cygwin does not like /usr put here. Add it to the search command
91
- DIRS =$(ECOLAB_HOME ) $(HOME ) /usr /usr/local /opt/local /usr/X11R6
92
- # a search mechanism to find a particular file
93
- # use as $(call search,name)
86
+
94
87
ifdef MXE
95
- DIRS+ =$(dir `which $(MXE_PREFIX ) -g++`)
96
- search =$(firstword $(foreach dir,$(DIRS ) ,$(wildcard $(dir ) /$(1 ) ) ) )
88
+ # rewrite ecolab home to be the mxe one
89
+ ifeq ($(ECOLAB_HOME),$(HOME)/usr/ecolab)
90
+ ECOLAB_HOME =$(HOME ) /usr/mxe/ecolab
91
+ endif
92
+ # where to look for installed software (prefix values)
93
+ DIRS =$(ECOLAB_HOME ) $(HOME ) /usr/mxe $(subst bin/$(CPLUSPLUS ) ,$(MXE_PREFIX ) ,$(shell which $(CPLUSPLUS ) ) )
94
+
95
+ # a search mechanism to find a particular file
96
+ # use as $(call search,name)
97
+ search =$(firstword $(foreach dir,$(DIRS ) ,$(wildcard $(dir ) /$(1 ) ) ) )
98
+
99
+ # xdr on MXE is positively ancient, so just disable it here
100
+ XDR =
101
+ PKG_CONFIG_PATH: =$(HOME ) /usr/mxe/lib/pkgconfig:$(PKG_CONFIG_PATH )
102
+ PKG_CONFIG =env PKG_CONFIG_PATH=$(PKG_CONFIG_PATH ) $(MXE_PREFIX ) -pkg-config
103
+ LIBS+ =-lgdiplus
104
+
97
105
else
98
- search =$(firstword $(foreach dir,$(DIRS ) /usr,$(wildcard $(dir ) /$(1 ) ) ) )
106
+ # where to look for installed software (prefix values)
107
+ # nb Cygwin does not like /usr put here. Add it to the search command
108
+ DIRS =$(ECOLAB_HOME ) $(HOME ) /usr /usr/local /opt/local /usr/X11R6
109
+ # a search mechanism to find a particular file
110
+ # use as $(call search,name)
111
+ search =$(firstword $(foreach dir,$(DIRS ) /usr,$(wildcard $(dir ) /$(1 ) ) ) )
112
+
113
+ PKG_CONFIG_PATH: =$(HOME ) /usr/lib/pkgconfig:/usr/local/lib/pkgconfig:/opt/local/lib/pkgconfig:$(PKG_CONFIG_PATH )
114
+ PKG_CONFIG =env PKG_CONFIG_PATH=$(PKG_CONFIG_PATH ) pkg-config
99
115
endif
100
116
117
+ # add standard list of search paths, -L/usr/lib32 must be before this statement
118
+ LIBS+ = $(DIRS:%=-L%/lib )
119
+ FLAGS+=$(DIRS:% =-I%/include)
120
+
101
121
# where to find classdesc header files (eg pack_base.h)
102
122
CDINCLUDE =$(ECOLAB_HOME ) /include
103
123
104
124
ifdef AEGIS
105
- # unused-variable warnings fail certain RAII usages in C++
106
- FLAGS+ =-Werror -Wall -Wno-unused-variable -Wno-unused-function
107
- # for now, we maintain the code for C++98 standard
108
- # noexcept-type is a warning about ABI changes coming in C++17
109
- # Travis complains about unused-local-typedefs, so shut it up.
110
- CXXFLAGS+ =-Wno-noexcept-type -Wno-unused-local-typedefs -std=c++20
125
+ # unused-variable warnings fail certain RAII usages in C++
126
+ FLAGS+ =-Werror -Wall -Wno-unused-variable -Wno-unused-function
127
+ # for now, we maintain the code for C++98 standard
128
+ # noexcept-type is a warning about ABI changes coming in C++17
129
+ # Travis complains about unused-local-typedefs, so shut it up.
130
+ CXXFLAGS+ =-Wno-noexcept-type -Wno-unused-local-typedefs -std=c++20
111
131
endif
112
132
113
- # needed for generating .so files
114
133
ifndef MXE
115
- FLAGS+ =-fPIC
134
+ # needed for generating .so files
135
+ FLAGS+ =-fPIC
136
+
137
+ # use mpicc etc by default if MPI set
138
+ ifdef MPI
139
+ HAVE_mpiCC =$(shell if which mpiCC>&/dev/null; then echo 1; fi)
140
+ CC =mpicc
141
+ ifeq ($(HAVE_mpiCC),1)
142
+ CPLUSPLUS =mpiCC
143
+ else
144
+ # newer versions of mpich use this name!!
145
+ CPLUSPLUS =mpicxx
146
+ endif
147
+ LINK =$(CPLUSPLUS )
148
+ CPP =$(CPLUSPLUS ) -E
149
+
150
+ # disable inclusion of mpi++.h in the MPICH case (don't know what the problem is here)
151
+ FLAGS+ =-UHAVE_MPI_CPP
152
+ else
153
+ # Engage Intel OneAPI compiler
154
+ ifdef DPCPP
155
+ CPLUSPLUS =icpx
156
+ SYCL+ =-fsycl
157
+ # -std=c++20 used to suppress warning messages
158
+ FLAGS+=-std =c++20 -Wno-vla-cxx-extension
159
+ else
160
+ CPLUSPLUS =g++
161
+ endif
162
+ CC =gcc
163
+ LINK =$(CPLUSPLUS ) $(SYCL )
164
+ CPP =g++ -E
165
+ endif
166
+
167
+ ifdef CCACHE
168
+ CC: =ccache $(CC )
169
+ CPLUSPLUS: =ccache $(CPLUSPLUS )
170
+ endif
116
171
117
- BOOST_EXT =
118
- # try to autonomously figure out which boost extension we should be using
172
+ BOOST_EXT =
173
+ # try to autonomously figure out which boost extension we should be using
119
174
ifeq ($(shell if $(CPLUSPLUS) test/testmain.cc $(LIBS) -lboost_system>&/dev/null; then echo 1; else echo 0; fi),0)
120
175
ifeq ($(shell if $(CPLUSPLUS) test/testmain.cc $(LIBS) -lboost_system-mt>&/dev/null; then echo 1; else echo 0; fi),1)
121
176
BOOST_EXT =-mt
122
177
else
123
178
$(warning cannot figure out boost extension)
124
179
endif
125
180
endif
126
- $(warning Boost extension=$(BOOST_EXT))
127
- endif
128
-
129
- # use mpicc etc by default if MPI set
130
- ifdef MPI
131
- HAVE_mpiCC =$(shell if which mpiCC>&/dev/null; then echo 1; fi)
132
- CC =mpicc
133
- ifeq ($(HAVE_mpiCC ) ,1)
134
- CPLUSPLUS =mpiCC
135
- else
136
- # newer versions of mpich use this name!!
137
- CPLUSPLUS =mpicxx
138
- endif
139
- LINK =$(CPLUSPLUS )
140
- CPP =$(CPLUSPLUS ) -E
141
-
142
- # disable inclusion of mpi++.h in the MPICH case (don't know what the problem is here)
143
- FLAGS+ =-UHAVE_MPI_CPP
144
- else
145
- # Engage Intel OneAPI compiler
146
- ifdef DPCPP
147
- CPLUSPLUS =icpx
148
- SYCL+ =-fsycl
149
- # -std=c++20 used to suppress warning messages
150
- FLAGS+=-std =c++20 -Wno-vla-cxx-extension
151
- else
152
- CPLUSPLUS =g++
153
- endif
154
- CC =gcc
155
- LINK =$(CPLUSPLUS ) $(SYCL )
156
- CPP =g++ -E
157
- endif
158
-
159
- ifdef CCACHE
160
- CC: =ccache $(CC )
161
- CPLUSPLUS: =ccache $(CPLUSPLUS )
162
- endif
163
-
164
- GCC =1
165
- FLAGS+ = -DNO_FWD_DECLARE_STL -DMXE -DSTATIC_BUILD
166
- CC =$(MXE_PREFIX ) -gcc
167
- CPLUSPLUS =$(MXE_PREFIX ) -g++
168
- LINK =$(CPLUSPLUS )
169
- CPP =$(CPLUSPLUS ) -E
170
- # rewrite ecolab home to be the mxe one
171
- ifeq ($(ECOLAB_HOME ) ,$(HOME ) /usr/ecolab)
172
- ECOLAB_HOME =$(HOME ) /usr/mxe/ecolab
173
- endif
174
- DIRS =$(ECOLAB_HOME ) $(HOME ) /usr/mxe $(subst bin/$(CPLUSPLUS ) ,$(MXE_PREFIX ) ,$(shell which $(CPLUSPLUS ) ) )
175
- PKG_CONFIG_PATH: =$(HOME ) /usr/mxe/lib/pkgconfig:$(PKG_CONFIG_PATH )
176
- PKG_CONFIG =env PKG_CONFIG_PATH=$(PKG_CONFIG_PATH ) $(MXE_PREFIX ) -pkg-config
177
- LIBS+ =-lgdiplus
178
-
179
- # xdr on MXE is positively ancient, so just disable it here
180
- XDR =
181
-
182
- # rule for running the resource compiler
183
- .rc.o :
181
+ $(warning Boost extension=$(BOOST_EXT))
182
+ else # MXE
183
+ GCC =1
184
+ FLAGS+ = -DNO_FWD_DECLARE_STL -DMXE -DSTATIC_BUILD
185
+ CC =$(MXE_PREFIX ) -gcc
186
+ CPLUSPLUS =$(MXE_PREFIX ) -g++
187
+ LINK =$(CPLUSPLUS )
188
+ CPP =$(CPLUSPLUS ) -E
189
+
190
+ # rule for running the resource compiler
191
+ .rc.o :
184
192
$(MXE_PREFIX ) -windres -O coff -i $< -o $@
185
193
186
- .rc.d :
194
+ .rc.d :
187
195
touch $@
188
196
endif
189
197
@@ -298,10 +306,6 @@ FLAGS+=-DTR1
298
306
endif
299
307
endif
300
308
301
- # add standard list of search paths, -L/usr/lib32 must be before this statement
302
- LIBS+ = $(DIRS:%=-L%/lib )
303
- FLAGS+=$(DIRS:% =-I%/include)
304
-
305
309
# canonicalise CYGWIN's OS name
306
310
ifeq ($(findstring CYGWIN,$(OS ) ) ,CYGWIN)
307
311
OS =CYGWIN
0 commit comments