@@ -102,13 +102,17 @@ AR=ar
102
102
RANLIB =ranlib
103
103
INSTALL =install
104
104
105
+ ifndef $(OS)
106
+ OS =$(shell uname -s 2>/dev/null | tr '[:upper:]' '[:lower:]' 2>/dev/null || true)
107
+ endif
108
+
105
109
# dynamic dependencies
106
110
DUMA_DYN_DEPS =$(DUMASO ) tstheap_so$(EXEPOSTFIX ) dumatestpp_so$(EXEPOSTFIX )
107
111
108
- # some OS specific:
109
-
112
+ # some OS specifics:
110
113
ifeq ($(OS ) , Windows_NT)
111
114
ifeq ($(OSTYPE), msys)
115
+ $(info using settings for OS=Windows_NT, OSTYPE=msys)
112
116
# call mingw32-make OSTYPE=msys
113
117
# from Windows command prompt
114
118
# having added the PATH for MINGW/bin
@@ -129,6 +133,7 @@ ifeq ($(OS), Windows_NT)
129
133
EXEPOSTFIX =.exe
130
134
endif
131
135
ifeq ($(OSTYPE), msys-sh)
136
+ $(info using settings for OS=Windows_NT, OSTYPE=msys-sh)
132
137
# call mingw32-make OSTYPE=msyssh
133
138
# from MSYS shell
134
139
# having added the PATH for MINGW/bin
@@ -151,6 +156,7 @@ ifeq ($(OS), Windows_NT)
151
156
EXEPOSTFIX =.exe
152
157
endif
153
158
ifeq ($(OSTYPE), cygwin)
159
+ $(info using settings for OS=Windows_NT, OSTYPE=cygwin)
154
160
# call make OSTYPE=cygwin
155
161
BSWITCH =103
156
162
DUMA_OPTIONS += -DDUMA_EXPLICIT_INIT
@@ -163,6 +169,7 @@ ifeq ($(OS), Windows_NT)
163
169
EXEPOSTFIX =.exe
164
170
endif
165
171
ifndef BSWITCH
172
+ $(info using settings for OS=Windows_NT)
166
173
BSWITCH =100
167
174
DUMA_OPTIONS += -DDUMA_EXPLICIT_INIT
168
175
CURPATH =./
@@ -176,6 +183,7 @@ ifeq ($(OS), Windows_NT)
176
183
endif
177
184
178
185
ifeq ($(OS ) , osx)
186
+ $(info using settings for OS=osx)
179
187
# tested on darwin 8.0, which is the base for mac-osx
180
188
# call: make OS=osx
181
189
BSWITCH =210
@@ -193,6 +201,7 @@ ifeq ($(OS), osx)
193
201
endif
194
202
195
203
ifeq ($(OS ) , freebsd)
204
+ $(info using settings for OS=freebsd)
196
205
BSWITCH =310
197
206
DUMA_OPTIONS += -DDUMA_NO_THREAD_SAFETY
198
207
DUMA_OPTIONS += -DDUMA_EXPLICIT_INIT
@@ -206,7 +215,8 @@ ifeq ($(OS), freebsd)
206
215
EXEPOSTFIX =
207
216
endif
208
217
209
- ifeq ($(OS ) , netbsd)
218
+ ifeq ($(OS ) , netbsd)
219
+ $(info using settings for OS=netbsd)
210
220
BSWITCH =320
211
221
CURPATH =./
212
222
DUMASO =libduma.so.0.0.0
@@ -219,6 +229,7 @@ ifeq ($(OS), netbsd)
219
229
endif
220
230
221
231
ifeq ($(OS ) , solaris)
232
+ $(info using settings for OS=solaris)
222
233
BSWITCH =410
223
234
DUMA_OPTIONS += -DDUMA_NO_STRERROR
224
235
CURPATH =./
@@ -235,6 +246,7 @@ ifeq ($(OS), solaris)
235
246
endif
236
247
237
248
ifeq ($(OS ) , linux)
249
+ $(info using settings for OS=linux)
238
250
# Linux with GNU compiler and tools.
239
251
CC =gcc
240
252
CXX =g++
@@ -356,6 +368,8 @@ endif
356
368
@ $(ECHOLF)
357
369
@ $(ECHO) "DUMA dynamic confidence test PASSED."
358
370
@ $(ECHOLF)
371
+ @ $(ECHO) "You may now run make install and then installcheck"
372
+ @ $(ECHOLF)
359
373
endif
360
374
361
375
# Perform installation tests (if any).
@@ -502,7 +516,7 @@ libduma.a: duma_config.h verinfo.h $(OBJECTS)
502
516
503
517
verinfo.h : FORCE
504
518
- $(CURPATH ) make_git_source_version.sh > $(CURPATH ) verinfo.h
505
- $(shell touch verinfo.h)
519
+ $(shell touch verinfo.h || true )
506
520
507
521
duma_config.h :
508
522
$(MAKE ) reconfig
0 commit comments