Debian Codegraph @

Makefile_MSYS2

raw
1
2 ######################################################################
3 # Makefile - command file for make to create CBFlib #
4 # #
5 # Version 0.9.7 28 June 2021 #
6 # #
7 # Paul Ellis and #
8 # Herbert J. Bernstein ([email protected]) #
9 # #
10 # (C) Copyright 2006 - 2021 Herbert J. Bernstein #
11 # #
12 ######################################################################
13
14 ######################################################################
15 # #
16 # YOU MAY REDISTRIBUTE THE CBFLIB PACKAGE UNDER THE TERMS OF THE GPL #
17 # #
18 # ALTERNATIVELY YOU MAY REDISTRIBUTE THE CBFLIB API UNDER THE TERMS #
19 # OF THE LGPL #
20 # #
21 ######################################################################
22
23 ########################### GPL NOTICES ##############################
24 # #
25 # This program is free software; you can redistribute it and/or #
26 # modify it under the terms of the GNU General Public License as #
27 # published by the Free Software Foundation; either version 2 of #
28 # (the License, or (at your option) any later version. #
29 # #
30 # This program is distributed in the hope that it will be useful, #
31 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
32 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
33 # GNU General Public License for more details. #
34 # #
35 # You should have received a copy of the GNU General Public License #
36 # along with this program; if not, write to the Free Software #
37 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA #
38 # 02111-1307 USA #
39 # #
40 ######################################################################
41
42 ######################### LGPL NOTICES ###############################
43 # #
44 # This library is free software; you can redistribute it and/or #
45 # modify it under the terms of the GNU Lesser General Public #
46 # License as published by the Free Software Foundation; either #
47 # version 2.1 of the License, or (at your option) any later version. #
48 # #
49 # This library is distributed in the hope that it will be useful, #
50 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
51 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU #
52 # Lesser General Public License for more details. #
53 # #
54 # You should have received a copy of the GNU Lesser General Public #
55 # License along with this library; if not, write to the Free #
56 # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, #
57 # MA 02110-1301 USA #
58 # #
59 ######################################################################
60
61 ######################################################################
62 # #
63 # Stanford University Notices #
64 # for the CBFlib software package that incorporates SLAC software #
65 # on which copyright is disclaimed #
66 # #
67 # This software #
68 # ------------- #
69 # The term "this software", as used in these Notices, refers to #
70 # those portions of the software package CBFlib that were created by #
71 # employees of the Stanford Linear Accelerator Center, Stanford #
72 # University. #
73 # #
74 # Stanford disclaimer of copyright #
75 # -------------------------------- #
76 # Stanford University, owner of the copyright, hereby disclaims its #
77 # copyright and all other rights in this software. Hence, anyone #
78 # may freely use it for any purpose without restriction. #
79 # #
80 # Acknowledgement of sponsorship #
81 # ------------------------------ #
82 # This software was produced by the Stanford Linear Accelerator #
83 # Center, Stanford University, under Contract DE-AC03-76SFO0515 with #
84 # the Department of Energy. #
85 # #
86 # Government disclaimer of liability #
87 # ---------------------------------- #
88 # Neither the United States nor the United States Department of #
89 # Energy, nor any of their employees, makes any warranty, express or #
90 # implied, or assumes any legal liability or responsibility for the #
91 # accuracy, completeness, or usefulness of any data, apparatus, #
92 # product, or process disclosed, or represents that its use would #
93 # not infringe privately owned rights. #
94 # #
95 # Stanford disclaimer of liability #
96 # -------------------------------- #
97 # Stanford University makes no representations or warranties, #
98 # express or implied, nor assumes any liability for the use of this #
99 # software. #
100 # #
101 # Maintenance of notices #
102 # ---------------------- #
103 # In the interest of clarity regarding the origin and status of this #
104 # software, this and all the preceding Stanford University notices #
105 # are to remain affixed to any copy or derivative of this software #
106 # made or distributed by the recipient and are to be affixed to any #
107 # copy of software made or distributed by the recipient that #
108 # contains a copy or derivative of this software. #
109 # #
110 # Based on SLAC Software Notices, Set 4 #
111 # OTT.002a, 2004 FEB 03 #
112 ######################################################################
113
114
115
116 ######################################################################
117 # NOTICE #
118 # Creative endeavors depend on the lively exchange of ideas. There #
119 # are laws and customs which establish rights and responsibilities #
120 # for authors and the users of what authors create. This notice #
121 # is not intended to prevent you from using the software and #
122 # documents in this package, but to ensure that there are no #
123 # misunderstandings about terms and conditions of such use. #
124 # #
125 # Please read the following notice carefully. If you do not #
126 # understand any portion of this notice, please seek appropriate #
127 # professional legal advice before making use of the software and #
128 # documents included in this software package. In addition to #
129 # whatever other steps you may be obliged to take to respect the #
130 # intellectual property rights of the various parties involved, if #
131 # you do make use of the software and documents in this package, #
132 # please give credit where credit is due by citing this package, #
133 # its authors and the URL or other source from which you obtained #
134 # it, or equivalent primary references in the literature with the #
135 # same authors. #
136 # #
137 # Some of the software and documents included within this software #
138 # package are the intellectual property of various parties, and #
139 # placement in this package does not in any way imply that any #
140 # such rights have in any way been waived or diminished. #
141 # #
142 # With respect to any software or documents for which a copyright #
143 # exists, ALL RIGHTS ARE RESERVED TO THE OWNERS OF SUCH COPYRIGHT. #
144 # #
145 # Even though the authors of the various documents and software #
146 # found here have made a good faith effort to ensure that the #
147 # documents are correct and that the software performs according #
148 # to its documentation, and we would greatly appreciate hearing of #
149 # any problems you may encounter, the programs and documents any #
150 # files created by the programs are provided **AS IS** without any *
151 # warranty as to correctness, merchantability or fitness for any #
152 # particular or general use. #
153 # #
154 # THE RESPONSIBILITY FOR ANY ADVERSE CONSEQUENCES FROM THE USE OF #
155 # PROGRAMS OR DOCUMENTS OR ANY FILE OR FILES CREATED BY USE OF THE #
156 # PROGRAMS OR DOCUMENTS LIES SOLELY WITH THE USERS OF THE PROGRAMS #
157 # OR DOCUMENTS OR FILE OR FILES AND NOT WITH AUTHORS OF THE #
158 # PROGRAMS OR DOCUMENTS. #
159 ######################################################################
160
161 ######################################################################
162 # #
163 # The IUCr Policy #
164 # for the Protection and the Promotion of the STAR File and #
165 # CIF Standards for Exchanging and Archiving Electronic Data #
166 # #
167 # Overview #
168 # #
169 # The Crystallographic Information File (CIF)[1] is a standard for #
170 # information interchange promulgated by the International Union of #
171 # Crystallography (IUCr). CIF (Hall, Allen & Brown, 1991) is the #
172 # recommended method for submitting publications to Acta #
173 # Crystallographica Section C and reports of crystal structure #
174 # determinations to other sections of Acta Crystallographica #
175 # and many other journals. The syntax of a CIF is a subset of the #
176 # more general STAR File[2] format. The CIF and STAR File approaches #
177 # are used increasingly in the structural sciences for data exchange #
178 # and archiving, and are having a significant influence on these #
179 # activities in other fields. #
180 # #
181 # Statement of intent #
182 # #
183 # The IUCr's interest in the STAR File is as a general data #
184 # interchange standard for science, and its interest in the CIF, #
185 # a conformant derivative of the STAR File, is as a concise data #
186 # exchange and archival standard for crystallography and structural #
187 # science. #
188 # #
189 # Protection of the standards #
190 # #
191 # To protect the STAR File and the CIF as standards for #
192 # interchanging and archiving electronic data, the IUCr, on behalf #
193 # of the scientific community, #
194 # #
195 # # holds the copyrights on the standards themselves, *
196 # #
197 # # owns the associated trademarks and service marks, and *
198 # #
199 # # holds a patent on the STAR File. *
200 # #
201 # These intellectual property rights relate solely to the #
202 # interchange formats, not to the data contained therein, nor to #
203 # the software used in the generation, access or manipulation of #
204 # the data. #
205 # #
206 # Promotion of the standards #
207 # #
208 # The sole requirement that the IUCr, in its protective role, #
209 # imposes on software purporting to process STAR File or CIF data #
210 # is that the following conditions be met prior to sale or #
211 # distribution. #
212 # #
213 # # Software claiming to read files written to either the STAR *
214 # File or the CIF standard must be able to extract the pertinent #
215 # data from a file conformant to the STAR File syntax, or the CIF #
216 # syntax, respectively. #
217 # #
218 # # Software claiming to write files in either the STAR File, or *
219 # the CIF, standard must produce files that are conformant to the #
220 # STAR File syntax, or the CIF syntax, respectively. #
221 # #
222 # # Software claiming to read definitions from a specific data *
223 # dictionary approved by the IUCr must be able to extract any #
224 # pertinent definition which is conformant to the dictionary #
225 # definition language (DDL)[3] associated with that dictionary. #
226 # #
227 # The IUCr, through its Committee on CIF Standards, will assist #
228 # any developer to verify that software meets these conformance #
229 # conditions. #
230 # #
231 # Glossary of terms #
232 # #
233 # [1] CIF: is a data file conformant to the file syntax defined #
234 # at http://www.iucr.org/iucr-top/cif/spec/index.html #
235 # #
236 # [2] STAR File: is a data file conformant to the file syntax #
237 # defined at http://www.iucr.org/iucr-top/cif/spec/star/index.html #
238 # #
239 # [3] DDL: is a language used in a data dictionary to define data #
240 # items in terms of "attributes". Dictionaries currently approved #
241 # by the IUCr, and the DDL versions used to construct these #
242 # dictionaries, are listed at #
243 # http://www.iucr.org/iucr-top/cif/spec/ddl/index.html #
244 # #
245 # Last modified: 30 September 2000 #
246 # #
247 # IUCr Policy Copyright (C) 2000 International Union of #
248 # Crystallography #
249 ######################################################################
250
251 .DELETE_ON_ERROR:
252
253 # Version string
254 VERSION = 0.9.7
255
256 #
257 # Directories
258 #
259 ROOT = $(PWD)
260 LIB = $(ROOT)/lib
261 SOLIB = $(ROOT)/solib
262 JCBF = $(ROOT)/jcbf
263 JAVADIR = $(ROOT)/java
264 BIN = $(ROOT)/bin
265 SRC = $(ROOT)/src
266 INCLUDE = $(ROOT)/include
267 M4 = $(ROOT)/m4
268 PY2CBF = $(ROOT)/py2cbf
269 PY3CBF = $(ROOT)/pycbf
270 EXAMPLES = $(ROOT)/examples
271 TEMPLATES= $(ROOT)/templates
272 DECTRIS_EXAMPLES = $(EXAMPLES)/dectris_cbf_template_test
273 DOC = $(ROOT)/doc
274 MINICBF_TEST = $(ROOT)/minicbf_test
275 GRAPHICS = $(ROOT)/html_graphics
276 DATADIRI = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Input
277 DATADIRO = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Output
278 CBF_PREFIX ?= $(HOME)
279
280 #
281 # Comment out the next line if scratch test files should be retained
282 #
283 CLEANTESTS = yes
284
285
286 MSYS2=yes
287 CBFLIB_DONT_USE_LOCAL_HDF5?=yes
288 CBFLIB_DONT_USE_LZ4?=yes
289 CBFLIB_DONT_USE_BSHUF?=yes
290
291 CBFLIB_DONT_USE_LOCAL_NUWEB ?= no
292 ifeq ($(CBFLIB_DONT_USE_LOCAL_NUWEB),yes)
293 NUWEB=nuweb
294 NUWEB_DEP=
295 NUWEB_DEP2=
296 else
297 NUWEB=$(BIN)/nuweb
298 NUWEB_DEP=nuweb-1.60
299 NUWEB_DEP2=$(BIN)/nuweb
300 endif
301
302
303
304 CBFLIB_DONT_HAVE_FGETLN ?= yes
305 ifeq ($(CBFLIB_DONT_HAVE_FGETLN),yes)
306 SRC_FGETLN = $(SRC)/fgetln.c
307 else
308 SRC_FGETLN =
309 endif
310
311
312 CBFLIB_DONT_USE_PY2CIFRW ?= no
313 ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes)
314 #
315 # Definitions to get versions of python2 PyCifRW and PLY
316 #
317 PY2CIFRW ?= PyCifRW-4.1
318 PY2PLY = ply-3.2
319 PY2CIFRWFLAG = -DCBF_USE_PYCIFRW
320 PY2CIFRW_PREFIX ?= $(HOME)/.local
321 endif
322
323 CBFLIB_DONT_USE_PY3CIFRW ?= no
324 ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes)
325 #
326 # Definitions to get versions of python3 PyCifRW and PLY
327 #
328 PY3CIFRW ?= PyCifRW-4.3_rev_19Jun21
329 PY3PLY = ply-3.11
330 PY3CIFRWFLAG = -DCBF_USE_PYCIFRW
331 PY3CIFRW_PREFIX ?= $(HOME)/.local
332 endif
333
334 #
335 # Definition to get a version of tifflib to support tiff2cbf
336 #
337 TIFF ?= tiff-4.0.6_rev_3Nov16
338 TIFF_PREFIX ?= $(PWD)
339 TIFF_INSTALL = $(TIFF)_INSTALL
340
341
342 #
343 # Definitions to get a version of HDF5
344 #
345
346 ifneq ($(HDF5_PREFIX),) # already installed on system
347 CBFLIB_DONT_USE_LOCAL_HDF5 = yes
348 HDF5CFLAGS=-DH5_USE_110_API
349 endif
350
351 ifneq ($(CBFLIB_DONT_USE_LOCAL_HDF5),yes)
352 HDF5_PREFIX ?= $(PWD)
353 HDF5 ?= hdf5-1.12.0
354 #HDF5 ?= hdf5-1.10.6
355 #HDF5 = hdf5-1.8.18
356 #HDF5 = hdf5-1.10.5
357 ifeq ($(HDF5),hdf5-1.12.0)
358 HDF5CFLAGS=-DH5_USE_110_API
359 else
360 HDF5CFLAGS=
361 endif
362 HDF5dep = $(HDF5)
363 HDF5_INSTALL = $(HDF5)_INSTALL
364 ifneq ($(MSYS2),yes)
365 HDF5LIBS_LOCAL = $(LIB)/libhdf5.a
366 HDF5LIBS_SYSTEM = -lz -ldl
367 HDF5SOLIBS_LOCAL = -L$(LIB) -lhdf5
368 HDF5SOLIBS_SYSTEM = -lz
369 else
370 HDF5LIBS_LOCAL = -L$(LIB) -lhdf5 -lhdf5.dll
371 HDF5LIBS_SYSTEM = -lz -ldl
372 HDF5SOLIBS_LOCAL = -L$(LIB) -lhdf5 -lhdf5.dll
373 HDF5SOLIBS_SYSTEM = -lz
374 endif
375 else
376 HDF5 =
377 HDF5dep =
378 HDF5_INSTALL =
379 HDF5LIBS_LOCAL =
380 ifneq ($(HDF5_PREFIX),)
381 HDF5lib = -L$(HDF5_PREFIX)/lib
382 endif
383 ifneq ($(MSYS2),yes)
384 HDF5LIBS_SYSTEM = $(HDF5lib) -lhdf5 -lz -ldl
385 HDF5SOLIBS_LOCAL =
386 HDF5SOLIBS_SYSTEM = $(HDF5lib) -lhdf5 -lz
387 else
388 HDF5LIBS_SYSTEM = $(HDF5lib) -lhdf5 -lhdf5.dll -lz -ldl
389 HDF5SOLIBS_LOCAL =
390 HDF5SOLIBS_SYSTEM = $(HDF5lib) -lhdf5 -lhdf5.dll -lz
391 endif
392 endif
393
394 HDF5REGISTER ?= --register manual
395 ifneq ($(HDF5_PREFIX),)
396 HDF5include = -I$(HDF5_PREFIX)/include
397 endif
398
399 ifneq ($(MSYS2),yes)
400 H5DUMP = $(HDF5_PREFIX)/bin/h5dump
401 else
402 H5DUMP = /MINGW32/bin/h5dump
403 endif
404
405
406 CBFLIB_DONT_USE_LZ4 ?= no
407 ifneq ($(CBFLIB_DONT_USE_LZ4),yes)
408 #
409 # Definitions to get a version of HDF5Plugin for LZ4
410 #
411 ifneq ($(MSYS2),yes)
412 LZ4 ?= HDF5Plugin_5Jun21
413 else
414 LZ4 ?= HDF5-External-Filter-Plugins
415 endif
416 LZ4dep = $(LZ4)
417 LZ4src = $(LZ4)/src
418 LZ4include = $(LZ4)/include
419 LZ4SOLIBS = -L$(SOLIB) -lh5zlz4
420 else
421 LZ4SOLIBS =
422 LZ4dep =
423 endif
424
425 CBFLIB_DONT_USE_BSHUF ?= no
426 ifneq ($(CBFLIB_DONT_USE_BSHUF),yes)
427 #
428 # Definitions to get a version of HDF5Plugin for BSHUFFLE WITH LZ4
429 #
430 BSHUF ?= bitshuffle-0.2.2.1_15Jun16
431 BSUFdep = $(BSHUF)
432 BSHUFsrc = $(BSHUF)/src
433 BSHUFinclude = $(BSHUF)/src
434 BSHUFSOLIBS = -L$(SOLIB) -lh5zbshuf
435 BSHUFFILTER = libbshuf_h5filter
436 else
437 BSHUFSOLIBS =
438 BSHUFdep =
439 endif
440
441 CBFLIB_DONT_USE_BLOSC ?= no
442 ifneq ($(CBFLIB_DONT_USE_BLOSC),yes)
443 #
444 # Definitions to get a version of HDF5Plugin for BLOSC
445 #
446 BLOSC = ?c-blosc_4Sep16.tar.gz
447 BLOSCdep = $(BLOSC)
448 BLOSCFILTER = hdf5-blosc_2Sep16.tar.gz
449 BLOSCsrc = $(BLOSC)/src
450 BLOSCinclude = $(BLOSC)/src
451 BLOSCSOLIBS = -L$(SOLIB) -lh5zbshuf
452 BLOSCFILTER = libbshuf_h5filter
453 else
454 BLOSCSOLIBS =
455 BLOSCdep =
456 endif
457
458
459
460 #
461 # Definition of python to use
462 #
463 PYTHON2 ?= python2
464 PYTHON3 ?= python3
465
466 #
467 # Definitions to get a stable version of regex
468 #
469 REGEX_PREFIX ?= $(PWD)
470 ifneq ($(REGEX_PREFIX),$(PWD))
471 CBFLIB_DONT_USE_LOCAL_REGEX ?= yes
472 endif
473
474
475 REGEX_LIBDIR ?= $(REGEX_PREFIX)/lib
476 ifneq ($(CBFLIB_DONT_USE_LOCAL_REGEX),yes)
477 REGEX ?= pcre-8.38
478 REGEXDEP = $(REGEX)
479 REGEX_INSTALL = $(REGEX)_INSTALL
480 REGEX_LIB ?= pcreposix
481 REGEX_LIB2 ?= pcre
482 ifneq ($(MSYS2),yes)
483 REGEX_LIBS ?= -L $(REGEX_LIBDIR) -l$(REGEX_LIB) -l$(REGEX_LIB2)
484 REGEX_LIBS_STATIC = $(LIB)/libpcreposix.a $(LIB)/libpcre.a
485 else
486 REGEX_LIBS ?= -L $(REGEX_LIBDIR) -l$(REGEX_LIB) -l$(REGEX_LIB).dll -l$(REGEX_LIB2) -l$(REGEX_LIB2).dll
487 REGEX_LIBS_STATIC = $(REGEX_LIBS)
488 endif
489 REGEX_INCLUDES ?= -I $(REGEX_PREFIX)
490 else
491 REGEX =
492 REGEXDEP =
493 REGEX_INSTALL =
494 REGEX_LIB ?=
495 REGEX_LIB2 ?=
496 REGEX_LIBS ?=
497 REGEX_INCLUDES ?=
498 endif
499
500
501 # Program to use to retrieve a URL
502
503 DOWNLOAD ?= wget -N
504 #DOWNLOAD ?= curl -O -L
505
506 # Flag to control symlinks versus copying
507
508 SLFLAGS = --use_ln
509 LN = ln -s -f
510
511 #
512 # Program to use to pack shars
513 #
514 SHAR = /usr/bin/shar
515 #SHAR = /usr/local/bin/gshar
516
517 #
518 # Program to use to create archives
519 #
520 AR = /usr/bin/ar
521
522 #
523 # Program to use to add an index to an archive
524 #
525 RANLIB = /usr/bin/ranlib
526
527
528 #
529 # Program to use to generate a signature
530 #
531 #SIGNATURE ?= /usr/bin/openssl dgst -md5
532 #SIGNATURE ?= (/usr/bin/openssl dgst -md5 | sed "s/^.*= //")
533 SIGNATURE ?= ( cat > md5tmp; cmake -E md5sum md5tmp| sed "s/ .*//")
534
535 #
536 # Pipe command to extract all but the first line of a text file
537 #
538 ALLBUTONE = tail -n +2
539
540
541 #
542 # Extension for signatures of files
543 #
544 SEXT = .md5
545
546 # Default shell
547
548 SHELL = bash
549
550 # call to time a command
551
552 #TIME =
553 #TIME = time
554
555 #
556 # Program to display differences between files
557 #
558 DIFF = diff -u -b
559
560
561 #
562 # Program to generate wrapper classes for Python
563 #
564 PYSWIG = swig -python
565
566 #
567 # Program to generate wrapper classes for Java
568 #
569 JSWIG = swig -java
570
571 #
572 # Compiler for Java
573 #
574 JAVAC = javac
575
576 #
577 # Java archiver for compiled classes
578 #
579 JAR = jar
580
581 #
582 # Java SDK root directory
583 #
584 ifeq ($(JDKDIR),)
585 JDKDIR = /usr/lib/java
586 endif
587
588 ifneq ($(CBF_DONT_USE_LONG_LONG),)
589 NOLLFLAG = -DCBF_DONT_USE_LONG_LONG
590 else
591 NOLLFLAG =
592 endif
593
594 ifneq ($(CBF_NO_REGEX),)
595 CBF_REGEXFLAG = -DCBF_NO_REGEX
596 else
597 CBF_REGEXFLAG = -DCBF_REGEXLIB_REGEX
598 endif
599
600 ifneq ($(CBF_USE_ULP),)
601 ULPFLAG = -DCBF_USE_ULP
602 else
603 ULPFLAG =
604 endif
605
606 ifneq ($(CBFLIB_DONT_USE_LZ4),yes)
607 LZ4FLAG = -DCBF_H5Z_USE_LZ4
608 else
609 LZ4FLAG =
610 endif
611
612 ifneq ($(CBFLIB_DONT_USE_BSHUF),yes)
613 BSHUFFLAG = -DCBF_H5Z_USE_BSHUF
614 else
615 BSHUFFLAG =
616 endif
617
618
619
620 MISCFLAG = $(NOLLFLAG) $(ULPFLAG)
621
622 #
623 # PY2CBF definitions
624 #
625 PY2CBFEXT = so
626 PY2CBFBOPT =
627 PY2CBFIOPT =
628 SETUP_PY = setup.py
629 INSTALLSETUP_PY = installsetup.py
630
631 #
632 # PY3CBF definitions
633 #
634 PY3CBFEXT = so
635 PY3CBFBOPT =
636 PY3CBFIOPT =
637 SETUP_PY = setup.py
638 INSTALLSETUP_PY = installsetup.py
639
640
641 #
642 # Set the compiler and flags
643 #
644
645 #########################################################
646 #
647 # Appropriate compiler definitions for MSYS2
648 #
649 #########################################################
650
651 CC = gcc
652 C++ = g++
653 CFLAGS = -g -O2 -Wall -D_USE_XOPEN_EXTENDED -DH5_HAVE_WIN32_API \
654 -DH5_HAVE_MINGW -DH5_USE_110_API -fno-strict-aliasing $(HDF5CFLAGS)
655 LDFLAGS =
656 F90C = gfortran
657 F90FLAGS = -g -fno-range-check -fallow-invalid-boz
658 F90LDFLAGS =
659 SOCFLAGS = -fPIC
660 SOLDFLAGS = -shared -Wl,-rpath,$(CBF_PREFIX)/lib
661 JAVAINCLUDES = -I$(JDKDIR)/include -I$(JDKDIR)/include/linux
662 LDPREFIX = PATH=$(SOLIB):$$PATH;export PATH;
663 RUNLDPREFIX = PATH=$(CBF_PREFIX)/lib:$$PATH;export PATH;
664 EXTRALIBS = -L/mingw32/bin -lm -lws2_32
665 M4FLAGS = -Dfcb_bytes_in_rec=131072
666 PYTHON = python2
667 PY2CBFEXT = pyd
668 PY3CBFEXT = pyd
669 TIME = time
670
671 ifneq ($(NOFORTRAN),)
672 F90C =
673 endif
674
675 #
676 # URLs from which to retrieve the data directories
677 #
678 DATAURLBASE = http://downloads.sf.net/cbflib/
679 DATAURLI = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Input.tar.gz
680 DATAURLO = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Output.tar.gz
681
682 #
683 # URLs from which to retrieve needed external package snapshots
684 #
685 ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes)
686 PY2CIFRWURL = http://downloads.sf.net/cbflib/$(PY2CIFRW).tar.gz
687 PY2PLYURL = http://www.dabeaz.com/ply/$(PY2PLY).tar.gz
688 endif
689 ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes)
690 PY3CIFRWURL = http://downloads.sf.net/cbflib/$(PY3CIFRW).tar.gz
691 PY3PLYURL = http://downloads.sf.net/cbflib/$(PY3PLY).tar.gz
692 endif
693 REGEX_URL ?= http://downloads.sf.net/cbflib/$(REGEX).tar.gz
694 TIFF_URL ?= http://downloads.sf.net/cbflib/$(TIFF).tar.gz
695 HDF5_URL ?= http://downloads.sf.net/cbflib/$(HDF5).tar.gz
696 ifneq ($(CBFLIB_DONT_USE_LOCAL_NUWEB),yes)
697 NUWEB_URL ?= http://downloads.sf.net/cbflib/$(NUWEB_DEP).tar.gz
698 endif
699 ifneq ($(MSYS2),yes)
700 LZ4_URL = http://downloads.sf.net/cbflib/$(LZ4).tar.gz
701 else
702 LZ4_URL = http://www.github.com/yayahjb/$(LZ4).git
703 endif
704 BSHUFURL = http://downloads.sf.net/cbflib/$(BSHUF).tar.gz
705
706
707 #
708 # Include directories
709 #
710 INCLUDES = -I$(INCLUDE) -I$(SRC) $(HDF5include)
711
712 #
713 # runtime library path export commands
714 #
715 ifeq ($(HDF5_PREFIX),)
716 RTLPEXPORTS = LD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export LD_LIBRARY_PATH; DYLD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export DYLD_LIBRARY_PATH; LD_RUN_PATH=$(PWD)/solib:$(PWD)/lib;export LD_RUN_PATH;
717 else
718 RTLPEXPORTS = LD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib:$(HDF5_PREFIX)/lib;export LD_LIBRARY_PATH; DYLD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib:$(HDF5_PREFIX)/lib;export DYLD_LIBRARY_PATH; LD_RUN_PATH=$(PWD)/solib:$(PWD)/lib:$(HDF5_PREFIX)/lib;export LD_RUN_PATH;
719 endif
720
721 ######################################################################
722 # You should not need to make modifications below this line #
723 ######################################################################
724
725 ifneq ($(CBF_USE_ULP),)
726 SRC_CBF_ULP_C = $(SRC)/cbf_ulp.c
727 INCLUDE_CBF_ULP_H = $(INCLUDE)/cbf_ulp.h
728 BIN_TESTULP = $(BIN)/testulp
729 else
730 SRC_CBF_ULP_C =
731 INCLUyDE_CBF_ULP_H =
732 BIN_TESTULP =
733 endif
734
735 ifneq ($(MSYS2),yes)
736 SRC_REALPATH =
737 else
738 SRC_REALPATH = $(SRC)/realpath.c
739 endif
740
741
742 #
743 # Suffixes of files to be used or built
744 #
745 .SUFFIXES: .c .o .f90 .m4
746
747 .m4.f90:
748 m4 -P $(M4FLAGS) $< > $@
749
750 ifneq ($(F90C),)
751 .f90.o:
752 $(F90C) $(F90FLAGS) -c $< -o $@
753 endif
754
755
756 #
757 # Common dependencies
758 #
759 COMMONDEP = $(M4)/Makefile.m4
760
761 #
762 # Source files
763 #
764
765 SOURCE = $(SRC)/cbf.c \
766 $(SRC)/cbf_airy_disk.c \
767 $(SRC)/cbf_alloc.c \
768 $(SRC)/cbf_ascii.c \
769 $(SRC)/cbf_binary.c \
770 $(SRC)/cbf_byte_offset.c \
771 $(SRC)/cbf_canonical.c \
772 $(SRC)/cbf_codes.c \
773 $(SRC)/cbf_compress.c \
774 $(SRC)/cbf_context.c \
775 $(SRC)/cbf_copy.c \
776 $(SRC)/cbf_file.c \
777 $(SRC)/cbf_getopt.c \
778 $(SRC)/cbf_hdf5.c \
779 $(SRC)/cbf_hdf5_filter.c \
780 $(SRC)/cbf_lex.c \
781 $(SRC)/cbf_minicbf_header.c\
782 $(SRC)/cbf_nibble_offset.c \
783 $(SRC)/cbf_packed.c \
784 $(SRC)/cbf_predictor.c \
785 $(SRC)/cbf_read_binary.c \
786 $(SRC)/cbf_read_mime.c \
787 $(SRC)/cbf_simple.c \
788 $(SRC)/cbf_string.c \
789 $(SRC)/cbf_stx.c \
790 $(SRC)/cbf_tree.c \
791 $(SRC_CBF_ULP_C) \
792 $(SRC)/cbf_uncompressed.c \
793 $(SRC)/cbf_write.c \
794 $(SRC)/cbf_write_binary.c \
795 $(SRC)/cbf_ws.c \
796 $(SRC)/cbff.c \
797 $(SRC)/md5c.c \
798 $(SRC)/img.c \
799 $(SRC_FGETLN) $(SRC_REALPATH)
800
801 ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes)
802 PY2SOURCE = $(SRC)/drel_lex.py \
803 $(SRC)/drel_yacc.py \
804 $(SRC)/drelc.py \
805 $(SRC)/drel_prep.py
806 endif
807
808 ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes)
809 PY3SOURCE = $(SRC)/drel_lex.py \
810 $(SRC)/drel_yacc.py \
811 $(SRC)/drelc.py \
812 $(SRC)/drel_prep.py
813 endif
814
815 F90SOURCE = $(SRC)/fcb_atol_wcnt.f90 \
816 $(SRC)/fcb_ci_strncmparr.f90 \
817 $(SRC)/fcb_exit_binary.f90 \
818 $(SRC)/fcb_nblen_array.f90 \
819 $(SRC)/fcb_next_binary.f90 \
820 $(SRC)/fcb_open_cifin.f90 \
821 $(SRC)/fcb_packed.f90 \
822 $(SRC)/fcb_read_bits.f90 \
823 $(SRC)/fcb_read_byte.f90 \
824 $(SRC)/fcb_read_image.f90 \
825 $(SRC)/fcb_read_line.f90 \
826 $(SRC)/fcb_read_xds_i2.f90 \
827 $(SRC)/fcb_skip_whitespace.f90
828
829
830 #
831 # Header files
832 #
833 HEADERS = $(INCLUDE)/cbf.h \
834 $(INCLUDE)/cbf_airy_disk.h \
835 $(INCLUDE)/cbf_alloc.h \
836 $(INCLUDE)/cbf_ascii.h \
837 $(INCLUDE)/cbf_binary.h \
838 $(INCLUDE)/cbf_byte_offset.h \
839 $(INCLUDE)/cbf_canonical.h \
840 $(INCLUDE)/cbf_codes.h \
841 $(INCLUDE)/cbf_compress.h \
842 $(INCLUDE)/cbf_context.h \
843 $(INCLUDE)/cbf_copy.h \
844 $(INCLUDE)/cbf_file.h \
845 $(INCLUDE)/cbf_getopt.h \
846 $(INCLUDE)/cbf_hdf5.h \
847 $(INCLUDE)/cbf_hdf5_filter.h \
848 $(INCLUDE)/cbf_lex.h \
849 $(INCLUDE)/cbf_minicbf_header.h\
850 $(INCLUDE)/cbf_nibble_offset.h \
851 $(INCLUDE)/cbf_packed.h \
852 $(INCLUDE)/cbf_predictor.h \
853 $(INCLUDE)/cbf_read_binary.h \
854 $(INCLUDE)/cbf_read_mime.h \
855 $(INCLUDE)/cbf_simple.h \
856 $(INCLUDE)/cbf_string.h \
857 $(INCLUDE)/cbf_stx.h \
858 $(INCLUDE)/cbf_tree.h \
859 $(INCLUDE)/cbf_uncompressed.h \
860 $(INCLUDE_CBF_ULP_H) \
861 $(INCLUDE)/cbf_write.h \
862 $(INCLUDE)/cbf_write_binary.h \
863 $(INCLUDE)/cbf_ws.h \
864 $(INCLUDE)/global.h \
865 $(INCLUDE)/cbff.h \
866 $(INCLUDE)/md5.h \
867 $(INCLUDE)/img.h
868
869 #
870 # m4 macro files
871 #
872 M4FILES = $(M4)/fcblib_defines.m4 \
873 $(M4)/fcb_exit_binary.m4 \
874 $(M4)/fcb_next_binary.m4 \
875 $(M4)/fcb_open_cifin.m4 \
876 $(M4)/fcb_packed.m4 \
877 $(M4)/fcb_read_bits.m4 \
878 $(M4)/fcb_read_image.m4 \
879 $(M4)/fcb_read_xds_i2.m4 \
880 $(M4)/test_fcb_read_image.m4 \
881 $(M4)/test_xds_binary.m4
882
883
884 #
885 # Documentation files
886 #
887 DOCUMENTS = $(DOC)/CBFlib.html \
888 $(DOC)/CBFlib.txt \
889 $(DOC)/CBFlib_NOTICES.html \
890 $(DOC)/CBFlib_NOTICES.txt \
891 $(DOC)/ChangeLog \
892 $(DOC)/ChangeLog.html \
893 $(DOC)/MANIFES \
894 $(DOC)/gpl.txt $(DOC)/lgpl.txt
895
896 #
897 # HTML Graphics files
898 #
899 JPEGS = $(GRAPHICS)/CBFbackground.jpg \
900 $(GRAPHICS)/CBFbig.jpg \
901 $(GRAPHICS)/CBFbutton.jpg \
902 $(GRAPHICS)/cbflibbackground.jpg\
903 $(GRAPHICS)/cbflibbig.jpg \
904 $(GRAPHICS)/cbflibbutton.jpg \
905 $(GRAPHICS)/cifhome.jpg \
906 $(GRAPHICS)/iucrhome.jpg \
907 $(GRAPHICS)/noticeButton.jpg
908
909
910 #
911 # Default: instructions
912 #
913 default:
914 @echo ' '
915 @echo '***************************************************************'
916 @echo ' '
917 @echo ' PLEASE READ README and doc/CBFlib_NOTICES.txt'
918 @echo ' '
919 @echo ' Before making the CBF library and example programs, check'
920 @echo ' that the C compiler name and flags are correct:'
921 @echo ' '
922 @echo ' The current values are:'
923 @echo ' '
924 @echo ' $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(PYCIFRWFLAG)'
925 @echo ' '
926 @echo ' If you have changed any of the nuweb .w input files, you will need'
927 @echo ' need nuweb installed, check that CBFLIB_DONT_USE_LOCAL_NUWEB,'
928 @echo ' and NUWEB are defined correctly :'
929 @echo ' '
930 @echo ' The current values are:'
931 @echo ' '
932 @echo ' CBFLIB_DONT_USE_LOCAL_NUWEB = $(CBFLIB_DONT_USE_LOCAL_NUWEB)'
933 @echo ' NUWEB = $(NUWEB)'
934 @echo ' NUWEB_DEP = $(NUWEB_DEP)'
935 @echo ' NUWEB_DEP2 = $(NUWEB_DEP2)'
936 @echo ' '
937 @echo ' You will need either a system HDF5 1.12 or it to be installed here.'
938 @echo ' Check that CBFLIB_DONT_USE_LOCAL_HDF5 and HDF5 are defined correctly :'
939 @echo ' '
940 @echo ' The current values are:'
941 @echo ' '
942 @echo ' CBFLIB_DONT_USE_LOCAL_HDF5 = $(CBFLIB_DONT_USE_LOCAL_HDF5)'
943 @echo ' HDF5 = $(HDF5)'
944 @echo ' HDF5_PREFIX = $(HDF5_PREFIX)'
945 @echo ' '
946 @echo ' Before installing the CBF library and example programs, check'
947 @echo ' that the install directory is correct:'
948 @echo ' '
949 @echo ' The current value :'
950 @echo ' '
951 @echo ' $(CBF_PREFIX) '
952 @echo ' '
953 @echo ' To compile the CBF library and example programs type:'
954 @echo ' '
955 @echo ' make clean'
956 @echo ' make all'
957 @echo ' '
958 @echo ' To compile the CBF library as a shared object library, type:'
959 @echo ' '
960 @echo ' make shared'
961 @echo ' '
962 @echo ' To compile the Java wrapper classes for CBF library, type:'
963 @echo ' '
964 @echo ' make javawrapper'
965 @echo ' '
966 @echo ' To run a set of tests type:'
967 @echo ' '
968 @echo ' make tests'
969 @echo ' '
970 @echo ' To run some java tests type:'
971 @echo ' '
972 @echo ' make javatests'
973 @echo ' '
974 @echo ' The tests assume that several data files are in the directories'
975 @echo ' $(DATADIRI) and $(DATADIRO)'
976 @echo ' '
977 @echo ' These directory can be obtained from'
978 @echo ' '
979 @echo ' $(DATAURLI) '
980 @echo ' $(DATAURLO) '
981 @echo ' '
982 @echo ' To clean up the directories type:'
983 @echo ' '
984 @echo ' make clean'
985 @echo ' '
986 @echo ' To install the library and binaries type:'
987 @echo ' '
988 @echo ' make install'
989 @echo ' '
990 @echo '***************************************************************'
991 @echo ' '
992
993 #
994 # Compile the library and examples
995 #
996 ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes)
997 PY2CIFRWDEPS = $(PY2CIFRW) $(PY2PLY)
998 else
999 PY2CIFRWDEPS =
1000 endif
1001
1002 ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes)
1003 PY3CIFRWDEPS = $(PY3CIFRW) $(PY3PLY)
1004 else
1005 PY3CIFRWDEPS =
1006 endif
1007
1008 ifneq ($(CBFLIB_DONT_USE_LZ4),yes)
1009 LZ4DEPS = $(LZ4)
1010 else
1011 LZ4DEPS =
1012 endif
1013
1014 ifneq ($(CBFLIB_DONT_USE_BSHUF),yes)
1015 BSHUFDEPS = $(BSHUF)
1016 else
1017 BSHUFDEPS =
1018 endif
1019
1020
1021 all:: $(BIN) $(SOURCE) $(F90SOURCE) $(HEADERS) \
1022 $(HDF5) \
1023 $(LZ4DEPS) \
1024 $(BSHUFDEPS) \
1025 $(PY2CIFRWDEPS) \
1026 $(PY3CIFRWDEPS) \
1027 symlinksdone \
1028 $(REGEXDEP) \
1029 $(LIB) \
1030 $(LIB)/libcbf.a \
1031 $(LIB)/libfcb.a \
1032 $(LIB)/libimg.a \
1033 $(BIN)/adscimg2cbf \
1034 $(BIN)/arvai_test \
1035 $(BIN)/cbf2adscimg \
1036 $(BIN)/cbf2nexus \
1037 $(BIN)/cif2c \
1038 $(BIN)/cif2cbf \
1039 $(BIN)/cbf_standardize_numbers \
1040 $(BIN)/convert_image \
1041 $(BIN)/convert_minicbf\
1042 $(BIN)/img2cif \
1043 $(BIN)/makecbf \
1044 $(BIN)/minicbf2nexus \
1045 $(BIN)/nexus2cbf \
1046 $(BIN)/roi_peaksearch \
1047 $(BIN)/sequence_match \
1048 $(BIN)/testcell \
1049 $(BIN)/testalloc \
1050 $(BIN)/testreals \
1051 $(BIN)/testflat \
1052 $(BIN)/testflatpacked \
1053 $(BIN)/testhdf5 \
1054 $(BIN_TESTULP) \
1055 $(BIN)/tiff2cbf \
1056 $(BIN)/test_cbf_airy_disk \
1057 $(BIN)/cbf_testxfelread
1058
1059 ifneq ($(F90C),)
1060 all:: $(BIN)/test_xds_binary \
1061 $(BIN)/test_fcb_read_image
1062 endif
1063
1064 shared: $(SOLIB)/libcbf.so $(SOLIB)/libfcb.so $(SOLIB)/libimg.so
1065
1066 javawrapper: shared $(JCBF) $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf_wrap.so
1067
1068 ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes)
1069 PY2CIFRWDEF = -Dcbf_use_py2cifrw=yes
1070 else
1071 PY2CIFRWDEF =
1072 endif
1073
1074 ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes)
1075 PY3CIFRWDEF = -Dcbf_use_py3cifrw=yes
1076 else
1077 PY3CIFRWDEF =
1078 endif
1079
1080
1081 Makefiles: \
1082 Makefile \
1083 Makefile_LINUX \
1084 Makefile_OSX \
1085 Makefile_MINGW \
1086 Makefile_MSYS2
1087
1088 Makefiles_pre_0.9.7: \
1089 Makefile_LINUX_64 \
1090 Makefile_LINUX_gcc42 \
1091 Makefile_LINUX_DMALLOC \
1092 Makefile_LINUX_gcc42_DMALLOC \
1093 Makefile_OSX_gcc42 \
1094 Makefile_OSX_gcc42_DMALLOC \
1095 Makefile_AIX \
1096 Makefile_IRIX_gcc
1097
1098
1099 Makefile_LINUX: $(M4)/Makefile.m4
1100 -cp Makefile_LINUX Makefile_LINUX_old
1101 m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX $(M4)/Makefile.m4 > Makefile_LINUX.tmp
1102 mv Makefile_LINUX.tmp Makefile_LINUX
1103
1104 Makefile_LINUX_DMALLOC: $(M4)/Makefile.m4
1105 -cp Makefile_LINUX Makefile_LINUX_old
1106 m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_DMALLOC.tmp
1107 mv Makefile_LINUX_DMALLOC.tmp Makefile_LINUX_DMALLOC
1108
1109 Makefile_LINUX_64: $(M4)/Makefile.m4
1110 -cp Makefile_LINUX_64 Makefile_LINUX_64_old
1111 m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX_64 $(M4)/Makefile.m4 > Makefile_LINUX_64.tmp
1112 mv Makefile_LINUX_64.tmp Makefile_LINUX_64
1113
1114 Makefile_LINUX_gcc42: $(M4)/Makefile.m4
1115 -cp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_old
1116 m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX_gcc42 $(M4)/Makefile.m4 > Makefile_LINUX_gcc42.tmp
1117 mv Makefile_LINUX_gcc42.tmp Makefile_LINUX_gcc42
1118
1119 Makefile_LINUX_gcc42_DMALLOC: $(M4)/Makefile.m4
1120 -cp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_old
1121 m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=LINUX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_gcc42_DMALLOC.tmp
1122 mv Makefile_LINUX_gcc42_DMALLOC.tmp Makefile_LINUX_gcc42_DMALLOC
1123
1124 Makefile_OSX: $(M4)/Makefile.m4
1125 -cp Makefile_OSX Makefile_OSX_old
1126 m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=OSX $(M4)/Makefile.m4 > Makefile_OSX.tmp
1127 mv Makefile_OSX.tmp Makefile_OSX
1128
1129 Makefile_OSX_gcc42: $(M4)/Makefile.m4
1130 -cp Makefile_OSX_gcc42 Makefile_OSX_gcc42_old
1131 m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=OSX_gcc42 $(M4)/Makefile.m4 > Makefile_OSX_gcc42.tmp
1132 mv Makefile_OSX_gcc42.tmp Makefile_OSX_gcc42
1133
1134 Makefile_OSX_gcc42_DMALLOC: $(M4)/Makefile.m4
1135 -cp Makefile_OSX_gcc42 Makefile_OSX_gcc42_old
1136 m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=OSX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_OSX_gcc42_DMALLOC.tmp
1137 mv Makefile_OSX_gcc42_DMALLOC.tmp Makefile_OSX_gcc42_DMALLOC
1138
1139 Makefile_AIX: $(M4)/Makefile.m4
1140 -cp Makefile_AIX Makefile_AIX_old
1141 m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=AIX $(M4)/Makefile.m4 > Makefile_AIX.tmp
1142 mv Makefile_AIX.tmp Makefile_AIX
1143
1144 Makefile_MINGW: $(M4)/Makefile.m4
1145 -cp Makefile_MINGW Makefile_MINGW_old
1146 m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=MINGW $(M4)/Makefile.m4 > Makefile_MINGW.tmp
1147 mv Makefile_MINGW.tmp Makefile_MINGW
1148
1149 Makefile_MSYS2: $(M4)/Makefile.m4
1150 -cp Makefile_MSYS2 Makefile_MSYS2_old
1151 m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=MSYS2 $(M4)/Makefile.m4 > Makefile_MSYS2.tmp
1152 mv Makefile_MSYS2.tmp Makefile_MSYS2
1153
1154 Makefile_IRIX_gcc: $(M4)/Makefile.m4
1155 -cp Makefile_IRIX_gcc Makefile_IRIX_gcc_old
1156 m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=IRIX_gcc $(M4)/Makefile.m4 > Makefile_IRIX_gcc.tmp
1157 mv Makefile_IRIX_gcc.tmp Makefile_IRIX_gcc
1158
1159
1160 Makefile: $(M4)/Makefile.m4
1161 -cp Makefile Makefile_old
1162 m4 -P $(PY2CIFRWDEF) $(PY3CIFRWDEF) -Dcbf_system=default $(M4)/Makefile.m4 > Makefile.tmp
1163 mv Makefile.tmp Makefile
1164
1165 cbflib.ini: $(M4)/Makefile.m4
1166 echo "$(LDPREFIX)" > cbflib.ini
1167 echo "HDF5_PLUGIN_PATH=$(SOLIB):$$HDF5_PLUGIN_PATH" >> cbflib.ini
1168 echo "export HDF5_PLUGIN_PATH" >> cbflib.ini
1169
1170 symlinksdone:
1171 chmod a+x .symlinks
1172 chmod a+x .undosymlinks
1173 chmod a+x doc/.symlinks
1174 chmod a+x doc/.undosymlinks
1175 ./.symlinks $(SLFLAGS)
1176 touch symlinksdone
1177
1178 install: baseinstall py2cbfinstall py3cbfinstall \
1179 $(HDF5_INSTALL) \
1180 $(TIFF_INSTALL) \
1181 $(REGEX_INSTALL)
1182
1183 userinstall: baseinstall py2cbfuserinstall py3cbfuserinstall \
1184 $(HDF5_INSTALL) \
1185 $(TIFF_INSTALL) \
1186 $(REGEX_INSTALL)
1187
1188 baseinstall: all $(CBF_PREFIX) $(CBF_PREFIX)/lib $(CBF_PREFIX)/bin \
1189 $(CBF_PREFIX)/include $(CBF_PREFIX)/include/cbflib \
1190 $(PYSOURCE) shared $(EXAMPLES)/batch_convert_minicbf.sh \
1191 $(LIB)/libcbf.a $(LIB)/libimg.a $(LIB)/libfcb.a \
1192 $(SOLIB)/libcbf.so $(SOLIB)/libimg.so $(SOLIB)/libfcb.so
1193 -chmod -R 755 $(CBF_PREFIX)/include/cbflib
1194 -chmod 755 $(CBF_PREFIX)/lib/libcbf.a
1195 -cp $(CBF_PREFIX)/lib/libcbf.a $(CBF_PREFIX)/lib/libcbf_old.a
1196 cp $(LIB)/libcbf.a $(CBF_PREFIX)/lib/libcbf.a
1197 -chmod 755 $(CBF_PREFIX)/lib/libimg.a
1198 -cp $(CBF_PREFIX)/lib/libimg.a $(CBF_PREFIX)/lib/libimg_old.a
1199 cp $(LIB)/libimg.a $(CBF_PREFIX)/lib/libimg.a
1200 -chmod 755 $(CBF_PREFIX)/lib/libfcb.a
1201 -cp $(CBF_PREFIX)/lib/libfcb.a $(CBF_PREFIX)/lib/libfcb_old.a
1202 cp $(LIB)/libfcb.a $(CBF_PREFIX)/lib/libfcb.a
1203 -chmod 755 $(CBF_PREFIX)/lib/libcbf.so
1204 -cp $(CBF_PREFIX)/lib/libcbf.so $(CBF_PREFIX)/lib/libcbf_old.so
1205 cp $(SOLIB)/libcbf.so $(CBF_PREFIX)/lib/libcbf.so
1206 $(LN) $(CBF_PREFIX)/lib/libcbf.so $(CBF_PREFIX)/lib/lib_cbf.so
1207 -chmod 755 $(CBF_PREFIX)/lib/libimg.so
1208 -cp $(CBF_PREFIX)/lib/libimg.so $(CBF_PREFIX)/lib/libimg_old.so
1209 cp $(SOLIB)/libimg.so $(CBF_PREFIX)/lib/libimg.so
1210 $(LN) $(CBF_PREFIX)/lib/libimg.so $(CBF_PREFIX)/lib/lib_img.so
1211 -chmod 755 $(CBF_PREFIX)/lib/libfcb.so
1212 -cp $(CBF_PREFIX)/lib/libfcb.so $(CBF_PREFIX)/lib/libfcb_old.so
1213 cp $(SOLIB)/libfcb.so $(CBF_PREFIX)/lib/libfcb.so
1214 $(LN) $(CBF_PREFIX)/lib/libfcb.so $(CBF_PREFIX)/lib/lib_fcb.so
1215 -cp $(CBF_PREFIX)/bin/cbflib.ini $(CBF_PREFIX)/bin/cbflib.ini_old
1216 echo "$(RUNLDPREFIX)" > $(CBF_PREFIX)/bin/cbflib.ini
1217 echo "HDF5_PLUGIN_PATH=$(CBF_PREFIX)/lib:$$HDF5_PLUGIN_PATH" >> $(CBF_PREFIX)/bin/cbflib.ini
1218 echo "export HDF5_PLUGIN_PATH" >> $(CBF_PREFIX)/bin/cbflib.ini
1219 -cp $(CBF_PREFIX)/bin/adscimg2cbf $(CBF_PREFIX)/bin/adscimg2cbf_old
1220 cp $(BIN)/adscimg2cbf $(CBF_PREFIX)/bin/adscimg2cbf
1221 -cp $(CBF_PREFIX)/bin/cbf2adscimg $(CBF_PREFIX)/bin/cbf2adscimg_old
1222 cp $(BIN)/cbf2adscimg $(CBF_PREFIX)/bin/cbf2adscimg
1223 -cp $(CBF_PREFIX)/bin/cbf_standardize_numbers \
1224 $(CBF_PREFIX)/bin/cbf_standardize_numbers_old
1225 cp $(BIN)/cbf_standardize_numbers $(CBF_PREFIX)/bin/cbf_standardize_numbers
1226 -cp $(CBF_PREFIX)/bin/convert_image $(CBF_PREFIX)/bin/convert_image_old
1227 cp $(BIN)/convert_image $(CBF_PREFIX)/bin/convert_image
1228 -cp $(CBF_PREFIX)/bin/convert_minicbf $(CBF_PREFIX)/bin/convert_minicbf_old
1229 cp $(BIN)/convert_minicbf $(CBF_PREFIX)/bin/convert_minicbf
1230 -cp $(CBF_PREFIX)/bin/makecbf $(CBF_PREFIX)/bin/makecbf_old
1231 cp $(BIN)/makecbf $(CBF_PREFIX)/bin/makecbf
1232 -cp $(CBF_PREFIX)/bin/img2cif $(CBF_PREFIX)/bin/img2cif_old
1233 cp $(BIN)/img2cif $(CBF_PREFIX)/bin/img2cif
1234 -cp $(CBF_PREFIX)/bin/cif2cbf $(CBF_PREFIX)/bin/cif2cbf_old
1235 cp $(BIN)/cif2cbf $(CBF_PREFIX)/bin/cif2cbf
1236 -cp $(CBF_PREFIX)/bin/minicbf2nexus $(CBF_PREFIX)/bin/minicbf2nexus_old
1237 cp $(BIN)/minicbf2nexus $(CBF_PREFIX)/bin/minicbf2nexus
1238 -cp $(CBF_PREFIX)/bin/cbf2nexus $(CBF_PREFIX)/bin/cbf2nexus_old
1239 cp $(BIN)/cbf2nexus $(CBF_PREFIX)/bin/cbf2nexus
1240 -cp $(CBF_PREFIX)/bin/nexus2cbf $(CBF_PREFIX)/bin/nexus2cbf_old
1241 cp $(BIN)/nexus2cbf $(CBF_PREFIX)/bin/nexus2cbf
1242 -cp $(CBF_PREFIX)/bin/roi_peaksearch $(CBF_PREFIX)/bin/roi_peaksearch_old
1243 cp $(BIN)/roi_peaksearch $(CBF_PREFIX)/bin/roi_peaksearch
1244 -cp $(CBF_PREFIX)/bin/sequence_match $(CBF_PREFIX)/bin/sequence_match_old
1245 cp $(BIN)/sequence_match $(CBF_PREFIX)/bin/sequence_match
1246 -cp $(CBF_PREFIX)/bin/testalloc $(CBF_PREFIX)/bin/testalloc_old
1247 cp $(BIN)/testalloc $(CBF_PREFIX)/bin/testalloc
1248 -cp $(CBF_PREFIX)/bin/arvai_test $(CBF_PREFIX)/bin/arvai_test_old
1249 cp $(BIN)/arvai_test $(CBF_PREFIX)/bin/arvai_test
1250 -cp $(CBF_PREFIX)/bin/cif2c $(CBF_PREFIX)/bin/cif2c_old
1251 cp $(BIN)/cif2c $(CBF_PREFIX)/bin/cif2c
1252 -cp $(CBF_PREFIX)/bin/testreals $(CBF_PREFIX)/bin/testreals_old
1253 cp $(BIN)/testreals $(CBF_PREFIX)/bin/testreals
1254 -cp $(CBF_PREFIX)/bin/testflat $(CBF_PREFIX)/bin/testflat_old
1255 cp $(BIN)/testflat $(CBF_PREFIX)/bin/testflat
1256 -cp $(CBF_PREFIX)/bin/testflatpacked $(CBF_PREFIX)/bin/testflatpacked_old
1257 cp $(BIN)/testflatpacked $(CBF_PREFIX)/bin/testflatpacked
1258 -cp $(CBF_PREFIX)/bin/tiff2cbf $(CBF_PREFIX)/bin/tiff2cbf_old
1259 cp $(BIN)/tiff2cbf $(CBF_PREFIX)/bin/tiff2cbf
1260 -cp $(CBF_PREFIX)/bin/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk_old
1261 cp $(BIN)/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk
1262 -cp $(CBF_PREFIX)/bin/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk_old
1263 cp $(BIN)/test_cbf_airy_disk $(CBF_PREFIX)/bin/test_cbf_airy_disk
1264 -cp $(CBF_PREFIX)/bin/testhdf5 $(CBF_PREFIX)/bin/testhdf5_old
1265 cp $(BIN)/testhdf5 $(CBF_PREFIX)/bin/testhdf5
1266 ifneq ($(CBF_USE_ULP),)
1267 -cp $(CBF_PREFIX)/bin/testulp $(CBF_PREFIX)/bin/testulp_old
1268 cp $(BIN)/testulp $(CBF_PREFIX)/bin/testulp
1269 endif
1270 -cp $(CBF_PREFIX)/bin/batch_convert_minicbf.sh $(CBF_PREFIX)/bin/batch_convert_minicbf_old.sh
1271 cp $(EXAMPLES)/batch_convert_minicbf.sh $(CBF_PREFIX)/bin/batch_convert_minicbf.sh
1272 ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes)
1273 cp $(SRC)/drel_lex.py $(CBF_PREFIX)/bin/drel_lex.py
1274 cp $(SRC)/drel_yacc.py $(CBF_PREFIX)/bin/drel_yacc.py
1275 cp $(SRC)/drelc.py $(CBF_PREFIX)/bin/drelc.py
1276 cp $(SRC)/drel_prep.py $(CBF_PREFIX)/bin/drel_prep.py
1277 endif
1278 chmod -R 755 $(CBF_PREFIX)/include/cbflib
1279 -rm -rf $(CBF_PREFIX)/include/cbflib_old
1280 -cp -r $(CBF_PREFIX)/include/cbflib $(CBF_PREFIX)/include/cbflib_old
1281 -rm -rf $(CBF_PREFIX)/include/cbflib
1282 cp -r $(INCLUDE) $(CBF_PREFIX)/include/cbflib
1283 chmod 644 $(CBF_PREFIX)/lib/libcbf.a
1284 chmod 644 $(CBF_PREFIX)/lib/libimg.a
1285 chmod 644 $(CBF_PREFIX)/lib/libfcb.a
1286 chmod 755 $(CBF_PREFIX)/lib/libcbf.so
1287 chmod 755 $(CBF_PREFIX)/lib/libimg.so
1288 chmod 755 $(CBF_PREFIX)/lib/libfcb.so
1289 chmod 755 $(CBF_PREFIX)/bin/arvai_test
1290 chmod 755 $(CBF_PREFIX)/bin/cbf2nexus
1291 chmod 755 $(CBF_PREFIX)/bin/cbf_standardize_numbers
1292 chmod 755 $(CBF_PREFIX)/bin/cif2c
1293 chmod 755 $(CBF_PREFIX)/bin/cif2cbf
1294 chmod 755 $(CBF_PREFIX)/bin/convert_image
1295 chmod 755 $(CBF_PREFIX)/bin/convert_minicbf
1296 chmod 755 $(CBF_PREFIX)/bin/img2cif
1297 chmod 755 $(CBF_PREFIX)/bin/makecbf
1298 chmod 755 $(CBF_PREFIX)/bin/minicbf2nexus
1299 chmod 755 $(CBF_PREFIX)/bin/nexus2cbf
1300 chmod 755 $(CBF_PREFIX)/bin/roi_peaksearch
1301 chmod 755 $(CBF_PREFIX)/bin/sequence_match
1302 chmod 755 $(CBF_PREFIX)/bin/testalloc
1303 chmod 755 $(CBF_PREFIX)/bin/testflat
1304 chmod 755 $(CBF_PREFIX)/bin/testflatpacked
1305 chmod 755 $(CBF_PREFIX)/bin/testhdf5
1306 chmod 755 $(CBF_PREFIX)/bin/testreals
1307 ifneq ($(CBF_USE_ULP),)
1308 chmod 755 $(CBF_PREFIX)/bin/testulp
1309 endif
1310 chmod 755 $(CBF_PREFIX)/bin/tiff2cbf
1311 chmod 755 $(CBF_PREFIX)/bin/test_cbf_airy_disk
1312 chmod 755 $(CBF_PREFIX)/bin/batch_convert_minicbf.sh
1313 chmod 644 $(CBF_PREFIX)/include/cbflib/*.h
1314
1315 ifneq ($(CBFLIB_DONT_USE_PY2CIFRW),yes)
1316 #
1317 # Py2CifRW
1318 #
1319 build_py2cifrw: $(M4)/Makefile.m4
1320 touch build_py2cifrw
1321 $(PY2CIFRW): build_py2cifrw
1322 -rm -rf $(PY2CIFRW)
1323 -rm -rf $(PY2CIFRW).tar.gz
1324 $(DOWNLOAD) $(PY2CIFRWURL)
1325 tar -xvf $(PY2CIFRW).tar.gz
1326 -rm $(PY2CIFRW).tar.gz
1327 (cd $(PY2CIFRW); \
1328 PYTHONPATH=$(PY2CIFRW_PREFIX)/lib/python:$(PY2CIFRW_PREFIX)/lib64/python; export PYTHONPATH; \
1329 mkdir -p $(PY2CIFRW_PREFIX)/lib/python/site-packages; \
1330 mkdir -p $(PY2CIFRW_PREFIX)/lib64/python/site-packages; \
1331 $(PYTHON2) setup.py install --prefix= --home=$(PY2CIFRW_PREFIX) )
1332
1333 #
1334 # PY2PLY
1335 #
1336 build_py2ply: $(M4)/Makefile.m4
1337 touch build_py2ply
1338 $(PY2PLY): build_py2ply
1339 -rm -rf $(PY2PLY)
1340 -rm -rf $(PY2PLY).tar.gz
1341 $(DOWNLOAD) $(PY2PLYURL)
1342 tar -xvf $(PY2PLY).tar.gz
1343 -rm $(PY2PLY).tar.gz
1344 (cd $(PY2PLY); \
1345 PYTHONPATH=$(PY2CIFRW_PREFIX)/lib/python:$(PY2CIFRW_PREFIX)/lib64/python; export PYTHONPATH; \
1346 mkdir -p $(PY2CIFRW_PREFIX)/lib/python/site-packages; \
1347 mkdir -p $(PY2CIFRW_PREFIX)/lib64/python/site-packages; \
1348 $(PYTHON2) setup.py install --prefix= --home=$(PY2CIFRW_PREFIX) )
1349 endif
1350
1351 ifneq ($(CBFLIB_DONT_USE_PY3CIFRW),yes)
1352 #
1353 # Py3CifRW
1354 #
1355 build_py3cifrw: $(M4)/Makefile.m4
1356 touch build_py3cifrw
1357 $(PY3CIFRW): build_py3cifrw
1358 -rm -rf $(PY3CIFRW)
1359 -rm -rf $(PY3CIFRW).tar.gz
1360 $(DOWNLOAD) $(PY3CIFRWURL)
1361 tar -xvf $(PY3CIFRW).tar.gz
1362 -rm $(PY3CIFRW).tar.gz
1363 (cd $(PY3CIFRW); \
1364 PYTHONPATH=$(PY3CIFRW_PREFIX)/lib/python:$(PY3CIFRW_PREFIX)/lib64/python; export PYTHONPATH; \
1365 mkdir -p $(PY3CIFRW_PREFIX)/lib/python/site-packages; \
1366 mkdir -p $(PY3CIFRW_PREFIX)/lib64/python/site-packages; \
1367 $(PYTHON3) setup.py install --prefix= --home=$(PY3CIFRW_PREFIX) )
1368
1369 #
1370 # PY3PLY
1371 #
1372 build_py3ply: $(M4)/Makefile.m4
1373 touch build_py3ply
1374 $(PY3PLY): build_py3ply
1375 -rm -rf $(PY3PLY)
1376 -rm -rf $(PY3PLY).tar.gz
1377 $(DOWNLOAD) $(PY3PLYURL)
1378 tar -xvf $(PY3PLY).tar.gz
1379 -rm $(PY3PLY).tar.gz
1380 (cd $(PY3PLY); \
1381 PYTHONPATH=$(PY3CIFRW_PREFIX)/lib/python:$(PY3CIFRW_PREFIX)/lib64/python; export PYTHONPATH; \
1382 mkdir -p $(PY3CIFRW_PREFIX)/lib/python/site-packages; \
1383 mkdir -p $(PY3CIFRW_PREFIX)/lib64/python/site-packages; \
1384 $(PYTHON3) setup.py install --prefix= --home=$(PY3CIFRW_PREFIX) )
1385 endif
1386
1387
1388 #
1389 # NUWEB
1390 #
1391 ifneq ($(NUWEB_DEP),'')
1392 $(NUWEB_DEP):
1393 -rm -rf $(NUWEB_DEP)
1394 -rm -rf $(NUWEB_DEP).tar.gz
1395 $(DOWNLOAD) $(NUWEB_URL)
1396 tar -xvf $(NUWEB_DEP).tar.gz
1397 touch $(NUWEB_DEP)
1398 rm $(NUWEB_DEP).tar.gz
1399
1400 $(NUWEB_DEP2): $(NUWEB_DEP)
1401 (cd $(NUWEB_DEP); make nuweb; cp nuweb $(NUWEB_DEP2))
1402 endif
1403
1404
1405 #
1406 # REGEX
1407 #
1408
1409 build_regex: $(M4)/Makefile.m4
1410 touch build_regex
1411 $(REGEX): build_regex
1412 -rm -rf $(REGEX)
1413 -rm -rf $(REGEX).tar.gz
1414 $(DOWNLOAD) $(REGEX_URL)
1415 tar -xvf $(REGEX).tar.gz
1416 touch $(REGEX)
1417 -rm $(REGEX).tar.gz
1418 cp config.guess config.sub $(REGEX)
1419 (cd $(REGEX); \
1420 prefix=$(REGEX_PREFIX); export prefix; \
1421 ./configure --prefix=$(REGEX_PREFIX); make install)
1422 @-cp $(REGEX_PREFIX)/include/pcreposix.h $(REGEX_PREFIX)/include/regex.h
1423 $(REGEX)_INSTALL: $(REGEX)
1424 -rm -rf $(REGEX)_install
1425 rsync -avz $(REGEX)/ $(REGEX)_install
1426 (cd $(REGEX)_install; prefix=$(CBF_PREFIX); export prefix; \
1427 make distclean; ./configure --prefix=$(CBF_PREFIX); make install )
1428 @-cp $(CBF_PREFIX)/include/pcreposix.h $(CBF_PREFIX)/include/regex.h
1429
1430 #
1431 # TIFF
1432 #
1433 build_tiff: $(M4)/Makefile.m4
1434 touch build_tiff
1435 $(TIFF): build_tiff config.guess config.sub
1436 -rm -rf $(TIFF)
1437 -rm -rf $(TIFF).tar.gz
1438 $(DOWNLOAD) $(TIFF_URL)
1439 tar -xvf $(TIFF).tar.gz
1440 touch $(TIFF)
1441 -rm $(TIFF).tar.gz
1442 cp config.guess config.sub $(TIFF)/config/
1443 (cd $(TIFF); prefix=$(TIFF_PREFIX); export prefix; \
1444 ./configure --prefix=$(TIFF_PREFIX); make install)
1445 $(TIFF)_INSTALL: $(TIFF)
1446 -rm -rf $(TIFF)_install
1447 rsync -avz $(TIFF)/ $(TIFF)_install
1448 (cd $(TIFF)_install; make distclean; prefix=$(CBF_PREFIX); export prefix; \
1449 ./configure --prefix=$(CBF_PREFIX); make install)
1450
1451
1452 ifneq ($(CBFLIB_DONT_USE_LOCAL_HDF5),yes)
1453 #
1454 # HDF5
1455 #
1456
1457 build_hdf5: $(M4)/Makefile.m4
1458 touch build_hdf5
1459 $(HDF5): build_hdf5
1460 -rm -rf $(HDF5)
1461 -rm -rf $(HDF5).tar.gz
1462 $(DOWNLOAD) $(HDF5_URL)
1463 tar -xvf $(HDF5).tar.gz
1464 cp config.guess $(HDF5)/bin/config.guess
1465 cp config.sub $(HDF5)/bin/config.sub
1466 touch $(HDF5)
1467 -rm $(HDF5).tar.gz
1468 echo "first level HDF5 install in "$(HDF5_PREFIX)
1469 (cd $(ROOT)/$(HDF5); \
1470 CFLAGS="$(CFLAGS)"; export CFLAGS; \
1471 mkdir -p hdf5; prefix=$(ROOT)/$(HDF5)/hdf5; export prefix; \
1472 ./configure --prefix=$(ROOT)/$(HDF5)/hdf5 --enable-build-mode=production \
1473 --enable-trace --enable-fortran --enable-using-memchecker ;\
1474 make install; \
1475 rsync -avz $(ROOT)/$(HDF5)/hdf5/bin/ $(HDF5_PREFIX)/bin; \
1476 rsync -avz $(ROOT)/$(HDF5)/hdf5/lib/ $(HDF5_PREFIX)/lib; \
1477 rsync -avz $(ROOT)/$(HDF5)/hdf5/include/ $(HDF5_PREFIX)/include; \
1478 cd $(HDF5_PREFIX)/bin; $(ROOT)/$(HDF5)/hdf5/bin/h5redeploy -force )
1479 $(HDF5)_INSTALL: $(HDF5)
1480 -rm -rf $(HDF5)_install
1481 echo "final HDF5 install in "$(CBF_PREFIX)
1482 rsync -avz $(ROOT)/$(HDF5)/hdf5/bin/ $(CBF_PREFIX)/bin; \
1483 rsync -avz $(ROOT)/$(HDF5)/hdf5/lib/ $(CBF_PREFIX)/lib; \
1484 rsync -avz $(ROOT)/$(HDF5)/hdf5/include/ $(CBF_PREFIX)/include; \
1485 cd $(CBF_PREFIX)/bin; $(ROOT)/$(HDF5)/hdf5/bin/h5redeploy -force
1486 endif
1487
1488
1489 ifneq ($(CBFLIB_DONT_USE_LZ4),yes)
1490 #
1491 # LZ4
1492 #
1493 build_lz4: $(M4)/Makefile.m4
1494 touch build_lz4
1495 $(LZ4): $(HDF5) build_lz4
1496 mkdir -p $(SOLIB)
1497 -rm -rf $(LZ4)
1498 ifneq ($(MSYS2),yes)
1499 -rm -rf $(LZ4).tar.gz
1500 $(DOWNLOAD) $(LZ4_URL)
1501 tar -xvf $(LZ4).tar.gz
1502 -rm $(LZ4).tar.gz
1503 (cp $(LZ4include)/lz4.h $(INCLUDE); \
1504 $(CC) $(CFLAGS) $(SOWCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/lz4.c -o lz4.o; \
1505 $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/h5zlz4.c -o h5zlz4.o; \
1506 $(CC) -shared lz4.o h5zlz4.o -o $(SOLIB)/libh5zlz4.so; \
1507 rm lz4.o h5zlz4.o)
1508 else
1509 git clone $(LZ4_URL)
1510 (cd $(LZ4); mkdir build; cd build; cmake .. -G 'MSYS Makefiles' -DENABLE_LZ4_PLUGIN="yes"; make all; cp plugins/* $(SOLIB))
1511 endif
1512 touch $(LZ4)
1513 endif
1514
1515
1516 ifneq ($(CBFLIB_DONT_USE_BSHUF),yes)
1517 #
1518 # BSHUF
1519 #
1520 build_BSHUF: $(M4)/Makefile.m4
1521 touch build_BSHUF
1522 $(BSHUF): $(HDF5) build_BSHUF $(LZ4dep)
1523 mkdir -p $(SOLIB)
1524 -rm -rf $(BSHUF)
1525 -rm -rf $(BSHUF).tar.gz
1526 -rm -rf *.o
1527 $(DOWNLOAD) $(BSHUFURL)
1528 tar -xvf $(BSHUF).tar.gz
1529 -rm $(BSHUF).tar.gz
1530 (cp $(BSHUFinclude)/bitshuffle.h \
1531 $(BSHUFinclude)/bitshuffle_core.h \
1532 $(BSHUFinclude)/bitshuffle_internals.h \
1533 $(BSHUFinclude)/bshuf_h5filter.h $(BSHUFinclude)/iochain.h $(INCLUDE); \
1534 $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bshuf_h5filter.c -o bshuf_h5filter.o; \
1535 $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bitshuffle.c -o bitshuffle.o; \
1536 $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bitshuffle_core.c -o bitshuffle_core.o; \
1537 $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/bshuf_h5plugin.c -o bshuf_h5plugin.o; \
1538 $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/iochain.c -o iochain.o; \
1539 $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(BSHUFsrc)/../lz4/lz4.c -o lz4.o; \
1540 $(CC) -shared bshuf_h5filter.o bitshuffle.o bitshuffle_core.o iochain.o lz4.o $(HDF5SOLIBS_LOCAL) $(HDF5SOLIBS_SYSTEM)\
1541 -o $(SOLIB)/libh5zbshuf.so; \
1542 $(CC) -shared bshuf_h5filter.o bitshuffle.o bitshuffle_core.o lz4.o bshuf_h5plugin.o iochain.o \
1543 $(HDF5SOLIBS_LOCAL) \
1544 $(HDF5SOLIBS_SYSTEM) -o $(SOLIB)/$(BSHUFFILTER).so; \
1545 rm bshuf_h5filter.o bitshuffle.o lz4.o iochain.o bshuf_h5plugin.o)
1546 touch $(BSHUF)
1547 endif
1548
1549
1550 #
1551 # Directories
1552 #
1553 $(CBF_PREFIX):
1554 mkdir -p $(CBF_PREFIX)
1555
1556 $(CBF_PREFIX)/lib: $(CBF_PREFIX)
1557 mkdir -p $(CBF_PREFIX)/lib
1558
1559 $(CBF_PREFIX)/bin: $(CBF_PREFIX)
1560 mkdir -p $(CBF_PREFIX)/bin
1561
1562 $(CBF_PREFIX)/include: $(CBF_PREFIX)
1563 mkdir -p $(CBF_PREFIX)/include
1564
1565 $(CBF_PREFIX)/include/cbflib: $(CBF_PREFIX)/include
1566 mkdir -p $(CBF_PREFIX)/include/cbflib
1567
1568
1569
1570 $(LIB):
1571 mkdir -p $@
1572
1573 $(BIN):
1574 mkdir -p $@
1575
1576 $(SOLIB):
1577 mkdir -p $@
1578
1579 $(JCBF):
1580 mkdir -p $@
1581
1582 $(MINICBF_TESTS):
1583 mkdir -p $@
1584
1585 #
1586 # Parser
1587 #
1588 $(SRC)/cbf_stx.c: $(SRC)/cbf.stx.y
1589 bison $(SRC)/cbf.stx.y -o $(SRC)/cbf.stx.tab.c -d
1590 mv $(SRC)/cbf.stx.tab.c $(SRC)/cbf_stx.c
1591 mv $(SRC)/cbf.stx.tab.h $(INCLUDE)/cbf_stx.h
1592
1593 #
1594 # CBF library
1595 #
1596 $(LIB)/libcbf.a: $(SOURCE) $(HEADERS) $(COMMONDEP) $(HDF5) $(LZ4DEPS) $(BSHUFDEPS) $(REGEXDEPS)
1597 -rm -f $@
1598 -rm -f *.o
1599 mkdir -p $(LIB)
1600 $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) \
1601 -DCBF_FILTER_STATIC $(LZ4FLAG) $(BSHUFFLAG) $(PYCIFRWFLAG) $(INCLUDES) $(WARNINGS) -c $(SOURCE)
1602 ifneq ($(CBFLIB_DONT_USE_LZ4),yes)
1603 ifneq ($(MSYS2),yes)
1604 $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(LZ4src)/h5zlz4.c -o h5zlz4.o
1605 else
1606 $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(LZ4)/LZ4/src/H5Zlz4.c -o h5zlz4.o
1607 endif
1608 endif
1609 ifneq ($(CBFLIB_DONT_USE_BSHUF),yes)
1610 $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle.c -o bitshuffle.o
1611 $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle_core.c -o bitshuffle_core.o
1612 $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bshuf_h5filter.c -o bshuf_h5filter.o
1613 $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/iochain.c -o iochain.o
1614 $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/../lz4/lz4.c -o lz4.o
1615 endif
1616 $(AR) cr $@ *.o
1617 ifneq ($(RANLIB),)
1618 $(RANLIB) $@
1619 endif
1620 -rm -f *.o
1621
1622 $(SOLIB)/libcbf.so: $(SOURCE) $(HEADERS) $(COMMONDEP) $(HDF5) $(LZ4DEPS) $(BSHUFDEPS)
1623 -rm -f $@
1624 -rm -f *.o
1625 mkdir -p $(SOLIB)
1626 $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(LZ4FLAG) $(BSHUFFLAG) $(PYCIFRWFLAG) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(SOURCE)
1627 ifneq ($(CBFLIB_DONT_USE_LZ4),yes)
1628 ifneq ($(MSYS2),yes)
1629 $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(LZ4src)/h5zlz4.c -o h5zlz4.o
1630 else
1631 $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(LZ4)/LZ4/src/H5Zlz4.c -o h5zlz4.o
1632 endif
1633 endif
1634 ifneq ($(CBFLIB_DONT_USE_BSHUF),yes)
1635 $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle.c -o bitshuffle..o
1636 $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bitshuffle_core.c -o bitshuffle_core.o
1637 $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/iochain.c -o iochain.o
1638 $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/bshuf_h5filter.c -o bshuf_h5filter.o
1639 $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) $(SOCFLAGS) -DCBF_FILTER_STATIC -c $(BSHUFsrc)/../lz4/lz4.c -o lz4.o
1640 endif
1641
1642 $(CC) -o $@ *.o $(SOLDFLAGS) $(EXTRALIBS) $(REGEX_LIBS) $(HDF5SOLIBS_LOCAL) $(HDF5SOLIBS_SYSTEM)
1643 -rm -f *.o
1644
1645 #
1646 # IMG library
1647 #
1648 $(LIB)/libimg.a: $(SRC)/img.c $(HEADERS) $(COMMONDEP)
1649 mkdir -p $(LIB)
1650 $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) -c $(SRC)/img.c
1651 $(AR) cr $@ img.o
1652 ifneq ($(RANLIB),)
1653 $(RANLIB) $@
1654 endif
1655 rm img.o
1656
1657 $(SOLIB)/libimg.so: $(SOURCE) $(HEADERS) $(COMMONDEP)
1658 -rm -f $@
1659 mkdir -p $(SOLIB)
1660 $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(SRC)/img.c
1661 $(CC) -o $@ img.o $(SOLDFLAGS)
1662 rm img.o
1663
1664 #
1665 # CBF and IMG libraries
1666 #
1667 CBF_IMG_LIBS: $(LIB)/libcbf.a $(LIB)/libimg.a
1668
1669
1670 #
1671 # FCB library
1672 #
1673 $(LIB)/libfcb.a: $(F90SOURCE) $(COMMONDEP) $(HDF5)
1674 mkdir -p $(LIB)
1675 ifneq ($(F90C),)
1676 $(F90C) $(F90FLAGS) -c $(F90SOURCE)
1677 $(AR) cr $@ *.o
1678 ifneq ($(RANLIB),)
1679 $(RANLIB) $@
1680 endif
1681 rm *.o
1682 else
1683 echo "Define F90C to build $(LIB)/libfcb.a"
1684 endif
1685
1686 $(SOLIB)/libfcb.so: $(F90SOURCE) $(HEADERS) $(COMMONDEP) $(SOLIB)
1687 ifneq ($(F90C),)
1688 -rm -f $@
1689 mkdir -p $(SOLIB)
1690 $(F90C) $(F90FLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(F90SOURCE)
1691 $(F90C) $(F90FLAGS) -o $@ *.o $(SOLDFLAGS)
1692 rm *.o
1693 else
1694 echo "Define F90C to build $(SOLIB)/libfcb.so"
1695 endif
1696
1697
1698 #
1699 # Python bindings
1700 #
1701
1702 $(PY2CBF)/make_pycbf.py: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/make_pycbf.w
1703 (cd $(PY2CBF); $(NUWEB) make_pycbf.w)
1704
1705 $(PY2CBF)/pycbf.i: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf_i.w
1706 (cd $(PY2CBF); $(NUWEB) pycbf_i.w)
1707
1708 $(PY2CBF)/py2setup_py.m4 \
1709 $(PY2CBF)/win32.bat \
1710 $(PY2CBF)/linux.sh \
1711 $(PY2CBF)/makeflatascii.py \
1712 $(PY2CBF)/pycbf_test1.py \
1713 $(PY2CBF)/pycbf_test2.py \
1714 $(PY2CBF)/pycbf_test3.py \
1715 $(PY2CBF)/pycbf_test4.py \
1716 $(PY2CBF)/pycbf_testfelaxes.py \
1717 $(PY2CBF)/xmas/readmarheader.py \
1718 $(PY2CBF)/xmas/xmasheaders.py \
1719 $(PY2CBF)/xmas/xmas_cif_template.cif : $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf.w
1720 (cd $(PY2CBF); $(NUWEB) pycbf.w )
1721 touch $(PY2CBF)/py2setup_py.m4
1722
1723 $(PY2CBF)/_py2cbf.$(PY2CBFEXT): $(PY2CBF) shared \
1724 $(PY2CBF)/py2setup.py \
1725 $(PY2CBF)/pycbf.i \
1726 $(PY2CBF)/cbfhandlewrappers.i \
1727 $(PY2CBF)/cbfdetectorwrappers.i \
1728 $(PY2CBF)/cbfgenericwrappers.i \
1729 $(PY2CBF)/cbfgoniometerwrappers.i
1730 -cp $(SOLIB)/*.so $(LIB)
1731 (cd $(PY2CBF); $(PYTHON2) py2setup.py build $(PY2CBFBOPT); cp build/lib*/_py2cbf*.$(PY2CBFEXT) .)
1732
1733 $(PY2CBF)/py2cbfinstall: $(PY2CBF)/pycbf.py
1734 (cd $(PY2CBF); $(PYTHON2) $(INSTALLSETUP_PY) install $(PY2CBFIOPT) --prefix=$(CBF_PREFIX))
1735
1736 $(PY2CBF)/py2cbfuserinstall: $(PY2CBF)/pycbf.py
1737 (cd $(PY2CBF); $(PYTHON2) $(INSTALLSETUP_PY) install $(PY2CBFIOPT) --user)
1738
1739 $(PY2CBF)/py2setup.py: $(PY2CBF)/py2setup_py.m4
1740 (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \
1741 -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \
1742 $(PY2CBF)/py2setup_py.m4 > $@)
1743
1744 $(PY2CBF)/py2setup_MINGW.py: $(PY2CBF)/setup_py.m4
1745 (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \
1746 -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \
1747 $(PY2CBF)/py2setup_py.m4 > $@)
1748
1749 $(LIB)/_py2cbf.$(PY2CBFEXT): $(PY2CBF)/_py2cbf.$(PY2CBFEXT)
1750 mkdir -p $(LIB)
1751 cp $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(LIB)/_py2cbf.$(PY2CBFEXT)
1752
1753 $(PY2CBF)/pycbf.pdf: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY2CBF)/pycbf.w
1754 (cd $(PY2CBF); \
1755 $(NUWEB) pycbf; \
1756 latex pycbf; \
1757 $(NUWEB) pycbf; \
1758 latex pycbf; \
1759 dvipdfm pycbf )
1760
1761 $(PY2CBF)/CBFlib.txt: $(DOC)/CBFlib.html
1762 links -dump $(DOC)/CBFlib.html > $(PY2CBF)/CBFlib.txt
1763
1764 $(PY2CBF)/pycbf.py: $(PY2CBF)/pycbf.pdf $(PY2CBF)/cbfdetectorwrappers.i \
1765 $(PY2CBF)/cbfgenericwrappers.i \
1766 $(PY2CBF)/cbfgoniometerwrappers.i \
1767 $(PY2CBF)/CBFlib.txt $(PY2CBF)/make_pycbf.py
1768 (cd $(PY2CBF); $(PYTHON2) make_pycbf.py; $(PYSWIG) -module py2cbf pycbf.i; \
1769 $(PYTHON2) py2setup.py build; mv pycbf.py rawpycbf.py; \
1770 cat rawpycbf.py | sed "s/ _pycbf/ _py2cbf/" > pycbf.py )
1771
1772 $(PY3CBF)/make_pycbf.py: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/make_pycbf.w
1773 (cd $(PY3CBF); $(NUWEB) make_pycbf.w)
1774
1775 $(PY3CBF)/pycbf.i: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf_i.w
1776 (cd $(PY3CBF); $(NUWEB) pycbf_i.w)
1777
1778 $(PY3CBF)/py3setup_py.m4 \
1779 $(PY3CBF)/win32.bat \
1780 $(PY3CBF)/linux.sh \
1781 $(PY3CBF)/makeflatascii.py \
1782 $(PY3CBF)/pycbf_test1.py \
1783 $(PY3CBF)/pycbf_test2.py \
1784 $(PY3CBF)/pycbf_test3.py \
1785 $(PY3CBF)/pycbf_test4.py \
1786 $(PY3CBF)/pycbf_testfelaxes.py \
1787 $(PY3CBF)/xmas/readmarheader.py \
1788 $(PY3CBF)/xmas/xmasheaders.py \
1789 $(PY3CBF)/xmas/xmas_cif_template.cif: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf.w
1790 (cd $(PY3CBF); $(NUWEB) pycbf.w )
1791 touch $(PY3CBF)/py3setup_py.m4
1792
1793
1794 $(PY3CBF)/_pycbf.$(PY3CBFEXT): $(PY3CBF) shared \
1795 $(PY3CBF)/py3setup.py \
1796 $(PY3CBF)/pycbf.i \
1797 $(PY3CBF)/cbfhandlewrappers.i \
1798 $(PY3CBF)/cbfdetectorwrappers.i \
1799 $(PY3CBF)/cbfgenericwrappers.i \
1800 $(PY3CBF)/cbfgoniometerwrappers.i
1801 -cp $(SOLIB)/*.so $(LIB)
1802 (cd $(PY3CBF); $(PYTHON3) py3setup.py build $(PY3CBFBOPT); cp build/lib*/_pycbf*.$(PY3CBFEXT) .)
1803
1804 $(PY3CBF)/py3cbfinstall: $(PY3CBF)/pycbf.py
1805 (cd $(PY3CBF); $(PYTHON3) $(INSTALLSETUP_PY) install $(PY3CBFIOPT) --prefix=$(CBF_PREFIX))
1806
1807 $(PY3CBF)/py3cbfuserinstall: $(PY3CBF)/pycbf.py
1808 (cd $(PY3CBF); $(PYTHON3) $(INSTALLSETUP_PY) install $(PY3CBFIOPT) --user)
1809
1810 $(PY3CBF)/py3setup.py: $(PY3CBF)/py3setup_py.m4
1811 (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \
1812 -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \
1813 $(PY3CBF)/py3setup_py.m4 > $@)
1814
1815 $(PY3CBF)/py3setup_MINGW.py: $(PY3CBF)/py3setup_py.m4
1816 (m4 -P -Dregexlib=$(REGEX_LIB) -Dregexlib2=$(REGEX_LIB2) \
1817 -Dregexlibdir=$(REGEX_LIBDIR) -Dhdf5_prefix=$(HDF5_PREFIX) \
1818 $(PY3CBF)/py3setup_py.m4 > $@)
1819
1820 $(LIB)/_pycbf.$(PY3CBFEXT): $(PY3CBF)/_pycbf.$(PY3CBFEXT)
1821 mkdir -p $(LIB)
1822 cp $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(LIB)/_pycbf.$(PY3CBFEXT)
1823
1824 $(PY3CBF)/pycbf.pdf: $(NUWEB_DEP) $(NUWEB_DEP2) $(PY3CBF)/pycbf.w
1825 (cd $(PY3CBF); \
1826 $(NUWEB) pycbf; \
1827 latex pycbf; \
1828 $(NUWEB) pycbf; \
1829 latex pycbf; \
1830 dvipdfm pycbf )
1831
1832 $(PY3CBF)/CBFlib.txt: $(DOC)/CBFlib.html
1833 links -dump $(DOC)/CBFlib.html > $(PY3CBF)/CBFlib.txt
1834
1835 $(PY3CBF)/pycbf.py: $(PY3CBF)/pycbf.pdf $(PY3CBF)/cbfdetectorwrappers.i \
1836 $(PY3CBF)/cbfgenericwrappers.i \
1837 $(PY3CBF)/cbfgoniometerwrappers.i \
1838 $(PY3CBF)/CBFlib.txt $(PY3CBF)/make_pycbf.py
1839 (cd $(PY3CBF); $(PYTHON3) make_pycbf.py; $(PYSWIG) pycbf.i; \
1840 $(PYTHON3) py3setup.py build; mv pycbf.py rawpycbf.py; \
1841 echo "# coding=utf-8" | cat - rawpycbf.py > pycbf.py)
1842
1843 #
1844 # Java bindings
1845 #
1846 $(JCBF)/cbflib-$(VERSION).jar: $(JCBF) $(SRC)/jcbf.i
1847 $(JSWIG) -I$(INCLUDE) -package org.iucr.cbflib -outdir $(JCBF) -o $(JCBF)/jcbf_wrap.c $(SRC)/jcbf.i
1848 $(JAVAC) -d . $(JCBF)/*.java
1849 $(JAR) cf $@ org
1850
1851 $(SOLIB)/libcbf_wrap.so: $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf.so
1852 mkdir -p $(SOLIB)
1853 $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) $(JAVAINCLUDES) -c $(JCBF)/jcbf_wrap.c
1854 $(CC) -o $@ jcbf_wrap.o $(SOLDFLAGS) -L$(SOLIB) -lcbf $(REGEX_LIBS)
1855 rm jcbf_wrap.o
1856
1857 #
1858 # F90SOURCE
1859 #
1860 $(SRC)/fcb_exit_binary.f90: $(M4)/fcb_exit_binary.m4 $(M4)/fcblib_defines.m4
1861 (cd $(M4); m4 -P $(M4FLAGS) fcb_exit_binary.m4) > $(SRC)/fcb_exit_binary.f90
1862 $(SRC)/fcb_next_binary.f90: $(M4)/fcb_next_binary.m4 $(M4)/fcblib_defines.m4
1863 (cd $(M4); m4 -P $(M4FLAGS) fcb_next_binary.m4) > $(SRC)/fcb_next_binary.f90
1864 $(SRC)/fcb_open_cifin.f90: $(M4)/fcb_open_cifin.m4 $(M4)/fcblib_defines.m4
1865 (cd $(M4); m4 -P $(M4FLAGS) fcb_open_cifin.m4) > $(SRC)/fcb_open_cifin.f90
1866 $(SRC)/fcb_packed.f90: $(M4)/fcb_packed.m4 $(M4)/fcblib_defines.m4
1867 (cd $(M4); m4 -P $(M4FLAGS) fcb_packed.m4) > $(SRC)/fcb_packed.f90
1868 $(SRC)/fcb_read_bits.f90: $(M4)/fcb_read_bits.m4 $(M4)/fcblib_defines.m4
1869 (cd $(M4); m4 -P $(M4FLAGS) fcb_read_bits.m4) > $(SRC)/fcb_read_bits.f90
1870 $(SRC)/fcb_read_image.f90: $(M4)/fcb_read_image.m4 $(M4)/fcblib_defines.m4
1871 (cd $(M4); m4 -P $(M4FLAGS) fcb_read_image.m4) > $(SRC)/fcb_read_image.f90
1872 $(SRC)/fcb_read_xds_i2.f90: $(M4)/fcb_read_xds_i2.m4 $(M4)/fcblib_defines.m4
1873 (cd $(M4); m4 -P $(M4FLAGS) fcb_read_xds_i2.m4) > $(SRC)/fcb_read_xds_i2.f90
1874 $(EXAMPLES)/test_fcb_read_image.f90: $(M4)/test_fcb_read_image.m4 $(M4)/fcblib_defines.m4
1875 (cd $(M4); m4 -P $(M4FLAGS) test_fcb_read_image.m4) > $(EXAMPLES)/test_fcb_read_image.f90
1876 $(EXAMPLES)/test_xds_binary.f90: $(M4)/test_xds_binary.m4 $(M4)/fcblib_defines.m4
1877 (cd $(M4); m4 -P $(M4FLAGS) test_xds_binary.m4) > $(EXAMPLES)/test_xds_binary.f90
1878
1879 #
1880 # convert_image example program
1881 #
1882 $(BIN)/convert_image: $(LIB)/libcbf.a $(EXAMPLES)/convert_image.c $(SRC)/img.c \
1883 $(GOPTLIB) $(GOPTINC)
1884 mkdir -p $(BIN)
1885 $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
1886 $(EXAMPLES)/convert_image.c $(SRC)/img.c $(GOPTLIB) -L$(LIB) \
1887 -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@
1888 #
1889 # convert_minicbf example program
1890 #
1891 $(BIN)/convert_minicbf: $(LIB)/libcbf.a $(EXAMPLES)/convert_minicbf.c \
1892 $(GOPTLIB) $(GOPTINC) $(EXAMPLES)/batch_convert_minicbf.sh
1893 mkdir -p $(BIN)
1894 $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
1895 $(EXAMPLES)/convert_minicbf.c $(GOPTLIB) -L$(LIB) \
1896 -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@
1897 chmod 755 $(EXAMPLES)/batch_convert_minicbf.sh
1898
1899 #
1900 # makecbf example program
1901 #
1902 $(BIN)/makecbf: $(LIB)/libcbf.a $(EXAMPLES)/makecbf.c $(LIB)/libimg.a
1903 mkdir -p $(BIN)
1904 $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
1905 $(EXAMPLES)/makecbf.c -L$(LIB) \
1906 -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@
1907
1908
1909 #
1910 # adscimg2cbf example program
1911 #
1912 $(BIN)/adscimg2cbf: $(LIB)/libcbf.a $(EXAMPLES)/adscimg2cbf.c $(EXAMPLES)/adscimg2cbf_sub.c
1913 mkdir -p $(BIN)
1914 $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -D_SVID_SOURCE $(INCLUDES) $(WARNINGS) \
1915 $(EXAMPLES)/adscimg2cbf.c $(EXAMPLES)/adscimg2cbf_sub.c -L$(LIB) \
1916 -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@
1917
1918 #
1919 # cbf2adscimg example program
1920 #
1921 $(BIN)/cbf2adscimg: $(LIB)/libcbf.a $(EXAMPLES)/cbf2adscimg.c $(EXAMPLES)/cbf2adscimg_sub.c
1922 mkdir -p $(BIN)
1923 $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -D_SVID_SOURCE $(INCLUDES) $(WARNINGS) \
1924 $(EXAMPLES)/cbf2adscimg.c $(EXAMPLES)/cbf2adscimg_sub.c -L$(LIB) \
1925 -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@
1926
1927 #
1928 # cbf_standardize_numbers example program
1929 #
1930 $(BIN)/cbf_standardize_numbers: $(EXAMPLES)/cbf_standardize_numbers.c $(EXAMPLES)/cbf_standardize_numbers.h
1931 mkdir -p $(BIN)
1932 $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -D_SVID_SOURCE $(INCLUDES) $(WARNINGS) \
1933 $(EXAMPLES)/cbf_standardize_numbers.c $(SRC_FGETLN) $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o $@
1934
1935 #
1936 # changtestcompression example program
1937 #
1938 $(BIN)/changtestcompression: $(LIB)/libcbf.a $(EXAMPLES)/changtestcompression.c
1939 mkdir -p $(BIN)
1940 $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
1941 $(EXAMPLES)/changtestcompression.c -L$(LIB) \
1942 -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@
1943
1944 #
1945 # img2cif example program
1946 #
1947 $(BIN)/img2cif: $(LIB)/libcbf.a $(EXAMPLES)/img2cif.c $(LIB)/libimg.a \
1948 $(GOPTLIB) $(GOTPINC)
1949 mkdir -p $(BIN)
1950 $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
1951 $(EXAMPLES)/img2cif.c $(GOPTLIB) -L$(LIB) \
1952 -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -lhdf5 -limg -o $@
1953
1954 #
1955 # cif2cbf example program
1956 #
1957 $(BIN)/cif2cbf: $(LIB)/libcbf.a $(EXAMPLES)/cif2cbf.c $(LIB)/libimg.a \
1958 $(GOPTLIB) $(GOPTINC)
1959 mkdir -p $(BIN)
1960 $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
1961 $(EXAMPLES)/cif2cbf.c $(GOPTLIB) -L$(LIB) \
1962 -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -lhdf5 -limg -o $@
1963
1964 #
1965 # cbf2nexus example program
1966 #
1967 $(BIN)/cbf2nexus: $(LIB)/libcbf.a $(EXAMPLES)/cbf2nexus.c \
1968 $(GOPTLIB) $(GOPTINC)
1969 mkdir -p $(BIN)
1970 $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
1971 $(EXAMPLES)/cbf2nexus.c $(GOPTLIB) -L$(LIB) \
1972 -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) \
1973 -lhdf5 -limg -o $@
1974
1975 #
1976 # minicbf2nexus example program
1977 #
1978 $(BIN)/minicbf2nexus: $(LIB)/libcbf.a $(EXAMPLES)/minicbf2nexus.c $(LIB)/libimg.a \
1979 $(GOPTLIB) $(GOPTINC)
1980 mkdir -p $(BIN)
1981 $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
1982 $(EXAMPLES)/minicbf2nexus.c $(GOPTLIB) -L$(LIB) \
1983 -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -lhdf5 -limg -o $@
1984
1985 #
1986 # nexus2cbf example program
1987 #
1988 $(BIN)/nexus2cbf: $(LIB)/libcbf.a $(EXAMPLES)/nexus2cbf.c \
1989 $(GOPTLIB) $(GOPTINC) $(REGEX)
1990 mkdir -p $(BIN)
1991 $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
1992 $(EXAMPLES)/nexus2cbf.c $(GOPTLIB) -L$(LIB) \
1993 -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -lhdf5 -limg -o $@
1994
1995 #
1996 # roi_peaksearch example program
1997 #
1998 $(BIN)/roi_peaksearch: $(LIB)/libcbf.a $(EXAMPLES)/roi_peaksearch.c \
1999 $(EXAMPLES)/dps_peaksearch.c $(EXAMPLES)/dps_peaksearch.h $(GOPTLIB) $(GOPTINC)
2000 mkdir -p $(BIN)
2001 $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
2002 $(EXAMPLES)/roi_peaksearch.c $(EXAMPLES)/dps_peaksearch.c $(GOPTLIB) -L$(LIB) \
2003 -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@
2004
2005
2006 #
2007 # dectris cbf_template_t program
2008 #
2009 $(BIN)/cbf_template_t: $(DECTRIS_EXAMPLES)/cbf_template_t.c \
2010 $(DECTRIS_EXAMPLES)/mx_cbf_t_extras.h \
2011 $(DECTRIS_EXAMPLES)/mx_parms.h
2012 mkdir -p $(BIN)
2013 $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -I $(DECTRIS_EXAMPLES) $(WARNINGS) \
2014 $(DECTRIS_EXAMPLES)/cbf_template_t.c -o $@
2015
2016 #
2017 # testcell example program
2018 #
2019 $(BIN)/testcell: $(LIB)/libcbf.a $(EXAMPLES)/testcell.C
2020 mkdir -p $(BIN)
2021 $(C++) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
2022 $(EXAMPLES)/testcell.C -L$(LIB) \
2023 -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@
2024
2025 #
2026 # cif2c example program
2027 #
2028 $(BIN)/cif2c: $(LIB)/libcbf.a $(EXAMPLES)/cif2c.c
2029 mkdir -p $(BIN)
2030 $(C++) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
2031 $(EXAMPLES)/cif2c.c -L$(LIB) \
2032 -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@
2033
2034 #
2035 # sauter_test example program
2036 #
2037 $(BIN)/sauter_test: $(LIB)/libcbf.a $(EXAMPLES)/sauter_test.C
2038 mkdir -p $(BIN)
2039 $(C++) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
2040 $(EXAMPLES)/sauter_test.C -L$(LIB) \
2041 -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@
2042
2043 #
2044 # sequence_match example program
2045 #
2046 $(BIN)/sequence_match: $(LIB)/libcbf.a $(EXAMPLES)/sequence_match.c $(LIB)/libimg.a \
2047 $(GOPTLIB) $(GOPTINC)
2048 mkdir -p $(BIN)
2049 $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
2050 $(EXAMPLES)/sequence_match.c $(GOPTLIB) -L$(LIB) \
2051 -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@
2052
2053 #
2054 # tiff2cbf example program
2055 #
2056 $(BIN)/tiff2cbf: $(LIB)/libcbf.a $(EXAMPLES)/tiff2cbf.c $(EXAMPLES)/tif_sprint.c \
2057 $(GOPTLIB) $(GOPTINC) $(TIFF)
2058 mkdir -p $(BIN)
2059 $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
2060 -I$(TIFF)/libtiff $(EXAMPLES)/tiff2cbf.c $(GOPTLIB) -L$(LIB) \
2061 -lcbf -L$(TIFF_PREFIX)/lib -ltiff $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@
2062
2063 #
2064 # Andy Arvai's buffered read test program
2065 #
2066 $(BIN)/arvai_test: $(LIB)/libcbf.a $(EXAMPLES)/arvai_test.c $(LIB)/libimg.a \
2067 $(GOPTLIB) $(GOPTINC)
2068 mkdir -p $(BIN)
2069 $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
2070 $(EXAMPLES)/arvai_test.c $(GOPTLIB) -L$(LIB) \
2071 -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -limg -o $@
2072
2073 #
2074 # testreals example program
2075 #
2076 $(BIN)/testreals: $(LIB)/libcbf.a $(EXAMPLES)/testreals.c
2077 mkdir -p $(BIN)
2078 $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
2079 $(EXAMPLES)/testreals.c -L$(LIB) \
2080 -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@
2081
2082 #
2083 # testflat example program
2084 #
2085 $(BIN)/testflat: $(LIB)/libcbf.a $(EXAMPLES)/testflat.c
2086 mkdir -p $(BIN)
2087 $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
2088 $(EXAMPLES)/testflat.c -L$(LIB) \
2089 -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@
2090 #
2091 # testflatpacked example program
2092 #
2093 $(BIN)/testflatpacked: $(LIB)/libcbf.a $(EXAMPLES)/testflatpacked.c
2094 mkdir -p $(BIN)
2095 $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
2096 $(EXAMPLES)/testflatpacked.c -L$(LIB) \
2097 -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@
2098
2099 ifneq ($(F90C),)
2100 #
2101 # test_xds_binary example program
2102 #
2103 $(BIN)/test_xds_binary: $(LIB)/libfcb.a $(EXAMPLES)/test_xds_binary.f90
2104 mkdir -p $(BIN)
2105 $(F90C) $(F90FLAGS) $(F90LDFLAGS) $(EXAMPLES)/test_xds_binary.f90 \
2106 -L$(LIB) -lfcb -o $@
2107
2108 #
2109 # test_fcb_read_image example program
2110 #
2111 $(BIN)/test_fcb_read_image: $(LIB)/libfcb.a $(EXAMPLES)/test_fcb_read_image.f90
2112 mkdir -p $(BIN)
2113 $(F90C) $(F90FLAGS) $(F90LDFLAGS) $(EXAMPLES)/test_fcb_read_image.f90 \
2114 -L$(LIB) -lfcb -o $@
2115 endif
2116
2117 #
2118 # testcbf (C)
2119 #
2120 $(BIN)/ctestcbf: $(EXAMPLES)/testcbf.c $(LIB)/libcbf.a
2121 mkdir -p $(BIN)
2122 $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
2123 $(EXAMPLES)/testcbf.c -L$(LIB) \
2124 -lcbf $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) -o $@
2125
2126 #
2127 # testcbf (Java)
2128 #
2129 $(BIN)/testcbf.class: $(EXAMPLES)/testcbf.java $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf_wrap.so
2130 mkdir -p $(BIN)
2131 $(JAVAC) -cp $(JCBF)/cbflib-$(VERSION).jar -d $(BIN) $(EXAMPLES)/testcbf.java
2132
2133 ifneq ($(CBF_USE_ULP),)
2134 #
2135 # testulp test program
2136 #
2137 $(BIN)/testulp: $(LIB)/libcbf.a $(EXAMPLES)/testulp.c $(EXAMPLES)/unittest.h
2138 mkdir -p $(BIN)
2139 $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \
2140 $(WARNINGS) $(EXAMPLES)/testulp.c -L$(LIB) $(LIB)/libcbf.a \
2141 $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o [email protected]
2142 mv [email protected] $@
2143 endif
2144
2145 #
2146 # testhdf5 test program
2147 #
2148 $(BIN)/testhdf5: $(LIB)/libcbf.a $(EXAMPLES)/testhdf5.c $(EXAMPLES)/unittest.h
2149 mkdir -p $(BIN)
2150 $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \
2151 $(WARNINGS) $(EXAMPLES)/testhdf5.c -L$(LIB) $(LIB)/libcbf.a \
2152 $(REGEX_LIBS_STATIC) $(HDF5LIBS_LOCAL) $(EXTRALIBS) $(HDF5LIBS_SYSTEM) \
2153 -o [email protected]
2154 mv [email protected] $@
2155
2156 #
2157 # testalloc test program
2158 #
2159 $(BIN)/testalloc: $(LIB)/libcbf.a $(EXAMPLES)/testalloc.c $(EXAMPLES)/unittest.h
2160 mkdir -p $(BIN)
2161 $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \
2162 $(WARNINGS) $(EXAMPLES)/testalloc.c -L$(LIB) $(LIB)/libcbf.a \
2163 $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o [email protected]
2164 mv [email protected] $@
2165
2166 #
2167 # test_cbf_airy_disk test program
2168 #
2169 $(BIN)/test_cbf_airy_disk: $(LIB)/libcbf.a $(EXAMPLES)/test_cbf_airy_disk.c
2170 mkdir -p $(BIN)
2171 $(CC) $(CFLAGS) $(LDFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) \
2172 $(WARNINGS) $(EXAMPLES)/test_cbf_airy_disk.c -L$(LIB) $(LIB)/libcbf.a \
2173 $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o [email protected]
2174 mv [email protected] $@
2175
2176 #
2177 # cbf_testxfelread: test program
2178 #
2179 $(BIN)/cbf_testxfelread: $(LIB)/libcbf.a $(EXAMPLES)/cbf_testxfelread.c $(EXAMPLES)/cbf_testxfelread.h
2180 mkdir -p $(BIN)
2181 $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
2182 $(EXAMPLES)/cbf_testxfelread.c -L$(LIB) $(LIB)/libcbf.a \
2183 $(REGEX_LIBS_STATIC) $(EXTRALIBS) -o [email protected]
2184 mv [email protected] $@
2185
2186 #
2187 # Data files for tests
2188 #
2189
2190 $(DATADIRI): $(M4)/Makefile.m4
2191 (cd ..; $(DOWNLOAD) $(DATAURLI))
2192 (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Input.tar.gz)
2193 touch $(DATADIRI)
2194 -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Input.tar.gz)
2195
2196 $(DATADIRO): $(M4)/Makefile.m4
2197 (cd ..; $(DOWNLOAD) $(DATAURLO))
2198 (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Output.tar.gz)
2199 touch $(DATADIRO)
2200 -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Output.tar.gz)
2201
2202 # Input Data Files
2203
2204 TESTINPUT_BASIC = example.mar2300
2205 DATADIRI_INPUT_BASIC = $(DATADIRI)/example.mar2300
2206
2207
2208 TESTINPUT_EXTRA = \
2209 1191_00005.cbf \
2210 9ins.cif \
2211 hit-20140306005258847.cbf \
2212 insulin_pilatus6m.cbf \
2213 mb_LP_1_001.img \
2214 testflatin.cbf \
2215 testflatpackedin.cbf \
2216 testrealin.cbf \
2217 thaumatin_die_M1S5_1_0005_2.cbf \
2218 X4_lots_M1S4_1_0001.cbf \
2219 X4_lots_M1S4_1_0002.cbf \
2220 X4_lots_M1S4_1_0003.cbf \
2221 X4_lots_M1S4_1_0004.cbf \
2222 X4_lots_M1S4_1_0005.cbf \
2223 XRD1621.tif
2224
2225
2226
2227 DATADIRI_INPUT_EXTRA = \
2228 $(DATADIRI)/1191_00005.cbf \
2229 $(DATADIRI)/9ins.cif \
2230 $(DATADIRI)/hit-20140306005258847.cbf \
2231 $(DATADIRI)/insulin_pilatus6m.cbf \
2232 $(DATADIRI)/mb_LP_1_001.img \
2233 $(DATADIRI)/testflatin.cbf \
2234 $(DATADIRI)/testflatpackedin.cbf \
2235 $(DATADIRI)/testrealin.cbf \
2236 $(DATADIRI)/thaumatin_die_M1S5_1_0005_2.cbf \
2237 $(DATADIRI)/X4_lots_M1S4_1_0001.cbf \
2238 $(DATADIRI)/X4_lots_M1S4_1_0002.cbf \
2239 $(DATADIRI)/X4_lots_M1S4_1_0003.cbf \
2240 $(DATADIRI)/X4_lots_M1S4_1_0004.cbf \
2241 $(DATADIRI)/X4_lots_M1S4_1_0005.cbf \
2242 $(DATADIRI)/XRD1621.tif
2243
2244
2245 # Output Data Files
2246
2247 TESTOUTPUT = adscconverted_flat_orig.cbf \
2248 adscconverted_orig.cbf converted_flat_orig.cbf converted_orig.cbf \
2249 insulin_pilatus6mconverted_orig.cbf.h5.cbf \
2250 insulin_pilatus6mconverted_orig.cbf.h5 \
2251 insulin_pilatus6mconverted_orig.cbf \
2252 insulin_pilatus6mconverted_v2_orig.cbf \
2253 mb_LP_1_001_orig.cbf testcell_orig.prt \
2254 test_xds_bin_testflatout_orig.out \
2255 test_xds_bin_testflatpackedout_orig.out test_fcb_read_testflatout_orig.out \
2256 test_fcb_read_testflatpackedout_orig.out \
2257 XRD1621_orig.cbf XRD1621_I4encbC100_orig.cbf \
2258 minicbf_orig.h5 \
2259 pycbf_test1_orig.out \
2260 pycbf_test2_orig.out \
2261 pycbf_test3_orig.out \
2262 pycbf_test4_orig.out \
2263 fel_test1_orig.out \
2264 fel_test2_orig.out \
2265 fel_test3_orig.out
2266 NEWTESTOUTPUT = adscconverted_flat.cbf \
2267 adscconverted.cbf converted_flat.cbf converted.cbf \
2268 insulin_pilatus6mconverted.cbf \
2269 insulin_pilatus6mconverted.cbf.h5 \
2270 insulin_pilatus6mconverted.cbf.h5.cbf \
2271 insulin_pilatus6mconverted_orig.cbf \
2272 insulin_pilatus6mconverted_v2.cbf \
2273 mb_LP_1_001.cbf testcell.prt \
2274 test_xds_bin_testflatout.out \
2275 test_xds_bin_testflatpackedout.out test_fcb_read_testflatout.out \
2276 test_fcb_read_testflatpackedout.out \
2277 XRD1621.cbf XRD1621_I4encbC100.cbf \
2278 $(MINICBF_TEST)/minicbf.h5 \
2279 pycbf_test1.out \
2280 pycbf_test2.out \
2281 pycbf_test3.out \
2282 pycbf_test4.out \
2283 fel_test1.out \
2284 fel_test2.out \
2285 fel_test3.out
2286 DATADIRO_OUTPUT = $(DATADIRO)/adscconverted_flat_orig.cbf \
2287 $(DATADIRO)/adscconverted_orig.cbf \
2288 $(DATADIRO)/converted_flat_orig.cbf \
2289 $(DATADIRO)/converted_orig.cbf \
2290 $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf \
2291 $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5 \
2292 $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf \
2293 $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf \
2294 $(DATADIRO)/mb_LP_1_001_orig.cbf \
2295 $(DATADIRO)/testcell_orig.prt \
2296 $(DATADIRO)/test_xds_bin_testflatout_orig.out \
2297 $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out \
2298 $(DATADIRO)/test_fcb_read_testflatout_orig.out \
2299 $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out \
2300 $(DATADIRO)/XRD1621_orig.cbf \
2301 $(DATADIRO)/XRD1621_I4encbC100_orig.cbf \
2302 $(DATADIRO)/minicbf_orig.h5
2303 DATADIRO_OUTPUT_SIGNATURES = $(DATADIRO)/adscconverted_flat_orig.cbf$(SEXT) \
2304 $(DATADIRO)/adscconverted_orig.cbf$(SEXT) \
2305 $(DATADIRO)/converted_flat_orig.cbf$(SEXT) \
2306 $(DATADIRO)/converted_orig.cbf$(SEXT) \
2307 $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \
2308 $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \
2309 $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf$(SEXT) \
2310 $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \
2311 $(DATADIRO)/mb_LP_1_001_orig.cbf$(SEXT) \
2312 $(DATADIRO)/testcell_orig.prt$(SEXT) \
2313 $(DATADIRO)/test_xds_bin_testflatout_orig.out$(SEXT) \
2314 $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out$(SEXT) \
2315 $(DATADIRO)/test_fcb_read_testflatout_orig.out$(SEXT) \
2316 $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out$(SEXT) \
2317 $(DATADIRO)/XRD1621_orig.cbf$(SEXT) \
2318 $(DATADIRO)/XRD1621_I4encbC100_orig.cbf$(SEXT) \
2319 $(DATADIRO)/minicbf_orig.h5$(SEXT)
2320
2321
2322
2323 # Output Data File Signatures
2324
2325 TESTOUTPUTSIGS = adscconverted_flat_orig.cbf$(SEXT) \
2326 adscconverted_orig.cbf$(SEXT) converted_flat_orig.cbf$(SEXT) converted_orig.cbf$(SEXT) \
2327 insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \
2328 insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \
2329 insulin_pilatus6mconverted_orig.cbf$(SEXT) \
2330 insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \
2331 mb_LP_1_001_orig.cbf$(SEXT) testcell_orig.prt$(SEXT) \
2332 test_xds_bin_testflatout_orig.out$(SEXT) \
2333 test_xds_bin_testflatpackedout_orig.out$(SEXT) test_fcb_read_testflatout_orig.out$(SEXT) \
2334 test_fcb_read_testflatpackedout_orig.out$(SEXT) \
2335 XRD1621_orig.cbf$(SEXT) \
2336 XRD1621_I4encbC100_orig.cbf$(SEXT) \
2337 minicbf_orig.h5$(SEXT) \
2338 pycbf_test1_orig.out$(SEXT) \
2339 pycbf_test2_orig.out$(SEXT) \
2340 pycbf_test3_orig.out$(SEXT) \
2341 pycbf_test4_orig.out$(SEXT) \
2342 fel_test1_orig.out$(SEXT) \
2343 fel_test2_orig.out$(SEXT) \
2344 fel_test3_orig.out$(SEXT)
2345 DATADIRS_OUTPUT_SIGNATURES = $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) \
2346 $(DATADIRS)/adscconverted_orig.cbf$(SEXT) \
2347 $(DATADIRS)/converted_flat_orig.cbf$(SEXT) \
2348 $(DATADIRS)/converted_orig.cbf$(SEXT) \
2349 $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT) \
2350 $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \
2351 $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf$(SEXT) \
2352 $(DATADIRS)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \
2353 $(DATADIRS)/mb_LP_1_001_orig.cbf$(SEXT) \
2354 $(DATADIRS)/testcell_orig.prt$(SEXT) \
2355 $(DATADIRS)/test_xds_bin_testflatout_orig.out$(SEXT) \
2356 $(DATADIRS)/test_xds_bin_testflatpackedout_orig.out$(SEXT) \
2357 $(DATADIRS)/test_fcb_read_testflatout_orig.out$(SEXT) \
2358 $(DATADIRS)/test_fcb_read_testflatpackedout_orig.out$(SEXT) \
2359 $(DATADIRS)/XRD1621_orig.cbf$(SEXT) \
2360 $(DATADIRS)/XRD1621_I4encbC100_orig.cbf$(SEXT) \
2361 $(DATADIRS)/minicbf_orig.h5$(SEXT) \
2362 $(DATADIRS)/pycbf_test1_orig.out$(SEXT) \
2363 $(DATADIRS)/pycbf_test2_orig.out$(SEXT) \
2364 $(DATADIRS)/pycbf_test3_orig.out$(SEXT) \
2365 $(DATADIRS)/pycbf_test4_orig.out$(SEXT) \
2366 $(DATADIRS)/fel_test1_orig.out$(SEXT) \
2367 $(DATADIRS)/fel_test2_orig.out$(SEXT) \
2368 $(DATADIRS)/fel_test3_orig.out$(SEXT)
2369
2370 # Fetch Input Data Files
2371
2372 $(TESTINPUT_BASIC): $(DATADIRI) $(DATADIRI_INPUT_BASIC)
2373 cp $(DATADIRI)/$@ $@
2374 cp $(DATADIRI)/$@$(SEXT) $@$(SEXT)
2375 -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT)
2376
2377 $(TESTINPUT_EXTRA): $(DATADIRI) $(DATADIRI_INPUT_EXTRA)
2378 cp $(DATADIRI)/$@ $@
2379 cp $(DATADIRI)/$@$(SEXT) $@$(SEXT)
2380 -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT)
2381
2382
2383 # Fetch Output Data Files and Signatures
2384
2385 $(TESTOUTPUT): $(DATADIRO) $(DATADIRO_OUTPUT) $(DATADIRO_OUTPUT_SIGNATURES)
2386 cp $(DATADIRO)/$@ $@
2387 cp $(DATADIRO)/$@$(SEXT) $@$(SEXT)
2388 -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT)
2389
2390
2391 #
2392 # Tests
2393 #
2394
2395
2396 tests: all $(LIB) $(BIN) symlinksdone basic extra dectristests py2cbftests py3cbftests
2397 restore_output: $(NEWTESTOUTPUT) $(DATADIRO) $(MINICBF_TEST)/minicbf.h5
2398 $(SIGNATURE) < adscconverted_flat.cbf > $(DATADIRO)/adscconverted_flat_orig.cbf$(SEXT)
2399 $(SIGNATURE) < adscconverted.cbf > $(DATADIRO)/adscconverted_orig.cbf$(SEXT)
2400 $(SIGNATURE) < converted_flat.cbf > $(DATADIRO)/converted_flat_orig.cbf$(SEXT)
2401 $(SIGNATURE) < converted.cbf > $(DATADIRO)/converted_orig.cbf$(SEXT)
2402 $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5 > $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5$(SEXT)
2403 $(SIGNATURE) < insulin_pilatus6mconverted.cbf.h5.cbf > $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT)
2404 $(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf > $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT)
2405 $(SIGNATURE) < mb_LP_1_001.cbf$ > $(DATADIRO)/mb_LP_1_001_orig.cbf$(SEXT)
2406 $(SIGNATURE) < testcell.prt > $(DATADIRO)/testcell_orig.prt$(SEXT)
2407 $(SIGNATURE) < test_xds_bin_testflatout.out > $(DATADIRO)/test_xds_bin_testflatout_orig.out$(SEXT)
2408 $(SIGNATURE) < test_xds_bin_testflatpackedout.out > $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out$(SEXT)
2409 $(SIGNATURE) < test_fcb_read_testflatout.out > $(DATADIRO)/test_fcb_read_testflatout_orig.out$(SEXT)
2410 $(SIGNATURE) < test_fcb_read_testflatpackedout.out > $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out$(SEXT)
2411 $(SIGNATURE) < XRD1621.cbf > $(DATADIRO)/XRD1621_orig.cbf$(SEXT)
2412 $(SIGNATURE) < XRD1621_I4encbC100.cbf > $(DATADIRO)/XRD1621_I4encbC100_orig.cbf$(SEXT)
2413 $(SIGNATURE) < $(MINICBF_TEST)/minicbf.h5 > $(DATADIRO)/minicbf_orig.h5$(SEXT)
2414 $(SIGNATURE) < $(PY2CBF)/pycbf_test1.out > $(DATADIRO)/pycbf_test1_orig.out$(SEXT)
2415 $(SIGNATURE) < $(PY2CBF)/pycbf_test2.out > $(DATADIRO)/pycbf_test2_orig.out$(SEXT)
2416 $(SIGNATURE) < $(PY2CBF)/pycbf_test3.out > $(DATADIRO)/pycbf_test3_orig.out$(SEXT)
2417 $(SIGNATURE) < $(PY2CBF)/pycbf_test4.out > $(DATADIRO)/pycbf_test4_orig.out$(SEXT)
2418 $(SIGNATURE) < $(PY2CBF)/fel_test1.out > $(DATADIRO)/fel_test1_orig.out$(SEXT)
2419 $(SIGNATURE) < $(PY2CBF)/fel_test2.out > $(DATADIRO)/fel_test2_orig.out$(SEXT)
2420 $(SIGNATURE) < $(PY2CBF)/fel_test3.out > $(DATADIRO)/fel_test3_orig.out$(SEXT)
2421 cp adscconverted_flat.cbf $(DATADIRO)/adscconverted_flat_orig.cbf$
2422 cp adscconverted.cbf $(DATADIRO)/adscconverted_orig.cbf
2423 cp converted_flat.cbf $(DATADIRO)/converted_flat_orig.cbf
2424 cp converted.cbf $(DATADIRO)/converted_orig.cbf
2425 cp insulin_pilatus6mconverted.cbf.h5 $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5
2426 cp insulin_pilatus6mconverted.cbf.h5.cbf $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf
2427 cp insulin_pilatus6mconverted_v2.cbf $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf
2428 cp mb_LP_1_001.cbf$ $(DATADIRO)/mb_LP_1_001_orig.cbf
2429 cp testcell.prt $(DATADIRO)/testcell_orig.prt
2430 cp test_xds_bin_testflatout.out $(DATADIRO)/test_xds_bin_testflatout_orig.out
2431 cp test_xds_bin_testflatpackedout.out $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out
2432 cp test_fcb_read_testflatout.out $(DATADIRO)/test_fcb_read_testflatout_orig.out
2433 cp test_fcb_read_testflatpackedout.out $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out
2434 cp XRD1621.cbf $(DATADIRO)/XRD1621_orig.cbf
2435 cp XRD1621_I4encbC100.cbf $(DATADIRO)/XRD1621_I4encbC100_orig.cbf
2436 cp $(MINICBF_TEST)/minicbf.h5 $(DATADIRO)/minicbf_orig.h5
2437 cp $(PY2CBF)/pycbf_test1.out $(DATADIRO)/pycbf_test1_orig.out
2438 cp $(PY2CBF)/pycbf_test2.out $(DATADIRO)/pycbf_test2_orig.out
2439 cp $(PY2CBF)/pycbf_test3.out $(DATADIRO)/pycbf_test3_orig.out
2440 cp $(PY2CBF)/pycbf_test4.out $(DATADIRO)/pycbf_test4_orig.out
2441 cp $(PY2CBF)/fel_test1.out $(DATADIRO)/fel_test1_orig.out
2442 cp $(PY2CBF)/fel_test2.out $(DATADIRO)/fel_test2_orig.out
2443 cp $(PY2CBF)/fel_test3.out $(DATADIRO)/fel_test3_orig.out
2444
2445 restore_signatures: restore_output
2446
2447 #
2448 # Basic Tests
2449 #
2450
2451 basic: $(BIN)/makecbf $(BIN)/img2cif $(BIN)/cif2cbf $(TESTINPUT_BASIC)
2452 $(LDPREFIX) $(BIN)/makecbf example.mar2300 makecbf.cbf
2453 $(LDPREFIX) $(BIN)/img2cif -c flatpacked -m headers -d digest \
2454 -e base64 example.mar2300 img2cif_packed.cif
2455 $(LDPREFIX) $(BIN)/img2cif -c canonical -m headers -d digest \
2456 -e base64 example.mar2300 img2cif_canonical.cif
2457 $(LDPREFIX) $(BIN)/img2cif -c flatpacked -m headers -d digest \
2458 -e none example.mar2300 img2cif_packed.cbf
2459 $(LDPREFIX) $(BIN)/img2cif -c canonical -m headers -d digest \
2460 -e none example.mar2300 img2cif_canonical.cbf
2461 $(LDPREFIX) $(BIN)/cif2cbf -e none -c flatpacked \
2462 img2cif_canonical.cif cif2cbf_packed.cbf
2463 $(LDPREFIX) $(BIN)/cif2cbf -e none -c canonical \
2464 img2cif_packed.cif cif2cbf_canonical.cbf
2465 -grep -av "X-Binary-Size-Third-Dimension: 1" cif2cbf_packed.cbf | diff -a - makecbf.cbf
2466 #-cmp cif2cbf_packed.cbf makecbf.cbf
2467 -grep -av "X-Binary-Size-Third-Dimension: 1" cif2cbf_packed.cbf | diff -a - img2cif_packed.cbf
2468 #-cmp cif2cbf_packed.cbf img2cif_packed.cbf
2469 -grep -av "X-Binary-Size-Third-Dimension: 1" cif2cbf_canonical.cbf | diff -a - img2cif_canonical.cbf
2470 #-cmp cif2cbf_canonical.cbf img2cif_canonical.cbf
2471
2472
2473 #
2474 # Extra Tests
2475 #
2476 $(MINICBF_TEST)/minicbf.h5:
2477 cd $(MINICBF_TEST); $(LDPREFIX) $(TIME) $(BIN)/minicbf2nexus -c zlib \
2478 -C config $(HDF5REGISTER) -o minicbf.h5 ../X4_lots_M1S4_1_*.cbf
2479 mb_LP_1_001.cbf:
2480 $(LDPREFIX) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img
2481
2482
2483
2484 ifneq ($(F90C),)
2485 extra: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf \
2486 $(BIN)/minicbf2nexus $(BIN)/cbf2nexus $(BIN)/nexus2cbf $(BIN)/testcell \
2487 $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \
2488 $(BIN)/test_xds_binary $(BIN)/test_fcb_read_image $(BIN)/convert_minicbf \
2489 $(BIN)/sauter_test $(BIN)/adscimg2cbf $(BIN)/cbf2adscimg \
2490 $(BIN)/changtestcompression $(BIN)/tiff2cbf \
2491 $(BIN)/testhdf5 $(BIN)/testalloc \
2492 $(BIN_TESTULP) \
2493 basic $(TESTINPUT_EXTRA) $(TESTOUTPUT) $(EXAMPLES)/batch_convert_minicbf.sh \
2494 $(TEMPLATES)/template_X4_lots_M1S4.cbf
2495 else
2496 extra: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf \
2497 $(BIN)/minicbf2nexus $(BIN)/cbf2nexus $(BIN)/nexus2cbf $(BIN)/testcell \
2498 $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \
2499 $(BIN)/convert_minicbf \
2500 $(BIN)/sauter_test $(BIN)/adscimg2cbf $(BIN)/cbf2adscimg \
2501 $(BIN)/testhdf5 $(BIN)/testalloc \
2502 $(BIN_TESTULP) \
2503 basic $(TESTINPUT_EXTRA) $(TESTOUTPUT) $(EXAMPLES)/batch_convert_minicbf.sh
2504 endif
2505 $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e hex -c none \
2506 makecbf.cbf cif2cbf_ehcn.cif
2507 $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -e none -c flatpacked \
2508 cif2cbf_ehcn.cif cif2cbf_encp.cbf; rm cif2cbf_ehcn.cif
2509 -grep -av "X-Binary-Size-Third-Dimension: 1" cif2cbf_encp.cbf | diff -a - makecbf.cbf
2510 $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -i 9ins.cif -o 9ins.cbf
2511 -cat 9ins.cif |sed "1,1s/10/11/" | sed "2,2s/0.9.5/0.9.7/" | diff -a - 9ins.cbf
2512 #-cmp 9ins.cif 9ins.cbf
2513 $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_mar345_2300x2300.cbf -F example.mar2300 converted_flat.cbf
2514 -cat converted_flat_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - converted_flat.cbf
2515 #-cmp converted_flat.cbf converted_flat_orig.cbf
2516 $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_mar345_2300x2300.cbf example.mar2300 converted.cbf
2517 -cat converted_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - converted.cbf
2518 #-cmp converted.cbf converted_orig.cbf
2519 -$(LDPREFIX) $(TIME) $(BIN)/testcell < testcell.dat > testcell.prt
2520 -cmp testcell.prt testcell_orig.prt
2521 $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_adscquantum315_3072x3072.cbf -F -d adscquantum315 mb_LP_1_001.img adscconverted_flat.cbf
2522 -cat adscconverted_flat_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - adscconverted_flat.cbf
2523 #-cmp adscconverted_flat.cbf adscconverted_flat_orig.cbf
2524 $(LDPREFIX) $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_adscquantum315_3072x3072.cbf -d adscquantum315 mb_LP_1_001.img adscconverted.cbf
2525 -cat adscconverted_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - adscconverted.cbf
2526 #-cmp adscconverted.cbf adscconverted_orig.cbf
2527 $(LDPREFIX) $(TIME) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img
2528 -cat mb_LP_1_001_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - mb_LP_1_001.cbf
2529 #-cmp mb_LP_1_001.cbf mb_LP_1_001_orig.cbf
2530 ifneq ($(CLEANTESTS),)
2531 mv mb_LP_1_001.cbf nmb_LP_1_001.cbf
2532 else
2533 cp mb_LP_1_001.cbf nmb_LP_1_001.cbf
2534 endif
2535 $(LDPREFIX) $(TIME) $(BIN)/cbf2adscimg nmb_LP_1_001.cbf
2536 -cmp nmb_LP_1_001.img mb_LP_1_001.img
2537 rm nmb_LP_1_001.cbf
2538 ifneq ($(CLEANTESTS),)
2539 rm nmb_LP_1_001.img
2540 endif
2541 $(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -p $(TEMPLATES)/template_pilatus6m_2463x2527.cbf -d pilatus6m -v 1 insulin_pilatus6m.cbf insulin_pilatus6mconverted.cbf
2542 -cat insulin_pilatus6mconverted_orig.cbf | sed "1,1s/1.7.6/1.7.11/" | sed "2,2s/0.9.3/0.9.7/" | diff -a - insulin_pilatus6mconverted.cbf
2543 #-cmp insulin_pilatus6mconverted.cbf insulin_pilatus6mconverted_orig.cbf
2544 -$(LDPREFIX) $(TIME) $(BIN)/convert_minicbf -p $(TEMPLATES)/template_pilatus6m_2463x2527.cbf -d pilatus6m insulin_pilatus6m.cbf insulin_pilatus6mconverted_v2.cbf
2545 -cat insulin_pilatus6mconverted_v2_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - insulin_pilatus6mconverted_v2.cbf
2546 #-cmp insulin_pilatus6mconverted_v2.cbf insulin_pilatus6mconverted_v2_orig.cbf
2547 (CBF_CONVERT_MINICBF_PATH=$(BIN); export CBF_CONVERT_MINICBF_PATH; \
2548 $(LDPREFIX) $(EXAMPLES)/batch_convert_minicbf.sh "." "minicbf_test" \
2549 "X4_lots_M1S4_1_*.cbf" $(TEMPLATES)/template_X4_lots_M1S4.cbf)
2550 #
2551 # Starting with insulin_pilatus6mconverted.cbf, create hdf5 files using opaque, encI, encp, encb, encc, encz
2552 #
2553 -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \
2554 $(TIME) $(BIN)/cif2cbf -5 w -O $(HDF5REGISTER) -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted.cbf.h5)
2555 -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \
2556 $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encI.cbf.h5)
2557 -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \
2558 $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encp.cbf.h5)
2559 -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \
2560 $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cb -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encb.cbf.h5)
2561 -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \
2562 $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cc -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encc.cbf.h5)
2563 -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \
2564 $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cz -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encz.cbf.h5)
2565 #
2566 # check the default as hdf5 dumps
2567 #
2568 -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \
2569 $(H5DUMP) insulin_pilatus6mconverted_orig.cbf.h5 | $(ALLBUTONE) > insulin_pilatus6mconverted_orig.cbf.h5.dump)
2570 -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \
2571 $(H5DUMP) insulin_pilatus6mconverted.cbf.h5 | $(ALLBUTONE) > insulin_pilatus6mconverted.cbf.h5.dump)
2572 -$(DIFF) insulin_pilatus6mconverted_orig.cbf.h5.dump insulin_pilatus6mconverted.cbf.h5.dump
2573 -rm -f insulin_pilatus6mconverted_orig.cbf.h5.dump
2574 -rm -f insulin_pilatus6mconverted.cbf.h5.dump
2575 #
2576 # Convert each of the non-opaque h5 files to encI cbfs and compare them
2577 #
2578 -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \
2579 $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encI.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;)
2580 cp insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf
2581 -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf;
2582 -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \
2583 $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encp.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;)
2584 -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf;
2585 -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \
2586 $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encb.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;)
2587 -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf;
2588 -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \
2589 $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encc.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;)
2590 -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf;
2591 -$(LDPREFIX) (HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; rm -f insulin_pilatus6mconverted_encI.cbf.h5.cbf; \
2592 $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted_encz.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf;)
2593 -$(DIFF) -a insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted.cbf.h5.cbf;
2594
2595 $(LDPREFIX) $(TINE) $(BIN)/test_cbf_airy_disk
2596 $(LDPREFIX) $(TIME) $(BIN)/cbf_testxfelread
2597 $(LDPREFIX) $(TIME) $(BIN)/testalloc
2598 $(LDPREFIX) $(TIME) $(BIN)/testhdf5; rm -f testfile.h5
2599 ifneq ($(CBF_USE_ULP),)
2600 $(LDPREFIX) $(TIME) $(BIN)/testulp
2601 endif
2602 $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/minicbf2nexus -c zlib \
2603 -C config $(HDF5REGISTER) -o minicbf.h5 ../X4_lots_M1S4_1_*.cbf
2604 $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) ../minicbf_orig.h5 | $(ALLBUTONE) > minicbf_original.dump
2605 $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) minicbf.h5 | $(ALLBUTONE) > minicbf.dump
2606 -cd $(MINICBF_TEST); $(DIFF) minicbf_original.dump minicbf.dump
2607 $(LDPREFIX) cd $(MINICBF_TEST); rm -f minicbf_original.dump
2608 $(LDPREFIX) cd $(MINICBF_TEST); rm -f minicbf.dump
2609 #cd $(MINICBF_TEST); rm -f minicbf.h5
2610 $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/cbf2nexus -c zlib \
2611 --list -o i19-1.h5 ../1191_00005.cbf
2612 $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/nexus2cbf \
2613 -o i19-1.cbf i19-1.h5
2614 $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/cbf2nexus -c zlib \
2615 --list -o i19-2.h5 i19-1.cbf
2616 $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(BIN)/nexus2cbf \
2617 -o i19-2.cbf i19-2.h5
2618 $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) i19-1.h5 | $(ALLBUTONE) > i19-1.dump
2619 $(LDPREFIX) cd $(MINICBF_TEST); $(TIME) $(H5DUMP) i19-2.h5 | $(ALLBUTONE) > i19-2.dump
2620 -cd $(MINICBF_TEST); $(DIFF) i19-1.dump i19-2.dump
2621 -cd $(MINICBF_TEST); $(DIFF) i19-1.cbf i19-2.cbf
2622 $(LDPREFIX) $(TIME) $(BIN)/testreals
2623 -cat testrealin.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - testrealout.cbf
2624 #-cmp testrealin.cbf testrealout.cbf
2625 $(LDPREFIX) $(TIME) $(BIN)/testflat
2626 -cat testflatin.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - testflatout.cbf
2627 #-cmp testflatin.cbf testflatout.cbf
2628 $(LDPREFIX) $(TIME) $(BIN)/testflatpacked
2629 -cat testflatpackedin.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - testflatpackedout.cbf
2630 #-cmp testflatpackedin.cbf testflatpackedout.cbf
2631 ifneq ($(F90C),)
2632 $(LDPREFIX) $(TIME) (echo testflatout.cbf | $(BIN)/test_xds_binary > test_xds_bin_testflatout.out)
2633 -cat test_xds_bin_testflatout_orig.out | sed "2,2s/0.9.6/0.9.7/" | $(DIFF) -a - test_xds_bin_testflatout.out
2634 #-$(DIFF) test_xds_bin_testflatout.out test_xds_bin_testflatout_orig.out
2635 $(LDPREFIX) $(TIME) (echo testflatpackedout.cbf | $(BIN)/test_xds_binary > test_xds_bin_testflatpackedout.out)
2636 -$(DIFF) test_xds_bin_testflatpackedout.out test_xds_bin_testflatpackedout_orig.out
2637 $(LDPREFIX) $(TIME) (echo testflatout.cbf | $(BIN)/test_fcb_read_image > test_fcb_read_testflatout.out)
2638 -$(DIFF) test_fcb_read_testflatout.out test_fcb_read_testflatout_orig.out
2639 $(LDPREFIX) $(TIME) (echo testflatpackedout.cbf | $(BIN)/test_fcb_read_image > test_fcb_read_testflatpackedout.out)
2640 -$(DIFF) test_fcb_read_testflatpackedout.out test_fcb_read_testflatpackedout_orig.out
2641 endif
2642 $(LDPREFIX) $(TIME) $(BIN)/sauter_test
2643 $(LDPREFIX) $(TIME) $(BIN)/changtestcompression
2644 $(LDPREFIX) $(TIME) $(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf
2645 -cat XRD1621_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - XRD1621.cbf
2646 #-$(DIFF) XRD1621.cbf XRD1621_orig.cbf
2647 $(LDPREFIX) $(TIME) $(BIN)/cif2cbf -I 4 -C 100. -L 0. -e n -c b -i XRD1621.cbf -o XRD1621_I4encbC100.cbf
2648 -cat XRD1621_I4encbC100_orig.cbf | sed "2,2s/0.9.6/0.9.7/" | diff -a - XRD1621_I4encbC100.cbf
2649 #-$(DIFF) XRD1621_I4encbC100.cbf XRD1621_I4encbC100_orig.cbf
2650
2651
2652 py2cbftests: $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(BIN)/cbf_standardize_numbers $(TESTOUTPUT)
2653 ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_test1.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test1.out)
2654 -(cd $(PY2CBF); $(DIFF) pycbf_test1.out $(ROOT)/pycbf_test1_orig.out)
2655 ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_test2.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test2.out)
2656 -(cd $(PY2CBF); $(DIFF) pycbf_test2.out $(ROOT)/pycbf_test2_orig.out)
2657 ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_test3.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test3.out)
2658 -(cd $(PY2CBF); $(DIFF) pycbf_test3.out $(ROOT)/pycbf_test3_orig.out)
2659 ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_test4.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test4.out)
2660 -(cd $(PY2CBF); $(DIFF) pycbf_test4.out $(ROOT)/pycbf_test4_orig.out)
2661 ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_testfelaxes.py fel_test1.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test1.out)
2662 -(cd $(PY2CBF); $(DIFF) fel_test1.out $(ROOT)/fel_test1_orig.out)
2663 ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_testfelaxes.py fel_test2.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test2.out)
2664 -(cd $(PY2CBF); $(DIFF) fel_test2.out $(ROOT)/fel_test2_orig.out)
2665 ($(RTLPEXPORTS) cd $(PY2CBF); $(PYTHON2) $(PY2CBF)/pycbf_testfelaxes.py ../hit-20140306005258847.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test3.out)
2666 -(cd $(PY2CBF); $(DIFF) fel_test3.out $(ROOT)/fel_test3_orig.out)
2667
2668 py2cbfinstall: $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(PY2CBF)/py2cbfinstall
2669
2670 py2cbfuserinstall: $(PY2CBF)/_py2cbf.$(PY2CBFEXT) $(PY2CBF)/py2cbfuserinstall
2671
2672 py3cbftests: $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(BIN)/cbf_standardize_numbers $(TESTOUTPUT)
2673 ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_test1.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test1.out)
2674 -(cd $(PY3CBF); grep -v "__builtins__" $(ROOT)/pycbf_test1_orig.out | \
2675 grep -v "__add__" | grep -v "Foundthebinary" > pycbf_test1_orig.out; \
2676 grep -v "__builtins__" pycbf_test1.out | \
2677 grep -v "__add__" | grep -v "Foundthebinary" |$(DIFF) - pycbf_test1_orig.out)
2678 ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_test2.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test2.out)
2679 -(cd $(PY3CBF); $(DIFF) pycbf_test2.out $(ROOT)/pycbf_test2_orig.out)
2680 ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_test3.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test3.out)
2681 -(cd $(PY3CBF); $(DIFF) pycbf_test3.out $(ROOT)/pycbf_test3_orig.out)
2682 ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_test4.py | $(BIN)/cbf_standardize_numbers - 4 > pycbf_test4.out)
2683 -(cd $(PY3CBF); grep -v "__builtins__" $(ROOT)/pycbf_test4_orig.out | \
2684 grep -v "__add__" | grep -v "Foundthebinary" > pycbf_test4_orig.out; \
2685 grep -v "__builtins__" pycbf_test4.out | grep -v "__add__" | \
2686 grep -v "Foundthebinary" | $(DIFF) - pycbf_test4_orig.out)
2687 ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_testfelaxes.py fel_test1.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test1.out)
2688 -(cd $(PY3CBF); $(DIFF) fel_test1.out $(ROOT)/fel_test1_orig.out)
2689 ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_testfelaxes.py fel_test2.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test2.out)
2690 -(cd $(PY3CBF); $(DIFF) fel_test2.out $(ROOT)/fel_test2_orig.out)
2691 ($(RTLPEXPORTS) cd $(PY3CBF); $(PYTHON3) $(PY3CBF)/pycbf_testfelaxes.py ../hit-20140306005258847.cbf | $(BIN)/cbf_standardize_numbers - 4 > fel_test3.out)
2692 -(cd $(PY3CBF); $(DIFF) fel_test3.out $(ROOT)/fel_test3_orig.out)
2693
2694 py3cbfinstall: $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(PY3CBF)/py3cbfinstall
2695
2696 py3cbfuserinstall: $(PY3CBF)/_pycbf.$(PY3CBFEXT) $(PY3CBF)/py3cbfuserinstall
2697
2698 javatests: $(BIN)/ctestcbf $(BIN)/testcbf.class $(SOLIB)/libcbf_wrap.so
2699 $(LDPREFIX) $(BIN)/ctestcbf > testcbfc.txt
2700 $(LDPREFIX) java -cp $(JCBF)/cbflib-$(VERSION).jar:$(BIN) testcbf > testcbfj.txt
2701 $(DIFF) testcbfc.txt testcbfj.txt
2702
2703 dectristests: $(BIN)/cbf_template_t $(TEMPLATES)/cbf_test_orig.out
2704 $(LDPREFIX) (cd templates; ../bin/cbf_template_t; diff -a -u cbf_test_orig.out cbf_template_t.out)
2705
2706 #
2707 # Remove all non-source files
2708 #
2709 empty:
2710 @-rm -rf $(LIB)/*
2711 @-rm -rf $(INCLUDE)/bitshuf*
2712 @-rm -rf $(INCLUDE)/bshuf*
2713 @-rm -rf $(INCLUDE)/H5*
2714 @-rm -rf $(BIN)/*
2715 @-rm -f $(PY2CBF)/_py2cbf.$(PY2CBFEXT)
2716 @-rm -rf $(PY2CBF)/build/*
2717 @-rm -f $(PY2CBF)/newtest1.cbf
2718 @-rm -f $(PY2CBF)/fel_test1.out
2719 @-rm -f $(PY2CBF)/fel_test2.out
2720 @-rm -f $(PY2CBF)/setup.py
2721 @-rm -f $(PY2CBF)/setup_MINGW.py
2722 @-rm -f makecbf.cbf
2723 @-rm -f img2cif_packed.cif
2724 @-rm -f img2cif_canonical.cif
2725 @-rm -f img2cif_packed.cbf
2726 @-rm -f img2cif_canonical.cbf
2727 @-rm -f img2cif_raw.cbf
2728 @-rm -f cif2cbf_packed.cbf
2729 @-rm -f cif2cbf_canonical.cbf
2730 @-rm -f converted.cbf
2731 @-rm -f adscconverted.cbf
2732 @-rm -f converted_flat.cbf
2733 @-rm -f adscconverted_flat.cbf
2734 @-rm -f adscconverted_flat_rev.cbf
2735 @-rm -f mb_LP_1_001.cbf
2736 @-rm -f cif2cbf_ehcn.cif
2737 @-rm -f cif2cbf_encp.cbf
2738 @-rm -f 9ins.cbf
2739 @-rm -f 9ins.cif
2740 @-rm -f testcell.prt
2741 @-rm -f example.mar2300
2742 @-rm -f converted_orig.cbf
2743 @-rm -f adscconverted_orig.cbf
2744 @-rm -f converted_flat_orig.cbf
2745 @-rm -f adscconverted_flat_orig.cbf
2746 @-rm -f adscconverted_flat_rev_orig.cbf
2747 @-rm -f mb_LP_1_001_orig.cbf
2748 @-rm -f insulin_pilatus6mconverted*.cbf
2749 @-rm -f insulin_pilatus6mconverted*.h5
2750 @-rm -f insulin_pilatus6m.cbf
2751 @-rm -f testrealin.cbf
2752 @-rm -f testrealout.cbf
2753 @-rm -f testflatin.cbf
2754 @-rm -f testflatout.cbf
2755 @-rm -f testflatpackedin.cbf
2756 @-rm -f testflatpackedout.cbf
2757 @-rm -f CTC.cbf
2758 @-rm -f test_fcb_read_testflatout.out
2759 @-rm -f test_fcb_read_testflatpackedout.out
2760 @-rm -f test_xds_bin_testflatpackedout.out
2761 @-rm -f test_xds_bin_testflatout.out
2762 @-rm -f test_fcb_read_testflatout_orig.out
2763 @-rm -f test_fcb_read_testflatpackedout_orig.out
2764 @-rm -f test_xds_bin_testflatpackedout_orig.out
2765 @-rm -f test_xds_bin_testflatout_orig.out
2766 @-rm -f mb_LP_1_001.img
2767 @-rm -f 9ins.cif
2768 @-rm -f testcell_orig.prt
2769 @-rm -f $(DECTRIS_EXAMPLES)/cbf_template_t.out
2770 @-rm -f XRD1621.cbf
2771 @-rm -f XRD1621_orig.cbf
2772 @-rm -f XRD1621_I4encbC100_orig.cbf
2773 @-rm -f XRD1621_I4encbC100.cbf
2774 @-rm -f minicbf_orig.h5
2775 @-rm -f $(SRC)/fcb_exit_binary.f90
2776 @-rm -f $(SRC)/fcb_next_binary.f90
2777 @-rm -f $(SRC)/fcb_open_cifin.f90
2778 @-rm -f $(SRC)/fcb_packed.f90
2779 @-rm -f $(SRC)/fcb_read_bits.f90
2780 @-rm -f $(SRC)/fcb_read_image.f90
2781 @-rm -f $(SRC)/fcb_read_xds_i2.f90
2782 @-rm -f $(EXAMPLES)/test_fcb_read_image.f90
2783 @-rm -f $(EXAMPLES)/test_xds_binary.f90
2784 @-rm -f symlinksdone
2785 @-rm -f $(TESTOUTPUT) *$(SEXT)
2786 @-rm -rf $(SOLIB)
2787 @-rm -rf org
2788 @-rm -rf $(JCBF)
2789 @-rm -rf $(REGEX)
2790 @-rm -rf $(REGEX)_install
2791 @-rm -rf $(TIFF)
2792 @-rm -rf $(TIFF)_install
2793 @-rm -rf $(HDF5)
2794 @-rm -rf $(HDF5)_install
2795 @-rm -rf $(INCLUDE)/tiff*
2796 @-rm -rf $(INCLUDE)/H5*
2797 @-rm -rf $(INCLUDE)/hdf5*
2798 @-rm -rf share
2799 @-rm -rf $(MINICBF_TEST)/i19*
2800 @-rm -rf solib
2801 @-rm -f thaumatin_die_M1S5_1_0005_2.cbf
2802 @-rm -f 1191_00005.cbf
2803 @-rm -f XRD1621.tif
2804 @-rm -f md5tmp
2805 @-rm -rf $(PY2CBF)/build
2806 @-rm -f *_old
2807 @-rm -f X4_lots_M1S4_1_*.cbf
2808 @-rm -f testfile.h5
2809 @-rm -f hit-20140306005258847.cbf
2810 @-rm -f build_*
2811 @-rm -rf HDF5Plugin_5Jun21/
2812 @-rm -rf PyCifRW-4.1/
2813 @-rm -rf PyCifRW-4.3/
2814 @-rm -rf bitshuffle-0.2.2.1_15Jun16/
2815 @-rm -f idx-s00-20131106040304531_flat.cbf
2816 @-rm -f include/iochain.h
2817 @-rm -f include/lz4.h
2818 @-rm -f include/pcre.h
2819 @-rm -f include/pcre_scanner.h
2820 @-rm -f include/pcre_stringpiece.h
2821 @-rm -f include/pcrecpp.h
2822 @-rm -f include/pcrecpparg.h
2823 @-rm -f include/pcreposix.h
2824 @-rm -f include/regex.h
2825 @-rm -f minicbf_test/X4_lots_M1S4_1_0001.cbf
2826 @-rm -f minicbf_test/X4_lots_M1S4_1_0002.cbf
2827 @-rm -f minicbf_test/X4_lots_M1S4_1_0003.cbf
2828 @-rm -f minicbf_test/X4_lots_M1S4_1_0004.cbf
2829 @-rm -f minicbf_test/X4_lots_M1S4_1_0005.cbf
2830 @-rm -f minicbf_test/minicbf.h5
2831 @-rm -rf ply-3.2/dist/
2832 @-rm -f $(PY2CBF)/fel_test3.out
2833 @-rm -f $(PY2CBF)/pycbf.pyc
2834 @-rm -f $(PY2CBF)/pycbf_test1.out
2835 @-rm -f $(PY2CBF)/pycbf_test2.out
2836 @-rm -f $(PY2CBF)/pycbf_test3.out
2837 @-rm -f $(PY2CBF)/pycbf_test4.out
2838 ./.undosymlinks
2839
2840 #
2841 # Remove temporary files
2842 #
2843 clean:
2844 @-rm -f core
2845 @-rm -f *.o
2846 @-rm -f *.u
2847 #
2848 # Restore to distribution state
2849 #
2850 distclean: clean empty
2851
2852 #
2853 # Create a Tape Archive for distribution
2854 #
2855
2856 tar: $(DOCUMENTS) $(SOURCE) $(SRC)/cbf.stx $(HEADERS) $(M4FILES)\
2857 $(EXAMPLES) \
2858 README.html README Makefile \
2859 $(JPEGS)
2860 -/bin/rm -f CBFlib.tar*
2861 tar cvBf CBFlib.tar \
2862 $(DOCUMENTS) $(SOURCE) $(SRC)/cbf.stx $(HEADERS) $(M4FILES)\
2863 $(EXAMPLES) \
2864 README.html README Makefile \
2865 $(JPEGS)
2866 gzip --best CBFlib.tar
2867