Debian Codegraph @

Makefile_MINGW

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