11 |
|
set CHKLIBS = "no" |
12 |
|
set CCMD = "c" |
13 |
|
set LCMD = "l" |
14 |
+ |
set LOCALIZE = "L" |
15 |
|
|
16 |
|
foreach ARG ($argv) |
17 |
|
set FLAG = `echo $ARG | awk '{print substr($0, 2)}'` |
78 |
|
endif |
79 |
|
echo "done" |
80 |
|
|
80 |
– |
echo -n "Removing links to third-party libraries..." |
81 |
– |
if (-d lib_third_party) then |
82 |
– |
rm -rf lib_third_party |
83 |
– |
endif |
84 |
– |
echo "done" |
85 |
– |
|
81 |
|
echo |
82 |
|
|
83 |
|
if ($CLEAN == "yes") then |
167 |
|
cd .. |
168 |
|
echo "done" |
169 |
|
echo |
170 |
< |
# Set links to third-party libraries |
171 |
< |
echo "Setting links to third-party libraries" |
172 |
< |
if (!(-d lib_third_party)) then |
173 |
< |
mkdir lib_third_party |
174 |
< |
endif |
175 |
< |
cd lib_third_party |
176 |
< |
|
177 |
< |
if (-e ../suflag.txt) then |
178 |
< |
if (!(-d include)) then |
179 |
< |
mkdir include |
180 |
< |
endif |
181 |
< |
|
182 |
< |
if (!(-d lib)) then |
183 |
< |
mkdir lib |
184 |
< |
endif |
185 |
< |
|
186 |
< |
# Don't make a link directly from include/lib to a directory, else |
187 |
< |
# all includes files/libs must reside in one directory. |
188 |
< |
|
189 |
< |
cd include |
190 |
< |
# Standard location for all of JSOC's includes |
191 |
< |
find /home/jsoc/include -maxdepth 1 -name "*.h" -exec ln -sfv {} \; |
192 |
< |
find /home/jsoc/include -mindepth 1 -type d -exec ln -sfv {} \; |
193 |
< |
cd .. |
194 |
< |
|
195 |
< |
cd lib |
196 |
< |
# Standard locations for all of JSOC's libraries - x86_64 |
202 |
< |
if (!(-d linux_x86_64)) then |
203 |
< |
mkdir linux_x86_64 |
204 |
< |
endif |
205 |
< |
|
206 |
< |
cd linux_x86_64 |
207 |
< |
find /home/jsoc/lib/linux_x86_64/ -maxdepth 1 -name "*.a" -exec ln -sfv {} \; |
208 |
< |
cd .. |
209 |
< |
|
210 |
< |
# Standard locations for all of JSOC's libraries - ia32 |
211 |
< |
if (!(-d linux_ia32)) then |
212 |
< |
mkdir linux_ia32 |
213 |
< |
endif |
214 |
< |
|
215 |
< |
cd linux_ia32 |
216 |
< |
find /home/jsoc/lib/linux_ia32/ -maxdepth 1 -name "*.a" -exec ln -sfv {} \; |
217 |
< |
cd .. |
218 |
< |
|
219 |
< |
cd .. |
220 |
< |
#else |
221 |
< |
# Non-Stanford users: edit these lines to reflect the location of required |
222 |
< |
# 3rd party libs: cfitsio.a |
223 |
< |
#ln -sfv /usr/local/include include |
224 |
< |
#if (!(-d lib)) mkdir lib |
225 |
< |
#ln -sfv /usr/local/lib lib/$JSOC_MACHINE |
226 |
< |
endif |
227 |
< |
|
228 |
< |
cd .. |
229 |
< |
|
230 |
< |
# Set custom make file to tell the make system that the gcc cfitsio library is called |
231 |
< |
# libcfitsio_gcc.a |
232 |
< |
if (-e suflag.txt) then |
233 |
< |
echo "CFITSIOFNAME_GCC_X86_64 = cfitsio_gcc" >> custom.mk |
170 |
> |
|
171 |
> |
if (-e suflag.txt) then |
172 |
> |
# Stanford third-party libraries |
173 |
> |
echo 'POSTGRES_LIB = pq' >> custom.mk |
174 |
> |
echo 'CFITSIO_LIB = cfitsio' >> custom.mk |
175 |
> |
|
176 |
> |
echo 'ifeq (\$(JSOC_MACHINE), linux_x86_64)\n' >> custom.mk |
177 |
> |
echo ' POSTGRES_INCS = /usr/include' >> custom.mk |
178 |
> |
echo ' POSTGRES_LIBS = /usr/lib64' >> custom.mk |
179 |
> |
echo ' CFITSIO_INCS = /home/jsoc/include' >> custom.mk |
180 |
> |
echo ' CFITSIO_LIBS = /home/jsoc/lib/linux-x86_64' >> custom.mk |
181 |
> |
echo 'endif' >> custom.mk |
182 |
> |
|
183 |
> |
echo 'ifeq (\$(JSOC_MACHINE), linux_ia32)\n' >> custom.mk |
184 |
> |
echo ' POSTGRES_INCS = /usr/include' >> custom.mk |
185 |
> |
echo ' POSTGRES_LIBS = /usr/lib' >> custom.mk |
186 |
> |
echo ' CFITSIO_INCS = /home/jsoc/include' >> custom.mk |
187 |
> |
echo ' CFITSIO_LIBS = /home/jsoc/lib/linux-ia32' >> custom.mk |
188 |
> |
echo 'endif' >> custom.mk |
189 |
> |
|
190 |
> |
# Set custom make file to tell the make system that the gcc cfitsio library is called |
191 |
> |
# libcfitsio_gcc.a |
192 |
> |
echo 'ifeq ($(COMPILER), gcc)' >> custom.mk |
193 |
> |
echo ' ifeq ($(JSOC_MACHINE), linux_x86_64)' >> custom.mk |
194 |
> |
echo ' CFITSIO_LIB = cfitsio_gcc' >> custom.mk |
195 |
> |
echo ' endif' >> custom.mk |
196 |
> |
echo 'endif' >> custom.mk |
197 |
|
endif |
198 |
|
|
199 |
|
# Make customizations - ensure changes here are synchronized to changes in make_basic.mk |
222 |
|
# Enter required library names and versions here. |
223 |
|
if ($CHKLIBS == "yes") then |
224 |
|
|
262 |
– |
echo |
263 |
– |
echo "JSOC expects all third-party library header files to be located at" |
264 |
– |
echo " $JSOCROOT/lib_third_party/include/" |
265 |
– |
echo " and all third-party libraries to be located at |
266 |
– |
echo " $JSOCROOT/lib_third_party/$JSOC_MACHINE/" |
267 |
– |
echo " If you wish to build a target that uses one of the following" |
268 |
– |
echo " third-party libraries, please install the required library version" |
269 |
– |
echo " and create a link from from" |
270 |
– |
echo " $JSOCROOT/lib_third_party/include/" |
271 |
– |
echo " and $JSOCROOT/lib_third_party/$JSOC_MACHINE/" |
272 |
– |
echo " to the installed library headers and binary files, respectively." |
273 |
– |
echo |
274 |
– |
echo "Example:" |
275 |
– |
echo " cd $JSOCROOT/lib_third_party/" |
276 |
– |
echo " ln -s /usr/local/include include" |
277 |
– |
echo " cd $JSOCROOT/lib_third_party/$JSOC_MACHINE/" |
278 |
– |
echo " ln -s /usr/local/lib/libfftw3f.a libfftw3f.a " |
279 |
– |
echo |
280 |
– |
echo "Library libfftw3f.a (v. 3.1.2) required for targets: universe, examples, helloworld, xinterp, demo_td08062007" |
281 |
– |
echo "Library libcfitsio.a (v. 3.03) required for targets: universe, examples, f_ingest_gong_mrv, f_dup_gong_mrv" |
282 |
– |
|
283 |
– |
# echo "Library libcfitsio.a (v. 3.03) required for targets: examples, helloworld" |
284 |
– |
# echo "Library libmkl.so (v. 9.0) required for targets: examples, helloworld" |
285 |
– |
# if ($JSOC_MACHINE == "linux_x86_64") then |
286 |
– |
# echo "Library libmkl_lapack64.so (v. 9.0) required for targets: examples, helloworld" |
287 |
– |
# else echo "Library libmkl_lapack32.so (v. 9.0) required for targets: examples, helloworld" |
288 |
– |
# endif |
289 |
– |
|
290 |
– |
|
225 |
|
endif |
226 |
|
|
227 |
|
# Site Localization |
241 |
|
else |
242 |
|
echo "CUSTOM_DEFINES = __LOCALIZED_DEFS__" >> custom.mk |
243 |
|
./gen_init.csh |
244 |
+ |
./customizemake.pl |
245 |
|
endif |
246 |
< |
endif |
247 |
< |
|
248 |
< |
# Check for required libraries (must happen after localization, which might |
249 |
< |
# set links to such libraries |
250 |
< |
set TPWARN = 0 |
251 |
< |
|
252 |
< |
# Libraries required by all |
253 |
< |
if ($JSOC_MACHINE == "linux_x86_64") then |
254 |
< |
if (!(-e lib_third_party/lib/linux_x86_64/libcfitsio.a)) then |
255 |
< |
echo |
256 |
< |
echo "Can't find required library: lib_third_party/lib/linux_x86_64/libcfitsio.a" |
257 |
< |
set TPWARN = 1 |
258 |
< |
endif |
259 |
< |
endif |
325 |
< |
|
326 |
< |
if ($JSOC_MACHINE == "linux_ia32") then |
327 |
< |
if (!(-e lib_third_party/lib/linux_ia32/libcfitsio.a)) then |
328 |
< |
echo |
329 |
< |
echo "Can't find required library: lib_third_party/lib/linux_ia32/libcfitsio.a" |
330 |
< |
set TPWARN = 1 |
331 |
< |
endif |
332 |
< |
endif |
333 |
< |
|
334 |
< |
if ($JSOC_MACHINE == "mac_osx") then |
335 |
< |
if (!(-e lib_third_party/lib/mac_osx/libcfitsio.a)) then |
336 |
< |
echo |
337 |
< |
echo "Can't find required library: lib_third_party/lib/mac_osx/libcfitsio.a" |
338 |
< |
set TPWARN = 1 |
339 |
< |
endif |
340 |
< |
endif |
341 |
< |
|
342 |
< |
if (-e ../suflag.txt) then |
343 |
< |
# Stanford users' required libs. |
344 |
< |
if ($JSOC_MACHINE == "linux_x86_64") then |
345 |
< |
if (!(-e lib_third_party/lib/linux_x86_64/libcfitsio_gcc.a)) then |
346 |
< |
echo |
347 |
< |
echo "Can't find required library: lib_third_party/lib/linux_x86_64/libcfitsio_gcc.a" |
348 |
< |
set TPWARN = 1 |
349 |
< |
endif |
350 |
< |
if (!(-e lib_third_party/lib/linux_x86_64/libfftw3f.a)) then |
351 |
< |
echo |
352 |
< |
echo "Can't find required library: lib_third_party/lib/linux_x86_64/libfftw3f.a" |
353 |
< |
set TPWARN = 1 |
354 |
< |
endif |
355 |
< |
if (!(-e lib_third_party/lib/linux_x86_64/libgsl.a)) then |
356 |
< |
echo |
357 |
< |
echo "Can't find required library: lib_third_party/lib/linux_x86_64/libgsl.a" |
358 |
< |
set TPWARN = 1 |
359 |
< |
endif |
360 |
< |
if (!(-e lib_third_party/lib/linux_x86_64/libgslcblas.a)) then |
361 |
< |
echo |
362 |
< |
echo "Can't find required library: lib_third_party/lib/linux_x86_64/libgslcblas.a" |
363 |
< |
set TPWARN = 1 |
364 |
< |
endif |
365 |
< |
endif |
366 |
< |
|
367 |
< |
if ($JSOC_MACHINE == "linux_ia32") then |
368 |
< |
if (!(-e lib_third_party/lib/linux_ia32/libfftw3f.a)) then |
369 |
< |
echo |
370 |
< |
echo "Can't find required library: lib_third_party/lib/linux_ia32/libfftw3f.a" |
371 |
< |
set TPWARN = 1 |
372 |
< |
endif |
373 |
< |
if (!(-e lib_third_party/lib/linux_ia32/libgsl.a)) then |
374 |
< |
echo |
375 |
< |
echo "Can't find required library: lib_third_party/lib/linux_ia32/libgsl.a" |
376 |
< |
set TPWARN = 1 |
377 |
< |
endif |
378 |
< |
if (!(-e lib_third_party/lib/linux_ia32/libgslcblas.a)) then |
379 |
< |
echo |
380 |
< |
echo "Can't find required library: lib_third_party/lib/linux_ia32/libgslcblas.a" |
381 |
< |
set TPWARN = 1 |
382 |
< |
endif |
383 |
< |
endif |
384 |
< |
|
385 |
< |
if ($JSOC_MACHINE == "mac_osx") then |
386 |
< |
if (!(-e lib_third_party/lib/mac_osx/libfftw3f.a)) then |
387 |
< |
echo |
388 |
< |
echo "Can't find required library: lib_third_party/lib/mac_osx/libfftw3f.a" |
389 |
< |
set TPWARN = 1 |
390 |
< |
endif |
391 |
< |
endif |
392 |
< |
endif |
246 |
> |
else if (-e config.local) |
247 |
> |
# config.local is optional at Stanford, but it won't necessarily contain the same information that |
248 |
> |
# a NetDRMS config.local contains. The first section contains items that will override the |
249 |
> |
# the items in serverdefs.h. The second section contains items used to populate custom.mk, |
250 |
> |
# which causes make systems variables to be defined that override the default make behavior |
251 |
> |
# (such as overriding the name of the directory to which binary data are written - linux_x86_64_n02 |
252 |
> |
# instead of linux_x86_64, for example). |
253 |
> |
|
254 |
> |
# Override the defaults defined in serverdefs.h (don't use gen_init.csh as it does several things, |
255 |
> |
# most of which are relevant only to non-SU NetDRMS sites). This script causes all |
256 |
> |
# items included in config.local to override those defined in serverdefs.h, but not all |
257 |
> |
# items need be specified in config.local. |
258 |
> |
./customizedefs.pl |
259 |
> |
echo "CUSTOM_DEFINES = __CUSTOMIZED_DEFS__" >> custom.mk |
260 |
|
|
261 |
< |
if ($TPWARN) then |
262 |
< |
echo "Did you update config.local to create links to installed third-party libraries?" |
261 |
> |
# update custom.mk with data from config.local |
262 |
> |
./customizemake.pl |
263 |
|
endif |
264 |
|
|
265 |
|
# Customize compilers |