Debian Codegraph @

Makefile_MSYS

raw
1
2 ######################################################################
3 # Makefile - command file for make to create CBFlib #
4 # #
5 # Version 0.9.5 2 Feb 2015 #
6 # #
7 # Paul Ellis and #
8 # Herbert J. Bernstein ([email protected]) #
9 # #
10 # (C) Copyright 2006 - 2015 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
252 # Version string
253 VERSION = 0.9.5
254
255
256 #
257 # Comment out the next line if scratch test files should be retained
258 #
259 CLEANTESTS = yes
260
261 CBFLIB_DONT_USE_PYCIFRW ?= yes
262 ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes)
263 #
264 # Definitions to get versions of PyCifRW and PLY
265 #
266 PYCIFRW = PyCifRW-4.1
267 PLY = ply-3.2
268 PYCIFRWFLAG = -DCBF_USE_PYCIFRW
269 endif
270
271 #
272 # Definition to get a version of tifflib to support tiff2cbf
273 #
274 TIFF = tiff-3.9.4-rev-6Feb11
275 TIFFPREFIX = $(PWD)
276
277 #
278 # Definition to get a version of HDF5
279 #
280 #HDF5 = hdf5-1.8.10
281 #HDF5 = hdf5-1.8.11-pre2
282 #HDF5 = hdf5-1.8.11
283 HDF5 = hdf5-1.8.14
284 HDF5PREFIX = C:/msys64/mingw64
285 #HDF5LIBS = C:/msys64/mingw64/lib/libhdf5.dll.a -lz -ldl
286 HDF5LIBS = -LC:/msys64/mingw64/lib -lhdf5 -lz -ldl
287 HDF5SOLIBS = -L./lib -LC:/msys64/mingw64/lib -lhdf5 -lz
288 #HDF5REGISTER ?= --register plugin
289 HDF5REGISTER ?= --register manual
290
291 CBFLIB_DONT_USE_LZ4 ?= no
292 ifneq ($(CBFLIB_DONT_USE_LZ4),yes)
293 #
294 # Definitions to get a version of HDF5Plugin for LZ4
295 #
296 LZ4 = HDF5Plugin_6Feb15
297 LZ4src = $(LZ4)/src
298 LZ4include = $(LZ4)/include
299 LZ4SOLIBS = -L./solib -lh5zlz4
300 else
301 LZ4SOLIBS =
302 endif
303
304 #
305 # Definitions to get a stable version of regex
306 #
307 REGEX = regex-20090805
308 #REGEXDIR = /usr/lib
309 REGEXDIR = c:/msys64/mingw64/lib
310 REGEXDEP =
311 CBF_REGEXLIB_REGEX ?= regex.h
312
313 # Program to use to retrieve a URL
314
315 DOWNLOAD = wget
316
317 # Flag to control symlinks versus copying
318
319 SLFLAGS = --use_ln
320
321 #
322 # Program to use to pack shars
323 #
324 SHAR = /usr/bin/shar
325 #SHAR = /usr/local/bin/gshar
326
327 #
328 # Program to use to create archives
329 #
330 AR = /usr/bin/ar
331
332 #
333 # Program to use to add an index to an archive
334 #
335 RANLIB = /usr/bin/ranlib
336
337
338 #
339 # Program to use to generate a signature
340 #
341 #SIGNATURE ?= /usr/bin/openssl dgst -md5
342 #SIGNATURE ?= (/usr/bin/openssl dgst -md5 | sed "s/^.*= //")
343 SIGNATURE ?= ( cat > md5tmp; cmake -E md5sum md5tmp| sed "s/ .*//")
344
345 #
346 # Pipe command to extract all but the first line of a text file
347 #
348 ALLBUTONE = tail -n +2
349
350
351 #
352 # Extension for signatures of files
353 #
354 SEXT = .md5
355
356
357 # call to time a command
358
359 #TIME =
360 #TIME = time
361
362 #
363 # Program to display differences between files
364 #
365 DIFF = diff -u -b
366
367
368 #
369 # Program to generate wrapper classes for Python
370 #
371 PYSWIG = swig -python
372
373 #
374 # Program to generate wrapper classes for Java
375 #
376 JSWIG = swig -java
377
378 #
379 # Program to generate LaTex and HTML program documentation
380 #
381
382 NUWEB = nuweb
383
384 #
385 # Compiler for Java
386 #
387 JAVAC = javac
388
389 #
390 # Java archiver for compiled classes
391 #
392 JAR = jar
393
394 #
395 # Java SDK root directory
396 #
397 ifeq ($(JDKDIR),)
398 JDKDIR = /usr/lib/java
399 endif
400
401 ifneq ($(CBF_DONT_USE_LONG_LONG),)
402 NOLLFLAG = -DCBF_DONT_USE_LONG_LONG
403 else
404 NOLLFLAG =
405 endif
406
407 ifneq ($(CBF_NO_REGEX),)
408 CBF_REGEXFLAG = -DCBF_NO_REGEX
409 else
410 CBF_REGEXFLAG = -DCBF_REGEXLIB_REGEX
411 endif
412
413 ifneq ($(CBF_USE_ULP),)
414 ULPFLAG = -DCBF_USE_ULP
415 else
416 ULPFLAG =
417 endif
418
419 ifneq ($(CBFLIB_DONT_USE_LZ4),yes)
420 LZ4FLAG = -DCBF_H5Z_USE_LZ4
421 else
422 LZ4FLAG =
423 endif
424
425 MISCFLAG = $(NOLLFLAG) $(ULPFLAG)
426
427 #
428 # PYCBF definitions
429 #
430 PYCBFEXT = so
431 PYCBFBOPT =
432 SETUP_PY = setup.py
433
434 #
435 # Set the compiler and flags
436 #
437
438 #########################################################
439 #
440 # Appropriate compiler definitions for Mingw
441 # Also change from symlinks to copies and
442 # use default paths for utilities
443 #
444 #########################################################
445 CC = gcc
446 C++ = g++
447 CFLAGS = -g -O2 -Wall -I/usr/include -fno-strict-aliasing
448 F90C = gfortran
449 F90FLAGS = -g -fno-range-check
450 F90LDFLAGS =
451 M4FLAGS = -Dfcb_bytes_in_rec=4096
452 SOCFLAGS = -D_JNI_IMPLEMENTATION_
453 SOLDFLAGS = -shared -Wl,--kill-at
454 JAVAINCLUDES = -I$(JDKDIR)/include -I$(JDKDIR)/include/win32
455 ifeq ($(CBF_NO_REGEX),)
456 EXTRALIBS = -L$(REGEXDIR) -lregex -lm
457 REGEXDEP = $(REGEXDIR)/libregex.a
458 else
459 EXTRALIBS = -lm
460 endif
461 TIME =
462 PYCBFEXT = pyd
463 PYCBFBOPT = --compiler=mingw32
464 SETUP_PY = setup_MINGW.py
465 JDKDIR = /java
466 JSWIG = /swig/swig -java
467 PYSWIG = /swig/swig -python
468 SLFLAGS = --use_cp
469 SHAR = shar
470 AR = ar
471 RANLIB = ranlib
472
473 ifneq ($(NOFORTRAN),)
474 F90C =
475 endif
476
477 #
478 # Directories
479 #
480 ROOT = .
481 LIB = $(ROOT)/lib
482 SOLIB = $(ROOT)/solib
483 JCBF = $(ROOT)/jcbf
484 JAVADIR = $(ROOT)/java
485 BIN = $(ROOT)/bin
486 SRC = $(ROOT)/src
487 INCLUDE = $(ROOT)/include
488 M4 = $(ROOT)/m4
489 PYCBF = $(ROOT)/pycbf
490 EXAMPLES = $(ROOT)/examples
491 TEMPLATES= $(ROOT)/templates
492 DECTRIS_EXAMPLES = $(EXAMPLES)/dectris_cbf_template_test
493 DOC = $(ROOT)/doc
494 MINICBF_TEST = $(ROOT)/minicbf_test
495 GRAPHICS = $(ROOT)/html_graphics
496 DATADIRI = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Input
497 DATADIRO = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Output
498 DATADIRS = $(ROOT)/../CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only
499 INSTALLDIR = $(HOME)
500
501 #
502 # URLs from which to retrieve the data directories
503 #
504 DATAURLBASE = http://downloads.sf.net/cbflib
505 DATAURLI = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Input.tar.gz
506 DATAURLO = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Output.tar.gz
507 DATAURLS = $(DATAURLBASE)/CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz
508
509 #
510 # URLs from which to retrieve needed external package snapshots
511 #
512 ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes)
513 PYCIFRWURL = http://downloads.sf.net/cbflib/$(PYCIFRW).tar.gz
514 PLYURL = http://www.dabeaz.com/ply/$(PLY).tar.gz
515 endif
516 REGEXURL = http://downloads.sf.net/cbflib/$(REGEX).tar.gz
517 TIFFURL = http://downloads.sf.net/cbflib/$(TIFF).tar.gz
518 HDF5URL = http://downloads.sf.net/cbflib/$(HDF5).tar.gz
519 LZ4URL = http://downloads.sf.net/cbflib/$(LZ4).tar.gz
520
521
522 #
523 # Include directories
524 #
525 INCLUDES = -I$(INCLUDE) -I$(SRC) -Ic:/msys64/mingw64/include
526
527 #
528 # runtime library path export commands
529 #
530 RTLPEXPORTS = LD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export LD_LIBRARY_PATH; \
531 DYLD_LIBRARY_PATH=$(PWD)/solib:$(PWD)/lib;export DYLD_LIBRARY_PATH; \
532 LD_RUN_PATH=$(PWD)/solib:$(PWD)/lib;export LD_RUN_PATH;
533
534
535 ######################################################################
536 # You should not need to make modifications below this line #
537 ######################################################################
538
539 ifneq ($(CBF_USE_ULP),)
540 SRC_CBF_ULP_C = $(SRC)/cbf_ulp.c
541 INCLUDE_CBF_ULP_H = $(INCLUDE)/cbf_ulp.h
542 BIN_TESTULP = $(BIN)/testulp
543 else
544 SRC_CBF_ULP_C =
545 INCLUDE_CBF_ULP_H =
546 BIN_TESTULP =
547 endif
548
549
550 #
551 # Suffixes of files to be used or built
552 #
553 .SUFFIXES: .c .o .f90 .m4
554
555 .m4.f90:
556 m4 -P $(M4FLAGS) $< > $@
557
558 ifneq ($(F90C),)
559 .f90.o:
560 $(F90C) $(F90FLAGS) -c $< -o $@
561 endif
562
563
564 #
565 # Common dependencies
566 #
567 COMMONDEP = Makefile
568
569 #
570 # Source files
571 #
572
573 SOURCE = $(SRC)/cbf.c \
574 $(SRC)/cbf_airy_disk.c \
575 $(SRC)/cbf_alloc.c \
576 $(SRC)/cbf_ascii.c \
577 $(SRC)/cbf_binary.c \
578 $(SRC)/cbf_byte_offset.c \
579 $(SRC)/cbf_canonical.c \
580 $(SRC)/cbf_codes.c \
581 $(SRC)/cbf_compress.c \
582 $(SRC)/cbf_context.c \
583 $(SRC)/cbf_copy.c \
584 $(SRC)/cbf_file.c \
585 $(SRC)/cbf_getopt.c \
586 $(SRC)/cbf_hdf5.c \
587 $(SRC)/cbf_hdf5_filter.c \
588 $(SRC)/cbf_lex.c \
589 $(SRC)/cbf_nibble_offset.c \
590 $(SRC)/cbf_packed.c \
591 $(SRC)/cbf_predictor.c \
592 $(SRC)/cbf_read_binary.c \
593 $(SRC)/cbf_read_mime.c \
594 $(SRC)/cbf_simple.c \
595 $(SRC)/cbf_string.c \
596 $(SRC)/cbf_stx.c \
597 $(SRC)/cbf_tree.c \
598 $(SRC_CBF_ULP_C) \
599 $(SRC)/cbf_uncompressed.c \
600 $(SRC)/cbf_write.c \
601 $(SRC)/cbf_write_binary.c \
602 $(SRC)/cbf_ws.c \
603 $(SRC)/cbff.c \
604 $(SRC)/md5c.c \
605 $(SRC)/img.c
606
607 ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes)
608 PYSOURCE = $(SRC)/drel_lex.py \
609 $(SRC)/drel_yacc.py \
610 $(SRC)/drelc.py \
611 $(SRC)/drel_prep.py
612 endif
613
614 F90SOURCE = $(SRC)/fcb_atol_wcnt.f90 \
615 $(SRC)/fcb_ci_strncmparr.f90 \
616 $(SRC)/fcb_exit_binary.f90 \
617 $(SRC)/fcb_nblen_array.f90 \
618 $(SRC)/fcb_next_binary.f90 \
619 $(SRC)/fcb_open_cifin.f90 \
620 $(SRC)/fcb_packed.f90 \
621 $(SRC)/fcb_read_bits.f90 \
622 $(SRC)/fcb_read_byte.f90 \
623 $(SRC)/fcb_read_image.f90 \
624 $(SRC)/fcb_read_line.f90 \
625 $(SRC)/fcb_read_xds_i2.f90 \
626 $(SRC)/fcb_skip_whitespace.f90
627
628
629 #
630 # Header files
631 #
632 HEADERS = $(INCLUDE)/cbf.h \
633 $(INCLUDE)/cbf_airy_disk.h \
634 $(INCLUDE)/cbf_alloc.h \
635 $(INCLUDE)/cbf_ascii.h \
636 $(INCLUDE)/cbf_binary.h \
637 $(INCLUDE)/cbf_byte_offset.h \
638 $(INCLUDE)/cbf_canonical.h \
639 $(INCLUDE)/cbf_codes.h \
640 $(INCLUDE)/cbf_compress.h \
641 $(INCLUDE)/cbf_context.h \
642 $(INCLUDE)/cbf_copy.h \
643 $(INCLUDE)/cbf_file.h \
644 $(INCLUDE)/cbf_getopt.h \
645 $(INCLUDE)/cbf_hdf5.h \
646 $(INCLUDE)/cbf_hdf5_filter.h \
647 $(INCLUDE)/cbf_lex.h \
648 $(INCLUDE)/cbf_nibble_offset.h \
649 $(INCLUDE)/cbf_packed.h \
650 $(INCLUDE)/cbf_predictor.h \
651 $(INCLUDE)/cbf_read_binary.h \
652 $(INCLUDE)/cbf_read_mime.h \
653 $(INCLUDE)/cbf_simple.h \
654 $(INCLUDE)/cbf_string.h \
655 $(INCLUDE)/cbf_stx.h \
656 $(INCLUDE)/cbf_tree.h \
657 $(INCLUDE)/cbf_uncompressed.h \
658 $(INCLUDE_CBF_ULP_H) \
659 $(INCLUDE)/cbf_write.h \
660 $(INCLUDE)/cbf_write_binary.h \
661 $(INCLUDE)/cbf_ws.h \
662 $(INCLUDE)/global.h \
663 $(INCLUDE)/cbff.h \
664 $(INCLUDE)/md5.h \
665 $(INCLUDE)/img.h
666
667 #
668 # m4 macro files
669 #
670 M4FILES = $(M4)/fcblib_defines.m4 \
671 $(M4)/fcb_exit_binary.m4 \
672 $(M4)/fcb_next_binary.m4 \
673 $(M4)/fcb_open_cifin.m4 \
674 $(M4)/fcb_packed.m4 \
675 $(M4)/fcb_read_bits.m4 \
676 $(M4)/fcb_read_image.m4 \
677 $(M4)/fcb_read_xds_i2.m4 \
678 $(M4)/test_fcb_read_image.m4 \
679 $(M4)/test_xds_binary.m4
680
681
682 #
683 # Documentation files
684 #
685 DOCUMENTS = $(DOC)/CBFlib.html \
686 $(DOC)/CBFlib.txt \
687 $(DOC)/CBFlib_NOTICES.html \
688 $(DOC)/CBFlib_NOTICES.txt \
689 $(DOC)/ChangeLog \
690 $(DOC)/ChangeLog.html \
691 $(DOC)/MANIFES \
692 $(DOC)/gpl.txt $(DOC)/lgpl.txt
693
694 #
695 # HTML Graphics files
696 #
697 JPEGS = $(GRAPHICS)/CBFbackground.jpg \
698 $(GRAPHICS)/CBFbig.jpg \
699 $(GRAPHICS)/CBFbutton.jpg \
700 $(GRAPHICS)/cbflibbackground.jpg\
701 $(GRAPHICS)/cbflibbig.jpg \
702 $(GRAPHICS)/cbflibbutton.jpg \
703 $(GRAPHICS)/cifhome.jpg \
704 $(GRAPHICS)/iucrhome.jpg \
705 $(GRAPHICS)/noticeButton.jpg
706
707
708 #
709 # Default: instructions
710 #
711 default:
712 @echo ' '
713 @echo '***************************************************************'
714 @echo ' '
715 @echo ' PLEASE READ README and doc/CBFlib_NOTICES.txt'
716 @echo ' '
717 @echo ' Before making the CBF library and example programs, check'
718 @echo ' that the C compiler name and flags are correct:'
719 @echo ' '
720 @echo ' The current values are:'
721 @echo ' '
722 @echo ' $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(PYCIFRWFLAG)'
723 @echo ' '
724 @echo ' Before installing the CBF library and example programs, check'
725 @echo ' that the install directory is correct:'
726 @echo ' '
727 @echo ' The current value :'
728 @echo ' '
729 @echo ' $(INSTALLDIR) '
730 @echo ' '
731 @echo ' To compile the CBF library and example programs type:'
732 @echo ' '
733 @echo ' make clean'
734 @echo ' make all'
735 @echo ' '
736 @echo ' To compile the CBF library as a shared object library, type:'
737 @echo ' '
738 @echo ' make shared'
739 @echo ' '
740 @echo ' To compile the Java wrapper classes for CBF library, type:'
741 @echo ' '
742 @echo ' make javawrapper'
743 @echo ' '
744 @echo ' To run a set of tests type:'
745 @echo ' '
746 @echo ' make tests'
747 @echo ' '
748 @echo ' To run some java tests type:'
749 @echo ' '
750 @echo ' make javatests'
751 @echo ' '
752 @echo ' The tests assume that several data files are in the directories'
753 @echo ' $(DATADIRI) and $(DATADIRO)'
754 @echo ' '
755 @echo ' Alternatively tests can be run comparing MD5 signatures only by'
756 @echo ' '
757 @echo ' make tests_sigs_only'
758 @echo ' '
759 @echo ' These signature only tests save space and download time by'
760 @echo ' assuming that input data files and the output signatures'
761 @echo ' are in the directories'
762 @echo ' $(DATADIRI) and $(DATADIRS)'
763 @echo ' '
764 @echo ' These directory can be obtained from'
765 @echo ' '
766 @echo ' $(DATAURLI) '
767 @echo ' $(DATAURLO) '
768 @echo ' $(DATAURLS) '
769 @echo ' '
770 @echo ' To clean up the directories type:'
771 @echo ' '
772 @echo ' make clean'
773 @echo ' '
774 @echo ' To install the library and binaries type:'
775 @echo ' '
776 @echo ' make install'
777 @echo ' '
778 @echo '***************************************************************'
779 @echo ' '
780
781 #
782 # Compile the library and examples
783 #
784 CBFLIB_DONT_USE_PICIFRW=yes
785 ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes)
786 PYCIFRWDEPS = $(PYCIFRW) $(PLY)
787 else
788 PYCIFRWDEPS =
789 endif
790
791 ifneq ($(CBFLIB_DONT_USE_LZ4),yes)
792 LZ4DEPS = $(LZ4)
793 else
794 LZ4DEPS =
795 endif
796
797 all:: $(BIN) $(SOURCE) $(F90SOURCE) $(HEADERS) $(LZ4DEPS) $(PYCIFRWDEPS) \
798 symlinksdone \
799 $(REGEXDEP) \
800 $(LIB)/libcbf.a \
801 $(LIB)/libfcb.a \
802 $(LIB)/libimg.a \
803 $(BIN)/adscimg2cbf \
804 $(BIN)/arvai_test \
805 $(BIN)/cbf2adscimg \
806 $(BIN)/cbf2nexus \
807 $(BIN)/cif2c \
808 $(BIN)/cif2cbf \
809 $(BIN)/convert_image \
810 $(BIN)/convert_minicbf\
811 $(BIN)/img2cif \
812 $(BIN)/makecbf \
813 $(BIN)/minicbf2nexus \
814 $(BIN)/nexus2cbf \
815 $(BIN)/sequence_match \
816 $(BIN)/testcell \
817 $(BIN)/testalloc \
818 $(BIN)/testreals \
819 $(BIN)/testflat \
820 $(BIN)/testflatpacked \
821 $(BIN)/testhdf5 \
822 $(BIN_TESTULP) \
823 $(BIN)/tiff2cbf \
824 $(BIN)/test_cbf_airy_disk
825
826 ifneq ($(F90C),)
827 all:: $(BIN)/test_xds_binary \
828 $(BIN)/test_fcb_read_image
829 endif
830
831 shared: $(SOLIB)/libcbf.so $(SOLIB)/libfcb.so $(SOLIB)/libimg.so
832
833 javawrapper: shared $(JCBF) $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf_wrap.so
834
835 ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes)
836 PYCIFRWDEF = -Dcbf_use_pycifrw=yes
837 else
838 PYCIFRWDEF =
839 endif
840
841
842 Makefiles: Makefile \
843 Makefile_LINUX \
844 Makefile_LINUX_64 \
845 Makefile_LINUX_gcc42 \
846 Makefile_LINUX_DMALLOC \
847 Makefile_LINUX_gcc42_DMALLOC \
848 Makefile_OSX \
849 Makefile_OSX_gcc42 \
850 Makefile_OSX_gcc42_DMALLOC \
851 Makefile_AIX \
852 Makefile_MINGW \
853 Makefile_IRIX_gcc
854
855
856 Makefile_LINUX: $(M4)/Makefile.m4
857 -cp Makefile_LINUX Makefile_LINUX_old
858 m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX $(M4)/Makefile.m4 > Makefile_LINUX.tmp
859 mv Makefile_LINUX.tmp Makefile_LINUX
860
861 Makefile_LINUX_DMALLOC: $(M4)/Makefile.m4
862 -cp Makefile_LINUX Makefile_LINUX_old
863 m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_DMALLOC.tmp
864 mv Makefile_LINUX_DMALLOC.tmp Makefile_LINUX_DMALLOC
865
866 Makefile_LINUX_64: $(M4)/Makefile.m4
867 -cp Makefile_LINUX_64 Makefile_LINUX_64_old
868 m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_64 $(M4)/Makefile.m4 > Makefile_LINUX_64.tmp
869 mv Makefile_LINUX_64.tmp Makefile_LINUX_64
870
871 Makefile_LINUX_gcc42: $(M4)/Makefile.m4
872 -cp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_old
873 m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_gcc42 $(M4)/Makefile.m4 > Makefile_LINUX_gcc42.tmp
874 mv Makefile_LINUX_gcc42.tmp Makefile_LINUX_gcc42
875
876 Makefile_LINUX_gcc42_DMALLOC: $(M4)/Makefile.m4
877 -cp Makefile_LINUX_gcc42 Makefile_LINUX_gcc42_old
878 m4 -P $(PYCIFRWDEF) -Dcbf_system=LINUX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_LINUX_gcc42_DMALLOC.tmp
879 mv Makefile_LINUX_gcc42_DMALLOC.tmp Makefile_LINUX_gcc42_DMALLOC
880
881 Makefile_OSX: $(M4)/Makefile.m4
882 -cp Makefile_OSX Makefile_OSX_old
883 m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX $(M4)/Makefile.m4 > Makefile_OSX.tmp
884 mv Makefile_OSX.tmp Makefile_OSX
885
886 Makefile_OSX_gcc42: $(M4)/Makefile.m4
887 -cp Makefile_OSX_gcc42 Makefile_OSX_gcc42_old
888 m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX_gcc42 $(M4)/Makefile.m4 > Makefile_OSX_gcc42.tmp
889 mv Makefile_OSX_gcc42.tmp Makefile_OSX_gcc42
890
891 Makefile_OSX_gcc42_DMALLOC: $(M4)/Makefile.m4
892 -cp Makefile_OSX_gcc42 Makefile_OSX_gcc42_old
893 m4 -P $(PYCIFRWDEF) -Dcbf_system=OSX_gcc42_DMALLOC $(M4)/Makefile.m4 > Makefile_OSX_gcc42_DMALLOC.tmp
894 mv Makefile_OSX_gcc42_DMALLOC.tmp Makefile_OSX_gcc42_DMALLOC
895
896 Makefile_AIX: $(M4)/Makefile.m4
897 -cp Makefile_AIX Makefile_AIX_old
898 m4 -P $(PYCIFRWDEF) -Dcbf_system=AIX $(M4)/Makefile.m4 > Makefile_AIX.tmp
899 mv Makefile_AIX.tmp Makefile_AIX
900
901 Makefile_MINGW: $(M4)/Makefile.m4
902 -cp Makefile_MINGW Makefile_MINGW_old
903 m4 -P $(PYCIFRWDEF) -Dcbf_system=MINGW $(M4)/Makefile.m4 > Makefile_MINGW.tmp
904 mv Makefile_MINGW.tmp Makefile_MINGW
905
906 Makefile_IRIX_gcc: $(M4)/Makefile.m4
907 -cp Makefile_IRIX_gcc Makefile_IRIX_gcc_old
908 m4 -P $(PYCIFRWDEF) -Dcbf_system=IRIX_gcc $(M4)/Makefile.m4 > Makefile_IRIX_gcc.tmp
909 mv Makefile_IRIX_gcc.tmp Makefile_IRIX_gcc
910
911 Makefile: $(M4)/Makefile.m4
912 -cp Makefile Makefile_old
913 m4 -P $(PYCIFRWDEF) -Dcbf_system=default $(M4)/Makefile.m4 > Makefile.tmp
914 mv Makefile.tmp Makefile
915
916 symlinksdone:
917 chmod a+x .symlinks
918 chmod a+x .undosymlinks
919 chmod a+x doc/.symlinks
920 chmod a+x doc/.undosymlinks
921 ./.symlinks $(SLFLAGS)
922 touch symlinksdone
923
924 install: all $(INSTALLDIR) $(INSTALLDIR)/lib $(INSTALLDIR)/bin \
925 $(INSTALLDIR)/include $(INSTALLDIR)/include/cbflib \
926 $(PYSOURCE) shared $(EXAMPLES)/batch_convert_minicbf.sh
927 -chmod -R 755 $(INSTALLDIR)/include/cbflib
928 -chmod 755 $(INSTALLDIR)/lib/libcbf.a
929 -cp $(INSTALLDIR)/lib/libcbf.a $(INSTALLDIR)/lib/libcbf_old.a
930 cp $(LIB)/libcbf.a $(INSTALLDIR)/lib/libcbf.a
931 -chmod 755 $(INSTALLDIR)/lib/libimg.a
932 -cp $(INSTALLDIR)/lib/libimg.a $(INSTALLDIR)/lib/libimg_old.a
933 cp $(LIB)/libimg.a $(INSTALLDIR)/lib/libimg.a
934 -chmod 755 $(INSTALLDIR)/lib/libfcb.a
935 -cp $(INSTALLDIR)/lib/libfcb.a $(INSTALLDIR)/lib/libfcb_old.a
936 cp $(LIB)/libfcb.a $(INSTALLDIR)/lib/libfcb.a
937 -chmod 755 $(INSTALLDIR)/lib/libcbf.so
938 -cp $(INSTALLDIR)/lib/libcbf.so $(INSTALLDIR)/lib/libcbf_old.so
939 cp $(LIB)/libcbf.so $(INSTALLDIR)/lib/libcbf.so
940 -chmod 755 $(INSTALLDIR)/lib/libimg.so
941 -cp $(INSTALLDIR)/lib/libimg.so $(INSTALLDIR)/lib/libimg_old.so
942 cp $(LIB)/libimg.so $(INSTALLDIR)/lib/libimg.so
943 -chmod 755 $(INSTALLDIR)/lib/libfcb.so
944 -cp $(INSTALLDIR)/lib/libfcb.so $(INSTALLDIR)/lib/libfcb_old.so
945 cp $(LIB)/libfcb.so $(INSTALLDIR)/lib/libfcb.so
946 -cp $(INSTALLDIR)/bin/adscimg2cbf $(INSTALLDIR)/bin/adscimg2cbf_old
947 cp $(BIN)/adscimg2cbf $(INSTALLDIR)/bin/adscimg2cbf
948 -cp $(INSTALLDIR)/bin/cbf2adscimg $(INSTALLDIR)/bin/cbf2adscimg_old
949 cp $(BIN)/cbf2adscimg $(INSTALLDIR)/bin/cbf2adscimg
950 -cp $(INSTALLDIR)/bin/convert_image $(INSTALLDIR)/bin/convert_image_old
951 cp $(BIN)/convert_image $(INSTALLDIR)/bin/convert_image
952 -cp $(INSTALLDIR)/bin/convert_minicbf $(INSTALLDIR)/bin/convert_minicbf_old
953 cp $(BIN)/convert_minicbf $(INSTALLDIR)/bin/convert_minicbf
954 -cp $(INSTALLDIR)/bin/makecbf $(INSTALLDIR)/bin/makecbf_old
955 cp $(BIN)/makecbf $(INSTALLDIR)/bin/makecbf
956 -cp $(INSTALLDIR)/bin/img2cif $(INSTALLDIR)/bin/img2cif_old
957 cp $(BIN)/img2cif $(INSTALLDIR)/bin/img2cif
958 -cp $(INSTALLDIR)/bin/cif2cbf $(INSTALLDIR)/bin/cif2cbf_old
959 cp $(BIN)/cif2cbf $(INSTALLDIR)/bin/cif2cbf
960 -cp $(INSTALLDIR)/bin/minicbf2nexus $(INSTALLDIR)/bin/minicbf2nexus_old
961 cp $(BIN)/minicbf2nexus $(INSTALLDIR)/bin/minicbf2nexus
962 -cp $(INSTALLDIR)/bin/cbf2nexus $(INSTALLDIR)/bin/cbf2nexus_old
963 cp $(BIN)/cbf2nexus $(INSTALLDIR)/bin/cbf2nexus
964 -cp $(INSTALLDIR)/bin/nexus2cbf $(INSTALLDIR)/bin/nexus2cbf_old
965 cp $(BIN)/nexus2cbf $(INSTALLDIR)/bin/nexus2cbf
966 -cp $(INSTALLDIR)/bin/sequence_match $(INSTALLDIR)/bin/sequence_match_old
967 cp $(BIN)/sequence_match $(INSTALLDIR)/bin/sequence_match
968 -cp $(INSTALLDIR)/bin/arvai_test $(INSTALLDIR)/bin/arvai_test_old
969 cp $(BIN)/arvai_test $(INSTALLDIR)/bin/arvai_test
970 -cp $(INSTALLDIR)/bin/cif2c $(INSTALLDIR)/bin/cif2c_old
971 cp $(BIN)/cif2c $(INSTALLDIR)/bin/cif2c
972 -cp $(INSTALLDIR)/bin/testreals $(INSTALLDIR)/bin/testreals_old
973 cp $(BIN)/testreals $(INSTALLDIR)/bin/testreals
974 -cp $(INSTALLDIR)/bin/testflat $(INSTALLDIR)/bin/testflat_old
975 cp $(BIN)/testflat $(INSTALLDIR)/bin/testflat
976 -cp $(INSTALLDIR)/bin/testflatpacked $(INSTALLDIR)/bin/testflatpacked_old
977 cp $(BIN)/testflatpacked $(INSTALLDIR)/bin/testflatpacked
978 -cp $(INSTALLDIR)/bin/tiff2cbf $(INSTALLDIR)/bin/tiff2cbf_old
979 cp $(BIN)/tiff2cbf $(INSTALLDIR)/bin/tiff2cbf
980 -cp $(INSTALLDIR)/bin/test_cbf_airy_disk $(INSTALLDIR)/bin/test_cbf_airy_disk_old
981 cp $(BIN)/test_cbf_airy_disk $(INSTALLDIR)/bin/test_cbf_airy_disk
982 -cp $(INSTALLDIR)/bin/testhdf5 $(INSTALLDIR)/bin/testhdf5_old
983 cp $(BIN)/testhdf5 $(INSTALLDIR)/bin/testhdf5
984 ifneq ($(CBF_USE_ULP),)
985 -cp $(INSTALLDIR)/bin/testulp $(INSTALLDIR)/bin/testulp_old
986 cp $(BIN)/testulp $(INSTALLDIR)/bin/testulp
987 -cp $(INSTALLDIR)/bin/batch_convert_minicbf.sh $(INSTALLDIR)/bin/batch_convert_minicbf_old.sh
988 cp $(EXAMPLES)/batch_convert_minicbf.sh $(INSTALLDIR)/bin/batch_convert_minicbf.sh
989 endif
990 ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes)
991 cp $(SRC)/drel_lex.py $(INSTALLDIR)/bin/drel_lex.py
992 cp $(SRC)/drel_yacc.py $(INSTALLDIR)/bin/drel_yacc.py
993 cp $(SRC)/drelc.py $(INSTALLDIR)/bin/drelc.py
994 cp $(SRC)/drel_prep.py $(INSTALLDIR)/bin/drel_prep.py
995 endif
996 chmod -R 755 $(INSTALLDIR)/include/cbflib
997 -rm -rf $(INSTALLDIR)/include/cbflib_old
998 -cp -r $(INSTALLDIR)/include/cbflib $(INSTALLDIR)/include/cbflib_old
999 -rm -rf $(INSTALLDIR)/include/cbflib
1000 cp -r $(INCLUDE) $(INSTALLDIR)/include/cbflib
1001 chmod 644 $(INSTALLDIR)/lib/libcbf.a
1002 chmod 644 $(INSTALLDIR)/lib/libimg.a
1003 chmod 644 $(INSTALLDIR)/lib/libfcb.a
1004 chmod 755 $(INSTALLDIR)/lib/libcbf.so
1005 chmod 755 $(INSTALLDIR)/lib/libimg.so
1006 chmod 755 $(INSTALLDIR)/lib/libfcb.so
1007 chmod 755 $(INSTALLDIR)/bin/arvai_test
1008 chmod 755 $(INSTALLDIR)/bin/cbf2nexus
1009 chmod 755 $(INSTALLDIR)/bin/cif2c
1010 chmod 755 $(INSTALLDIR)/bin/cif2cbf
1011 chmod 755 $(INSTALLDIR)/bin/convert_image
1012 chmod 755 $(INSTALLDIR)/bin/convert_minicbf
1013 chmod 755 $(INSTALLDIR)/bin/img2cif
1014 chmod 755 $(INSTALLDIR)/bin/makecbf
1015 chmod 755 $(INSTALLDIR)/bin/minicbf2nexus
1016 chmod 755 $(INSTALLDIR)/bin/nexus2cbf
1017 chmod 755 $(INSTALLDIR)/bin/sequence_match
1018 chmod 755 $(INSTALLDIR)/bin/testalloc
1019 chmod 755 $(INSTALLDIR)/bin/testflat
1020 chmod 755 $(INSTALLDIR)/bin/testflatpacked
1021 chmod 755 $(INSTALLDIR)/bin/testhdf5
1022 chmod 755 $(INSTALLDIR)/bin/testreals
1023 ifneq ($(CBF_USE_ULP),)
1024 chmod 755 $(INSTALLDIR)/bin/testulp
1025 endif
1026 chmod 755 $(INSTALLDIR)/bin/tiff2cbf
1027 chmod 755 $(INSTALLDIR)/bin/test_cbf_airy_disk
1028 chmod 755 $(INSTALLDIR)/bin/batch_convert_minicbf.sh
1029 chmod 644 $(INSTALLDIR)/include/cbflib/*.h
1030
1031 ifneq ($(CBFLIB_DONT_USE_PYCIFRW),yes)
1032 #
1033 # PyCifRW
1034 #
1035 build_pycifrw: $(M4)/Makefile.m4
1036 touch build_pycifrw
1037 $(PYCIFRW): build_pycifrw
1038 -rm -rf $(PYCIFRW)
1039 -rm -rf $(PYCIFRW).tar.gz
1040 $(DOWNLOAD) $(PYCIFRWURL)
1041 tar -xvf $(PYCIFRW).tar.gz
1042 -rm $(PYCIFRW).tar.gz
1043 (cd $(PYCIFRW); python setup.py install --user )
1044
1045 #
1046 # PLY
1047 #
1048 build_ply: $(M4)/Makefile.m4
1049 touch build_ply
1050 $(PLY): build_ply
1051 -rm -rf $(PLY)
1052 -rm -rf $(PLY).tar.gz
1053 $(DOWNLOAD) $(PLYURL)
1054 tar -xvf $(PLY).tar.gz
1055 -rm $(PLY).tar.gz
1056 (cd $(PLY); python setup.py install --user )
1057 endif
1058
1059 #
1060 # REGEX
1061 #
1062
1063 ifneq ($(REGEXDEP),)
1064 $(REGEXDEP): $(REGEX)
1065 (cd $(REGEX); ./configure --build=x86_64-w64-mingw32; make install)
1066 endif
1067
1068 ifeq ($(CBF_NO_REGEX),)
1069 $(REGEX):
1070 $(DOWNLOAD) $(REGEXURL)
1071 tar -xvf $(REGEX).tar.gz
1072 -rm $(REGEX).tar.gz
1073 endif
1074
1075
1076 #
1077 # TIFF
1078 #
1079 build_tiff: $(M4)/Makefile.m4
1080 touch build_tiff
1081 $(TIFF): build_tiff
1082 -rm -rf $(TIFF)
1083 -rm -rf $(TIFF).tar.gz
1084 $(DOWNLOAD) $(TIFFURL)
1085 tar -xvf $(TIFF).tar.gz
1086 touch $(TIFF)
1087 -rm $(TIFF).tar.gz
1088 (cd $(TIFF); ./configure --build=x86_64-w64-mingw32 --prefix=$(TIFFPREFIX); make install)
1089
1090 #
1091 # HDF5
1092 #
1093 build_hdf5: $(M4)/Makefile.m4
1094 touch build_hdf5
1095 $(HDF5): build_hdf5
1096 -rm -rf $(HDF5)
1097 -rm -rf $(HDF5).tar.gz
1098 $(DOWNLOAD) $(HDF5URL)
1099 tar -xvf $(HDF5).tar.gz
1100 touch $(HDF5)
1101 -rm $(HDF5).tar.gz
1102 (cd $(HDF5); ./configure --build=x86_64-w64-mingw32 --enable-using-memchecker --prefix=$(HDF5PREFIX) ; make install)
1103
1104 ifneq ($(CBFLIB_DONT_USE_LZ4),yes)
1105 #
1106 # LZ4
1107 #
1108 build_lz4: $(M4)/Makefile.m4 $(SOLIB)
1109 touch build_lz4
1110 $(LZ4): build_lz4
1111 -rm -rf $(LZ4)
1112 -rm -rf $(LZ4).tar.gz
1113 $(DOWNLOAD) $(LZ4URL)
1114 tar -xvf $(LZ4).tar.gz
1115 touch $(LZ4)
1116 -rm $(LZ4).tar.gz
1117 (cp $(LZ4include)/lz4.h $(INCLUDE); \
1118 $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/lz4.c -o lz4.o; \
1119 $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(LZ4src)/h5zlz4.c -o h5zlz4.o; \
1120 $(CC) -shared lz4.o h5zlz4.o -o $(SOLIB)/libh5zlz4.so; \
1121 rm lz4.o h5zlz4.o)
1122 endif
1123
1124 #
1125 # Directories
1126 #
1127 $(INSTALLDIR):
1128 mkdir -p $(INSTALLDIR)
1129
1130 $(INSTALLDIR)/lib: $(INSTALLDIR)
1131 mkdir -p $(INSTALLDIR)/lib
1132
1133 $(INSTALLDIR)/bin: $(INSTALLDIR)
1134 mkdir -p $(INSTALLDIR)/bin
1135
1136 $(INSTALLDIR)/include: $(INSTALLDIR)
1137 mkdir -p $(INSTALLDIR)/include
1138
1139 $(INSTALLDIR)/include/cbflib: $(INSTALLDIR)/include
1140 mkdir -p $(INSTALLDIR)/include/cbflib
1141
1142
1143
1144 $(LIB):
1145 mkdir $@
1146
1147 $(BIN):
1148 mkdir $@
1149
1150 $(SOLIB):
1151 mkdir $@
1152
1153 $(JCBF):
1154 mkdir $@
1155
1156 $(MINICBF_TESTS):
1157 mkdir $@
1158
1159 #
1160 # Parser
1161 #
1162 $(SRC)/cbf_stx.c: $(SRC)/cbf.stx.y
1163 bison $(SRC)/cbf.stx.y -o $(SRC)/cbf.stx.tab.c -d
1164 mv $(SRC)/cbf.stx.tab.c $(SRC)/cbf_stx.c
1165 mv $(SRC)/cbf.stx.tab.h $(INCLUDE)/cbf_stx.h
1166
1167 #
1168 # CBF library
1169 #
1170 $(LIB)/libcbf.a: $(SOURCE) $(HEADERS) $(COMMONDEP) $(LIB)
1171 $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) \
1172 -DCBF_FILTER_STATIC $(LZ4FLAG) $(PYCIFRWFLAG) $(INCLUDES) $(WARNINGS) -c $(SOURCE)
1173 ifneq ($(CBFLIB_DONT_USE_LZ4),yes)
1174 $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(LZ4src)/lz4.c -o lz4.o
1175 $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(LZ4src)/h5zlz4.c -o h5zlz4.o
1176 endif
1177 $(AR) cr $@ *.o
1178 ifneq ($(RANLIB),)
1179 $(RANLIB) $@
1180 endif
1181 -rm -f *.o
1182
1183 $(SOLIB)/libcbf.so: $(SOURCE) $(HEADERS) $(COMMONDEP) $(SOLIB)
1184 -rm -f $@
1185 $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(LZ4FLAG) $(PYCIFRWFLAG) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(SOURCE)
1186 ifneq ($(CBFLIB_DONT_USE_LZ4),yes)
1187 $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(LZ4src)/lz4.c -o lz4.o
1188 $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -DCBF_FILTER_STATIC -c $(LZ4src)/h5zlz4.c -o h5zlz4.o
1189 endif
1190 $(CC) -o $@ *.o $(SOLDFLAGS) $(EXTRALIBS) $(HDF5SOLIBS)
1191 rm *.o
1192
1193 #
1194 # IMG library
1195 #
1196 $(LIB)/libimg.a: $(SRC)/img.c $(HEADERS) $(COMMONDEP) $(LIB)
1197 $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) -c $(SRC)/img.c
1198 $(AR) cr $@ img.o
1199 ifneq ($(RANLIB),)
1200 $(RANLIB) $@
1201 endif
1202 rm img.o
1203
1204 $(SOLIB)/libimg.so: $(SOURCE) $(HEADERS) $(COMMONDEP) $(SOLIB)
1205 -rm -f $@
1206 $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(SRC)/img.c
1207 $(CC) -o $@ img.o $(SOLDFLAGS)
1208 rm img.o
1209
1210 #
1211 # CBF and IMG libraries
1212 #
1213 CBF_IMG_LIBS: $(LIB)/libcbf.a $(LIB)/libimg.a
1214
1215
1216 #
1217 # FCB library
1218 #
1219 $(LIB)/libfcb.a: $(F90SOURCE) $(COMMONDEP) $(LIB)
1220 ifneq ($(F90C),)
1221 $(F90C) $(F90FLAGS) -c $(F90SOURCE)
1222 $(AR) cr $@ *.o
1223 ifneq ($(RANLIB),)
1224 $(RANLIB) $@
1225 endif
1226 rm *.o
1227 else
1228 echo "Define F90C to build $(LIB)/libfcb.a"
1229 endif
1230
1231 $(SOLIB)/libfcb.so: $(F90SOURCE) $(HEADERS) $(COMMONDEP) $(SOLIB)
1232 ifneq ($(F90C),)
1233 -rm -f $@
1234 $(F90C) $(F90FLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(F90SOURCE)
1235 $(F90C) $(F90FLAGS) -o $@ *.o $(SOLDFLAGS)
1236 rm *.o
1237 else
1238 echo "Define F90C to build $(SOLIB)/libfcb.so"
1239 endif
1240
1241
1242 #
1243 # Python bindings
1244 #
1245 $(PYCBF)/_pycbf.$(PYCBFEXT): $(PYCBF) shared \
1246 $(PYCBF)/$(SETUP_PY) \
1247 $(PYCBF)/pycbf.i \
1248 $(PYCBF)/cbfhandlewrappers.i \
1249 $(PYCBF)/cbfdetectorwrappers.i \
1250 $(PYCBF)/cbfgenericwrappers.i \
1251 $(PYCBF)/cbfgoniometerwrappers.i
1252 (cd $(PYCBF); python $(SETUP_PY) build $(PYCBFBOPT); cp build/lib.*/_pycbf.$(PYCBFEXT) .)
1253
1254 $(PYCBF)/setup.py: $(M4)/setup_py.m4
1255 (m4 -P -Dregexlib=REGEXLIB -Dregexlibdir=REGEXLIBDIR $(M4)/setup_py.m4 > $@)
1256
1257 $(PYCBF)/setup_MINGW.py: m4/setup_py.m4
1258 (m4 -P -Dregexlib=regex -Dregexlibdir=$(REGEXDIR) $(M4)/setup_py.m4 > $@)
1259
1260 $(LIB)/_pycbf.$(PYCBFEXT): $(PYCBF)/_pycbf.$(PYCBFEXT)
1261 cp $(PYCBF)/_pycbf.$(PYCBFEXT) $(LIB)/_pycbf.$(PYCBFEXT)
1262
1263 $(PYCBF)/pycbf.pdf: $(PYCBF)/pycbf.w
1264 (cd $(PYCBF); \
1265 $(NUWEB) pycbf; \
1266 latex pycbf; \
1267 $(NUWEB) pycbf; \
1268 latex pycbf; \
1269 dvipdfm pycbf )
1270
1271 $(PYCBF)/CBFlib.txt: $(DOC)/CBFlib.html
1272 links -dump $(DOC)/CBFlib.html > $(PYCBF)/CBFlib.txt
1273
1274 $(PYCBF)/cbfhandlewrappers.i \
1275 $(PYCBF)/cbfdetectorwrappers.i \
1276 $(PYCBF)/cbfgenericwrappers.i \
1277 $(PYCBF)/cbfgoniometerwrappers.i: $(PYCBF)/CBFlib.txt $(PYCBF)/make_pycbf.py
1278 (cd $(PYCBF); python make_pycbf.py; $(PYSWIG) pycbf.i; python setup.py build)
1279
1280
1281 #
1282 # Java bindings
1283 #
1284 $(JCBF)/cbflib-$(VERSION).jar: $(JCBF) $(JCBF)/jcbf.i
1285 $(JSWIG) -I$(INCLUDE) -package org.iucr.cbflib -outdir $(JCBF) $(JCBF)/jcbf.i
1286 $(JAVAC) -d . $(JCBF)/*.java
1287 $(JAR) cf $@ org
1288
1289 $(SOLIB)/libcbf_wrap.so: $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf.so
1290 $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) $(JAVAINCLUDES) -c $(JCBF)/jcbf_wrap.c
1291 $(CC) -o $@ jcbf_wrap.o $(SOLDFLAGS) -L$(SOLIB) -lcbf
1292 rm jcbf_wrap.o
1293
1294 #
1295 # F90SOURCE
1296 #
1297 $(SRC)/fcb_exit_binary.f90: $(M4)/fcb_exit_binary.m4 $(M4)/fcblib_defines.m4
1298 (cd $(M4); m4 -P $(M4FLAGS) fcb_exit_binary.m4) > $(SRC)/fcb_exit_binary.f90
1299 $(SRC)/fcb_next_binary.f90: $(M4)/fcb_next_binary.m4 $(M4)/fcblib_defines.m4
1300 (cd $(M4); m4 -P $(M4FLAGS) fcb_next_binary.m4) > $(SRC)/fcb_next_binary.f90
1301 $(SRC)/fcb_open_cifin.f90: $(M4)/fcb_open_cifin.m4 $(M4)/fcblib_defines.m4
1302 (cd $(M4); m4 -P $(M4FLAGS) fcb_open_cifin.m4) > $(SRC)/fcb_open_cifin.f90
1303 $(SRC)/fcb_packed.f90: $(M4)/fcb_packed.m4 $(M4)/fcblib_defines.m4
1304 (cd $(M4); m4 -P $(M4FLAGS) fcb_packed.m4) > $(SRC)/fcb_packed.f90
1305 $(SRC)/fcb_read_bits.f90: $(M4)/fcb_read_bits.m4 $(M4)/fcblib_defines.m4
1306 (cd $(M4); m4 -P $(M4FLAGS) fcb_read_bits.m4) > $(SRC)/fcb_read_bits.f90
1307 $(SRC)/fcb_read_image.f90: $(M4)/fcb_read_image.m4 $(M4)/fcblib_defines.m4
1308 (cd $(M4); m4 -P $(M4FLAGS) fcb_read_image.m4) > $(SRC)/fcb_read_image.f90
1309 $(SRC)/fcb_read_xds_i2.f90: $(M4)/fcb_read_xds_i2.m4 $(M4)/fcblib_defines.m4
1310 (cd $(M4); m4 -P $(M4FLAGS) fcb_read_xds_i2.m4) > $(SRC)/fcb_read_xds_i2.f90
1311 $(EXAMPLES)/test_fcb_read_image.f90: $(M4)/test_fcb_read_image.m4 $(M4)/fcblib_defines.m4
1312 (cd $(M4); m4 -P $(M4FLAGS) test_fcb_read_image.m4) > $(EXAMPLES)/test_fcb_read_image.f90
1313 $(EXAMPLES)/test_xds_binary.f90: $(M4)/test_xds_binary.m4 $(M4)/fcblib_defines.m4
1314 (cd $(M4); m4 -P $(M4FLAGS) test_xds_binary.m4) > $(EXAMPLES)/test_xds_binary.f90
1315
1316 #
1317 # convert_image example program
1318 #
1319 $(BIN)/convert_image: $(LIB)/libcbf.a $(EXAMPLES)/convert_image.c $(SRC)/img.c \
1320 $(GOPTLIB) $(GOPTINC)
1321 $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
1322 $(EXAMPLES)/convert_image.c $(SRC)/img.c $(GOPTLIB) -L$(LIB) \
1323 -lcbf $(EXTRALIBS) $(HDF5LIBS) -o $@
1324 #
1325 # convert_minicbf example program
1326 #
1327 $(BIN)/convert_minicbf: $(LIB)/libcbf.a $(EXAMPLES)/convert_minicbf.c \
1328 $(GOPTLIB) $(GOPTINC) $(EXAMPLES)/batch_convert_minicbf.sh
1329 $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
1330 $(EXAMPLES)/convert_minicbf.c $(GOPTLIB) -L$(LIB) \
1331 -lcbf $(EXTRALIBS) $(HDF5LIBS) -o $@
1332 chmod 755 $(EXAMPLES)/batch_convert_minicbf.sh
1333
1334 #
1335 # makecbf example program
1336 #
1337 $(BIN)/makecbf: $(LIB)/libcbf.a $(EXAMPLES)/makecbf.c $(LIB)/libimg.a
1338 $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
1339 $(EXAMPLES)/makecbf.c -L$(LIB) \
1340 -lcbf $(EXTRALIBS) $(HDF5LIBS) -limg -o $@
1341
1342
1343 #
1344 # adscimg2cbf example program
1345 #
1346 $(BIN)/adscimg2cbf: $(LIB)/libcbf.a $(EXAMPLES)/adscimg2cbf.c $(EXAMPLES)/adscimg2cbf_sub.c
1347 $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -D_SVID_SOURCE $(INCLUDES) $(WARNINGS) \
1348 $(EXAMPLES)/adscimg2cbf.c $(EXAMPLES)/adscimg2cbf_sub.c -L$(LIB) \
1349 -lcbf $(EXTRALIBS) $(HDF5LIBS) -o $@
1350
1351 #
1352 # cbf2adscimg example program
1353 #
1354 $(BIN)/cbf2adscimg: $(LIB)/libcbf.a $(EXAMPLES)/cbf2adscimg.c $(EXAMPLES)/cbf2adscimg_sub.c
1355 $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -D_SVID_SOURCE $(INCLUDES) $(WARNINGS) \
1356 $(EXAMPLES)/cbf2adscimg.c $(EXAMPLES)/cbf2adscimg_sub.c -L$(LIB) \
1357 -lcbf $(EXTRALIBS) $(HDF5LIBS) -o $@
1358
1359 #
1360 # changtestcompression example program
1361 #
1362 $(BIN)/changtestcompression: $(LIB)/libcbf.a $(EXAMPLES)/changtestcompression.c
1363 $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
1364 $(EXAMPLES)/changtestcompression.c -L$(LIB) \
1365 -lcbf $(EXTRALIBS) $(HDF5LIBS) -o $@
1366
1367 #
1368 # img2cif example program
1369 #
1370 $(BIN)/img2cif: $(LIB)/libcbf.a $(EXAMPLES)/img2cif.c $(LIB)/libimg.a \
1371 $(GOPTLIB) $(GOTPINC)
1372 $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
1373 $(EXAMPLES)/img2cif.c $(GOPTLIB) -L$(LIB) \
1374 -lcbf $(EXTRALIBS) $(HDF5LIBS) -limg -o $@
1375
1376 #
1377 # cif2cbf example program
1378 #
1379 $(BIN)/cif2cbf: $(LIB)/libcbf.a $(EXAMPLES)/cif2cbf.c $(LIB)/libimg.a \
1380 $(GOPTLIB) $(GOPTINC) shared
1381 $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
1382 $(EXAMPLES)/cif2cbf.c $(GOPTLIB) -L$(LIB) \
1383 -lcbf $(EXTRALIBS) $(HDF5LIBS) -limg -o $@
1384
1385 #
1386 # cbf2nexus example program
1387 #
1388 $(BIN)/cbf2nexus: $(LIB)/libcbf.a $(EXAMPLES)/cbf2nexus.c \
1389 $(GOPTLIB) $(GOPTINC)
1390 $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
1391 $(EXAMPLES)/cbf2nexus.c $(GOPTLIB) -L$(LIB) \
1392 -lcbf $(EXTRALIBS) $(HDF5LIBS) -limg -o $@
1393
1394 #
1395 # minicbf2nexus example program
1396 #
1397 $(BIN)/minicbf2nexus: $(LIB)/libcbf.a $(EXAMPLES)/minicbf2nexus.c $(LIB)/libimg.a \
1398 $(GOPTLIB) $(GOPTINC)
1399 $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
1400 $(EXAMPLES)/minicbf2nexus.c $(GOPTLIB) -L$(LIB) \
1401 -lcbf $(EXTRALIBS) $(HDF5LIBS) -limg -o $@
1402
1403 #
1404 # nexus2cbf example program
1405 #
1406 $(BIN)/nexus2cbf: $(LIB)/libcbf.a $(EXAMPLES)/nexus2cbf.c \
1407 $(GOPTLIB) $(GOPTINC)
1408 $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
1409 $(EXAMPLES)/nexus2cbf.c $(GOPTLIB) -L$(LIB) \
1410 -lcbf $(EXTRALIBS) $(HDF5LIBS) -limg -o $@
1411
1412
1413 #
1414 # dectris cbf_template_t program
1415 #
1416 $(BIN)/cbf_template_t: $(DECTRIS_EXAMPLES)/cbf_template_t.c \
1417 $(DECTRIS_EXAMPLES)/mx_cbf_t_extras.h \
1418 $(DECTRIS_EXAMPLES)/mx_parms.h
1419 $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) -I $(DECTRIS_EXAMPLES) $(WARNINGS) \
1420 $(DECTRIS_EXAMPLES)/cbf_template_t.c -o $@
1421
1422 #
1423 # testcell example program
1424 #
1425 $(BIN)/testcell: $(LIB)/libcbf.a $(EXAMPLES)/testcell.C
1426 $(C++) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
1427 $(EXAMPLES)/testcell.C -L$(LIB) \
1428 -lcbf $(EXTRALIBS) $(HDF5LIBS) -o $@
1429
1430 #
1431 # cif2c example program
1432 #
1433 $(BIN)/cif2c: $(LIB)/libcbf.a $(EXAMPLES)/cif2c.c
1434 $(C++) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
1435 $(EXAMPLES)/cif2c.c -L$(LIB) \
1436 -lcbf $(EXTRALIBS) $(HDF5LIBS) -o $@
1437
1438 #
1439 # sauter_test example program
1440 #
1441 $(BIN)/sauter_test: $(LIB)/libcbf.a $(EXAMPLES)/sauter_test.C
1442 $(C++) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
1443 $(EXAMPLES)/sauter_test.C -L$(LIB) \
1444 -lcbf $(EXTRALIBS) $(HDF5LIBS) -o $@
1445
1446 #
1447 # sequence_match example program
1448 #
1449 $(BIN)/sequence_match: $(LIB)/libcbf.a $(EXAMPLES)/sequence_match.c $(LIB)/libimg.a \
1450 $(GOPTLIB) $(GOPTINC)
1451 $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
1452 $(EXAMPLES)/sequence_match.c $(GOPTLIB) -L$(LIB) \
1453 -lcbf $(EXTRALIBS) $(HDF5LIBS) -limg -o $@
1454
1455 #
1456 # tiff2cbf example program
1457 #
1458 $(BIN)/tiff2cbf: $(LIB)/libcbf.a $(EXAMPLES)/tiff2cbf.c \
1459 $(GOPTLIB) $(GOPTINC) $(TIFF)
1460 $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
1461 -I$(TIFFPREFIX)/include $(EXAMPLES)/tiff2cbf.c $(GOPTLIB) -L$(LIB) \
1462 -lcbf -L$(TIFFPREFIX)/lib -ltiff $(EXTRALIBS) $(HDF5LIBS) -limg -o $@
1463
1464 #
1465 # Andy Arvai's buffered read test program
1466 #
1467 $(BIN)/arvai_test: $(LIB)/libcbf.a $(EXAMPLES)/arvai_test.c $(LIB)/libimg.a \
1468 $(GOPTLIB) $(GOPTINC)
1469 $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
1470 $(EXAMPLES)/arvai_test.c $(GOPTLIB) -L$(LIB) \
1471 -lcbf $(EXTRALIBS) $(HDF5LIBS) -limg -o $@
1472
1473 #
1474 # testreals example program
1475 #
1476 $(BIN)/testreals: $(LIB)/libcbf.a $(EXAMPLES)/testreals.c
1477 $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
1478 $(EXAMPLES)/testreals.c -L$(LIB) \
1479 -lcbf $(EXTRALIBS) $(HDF5LIBS) -o $@
1480
1481 #
1482 # testflat example program
1483 #
1484 $(BIN)/testflat: $(LIB)/libcbf.a $(EXAMPLES)/testflat.c
1485 $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
1486 $(EXAMPLES)/testflat.c -L$(LIB) \
1487 -lcbf $(EXTRALIBS) $(HDF5LIBS) -o $@
1488 #
1489 # testflatpacked example program
1490 #
1491 $(BIN)/testflatpacked: $(LIB)/libcbf.a $(EXAMPLES)/testflatpacked.c
1492 $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
1493 $(EXAMPLES)/testflatpacked.c -L$(LIB) \
1494 -lcbf $(EXTRALIBS) $(HDF5LIBS) -o $@
1495
1496 ifneq ($(F90C),)
1497 #
1498 # test_xds_binary example program
1499 #
1500 $(BIN)/test_xds_binary: $(LIB)/libfcb.a $(EXAMPLES)/test_xds_binary.f90
1501 $(F90C) $(F90FLAGS) $(F90LDFLAGS) $(EXAMPLES)/test_xds_binary.f90 \
1502 -L$(LIB) -lfcb -o $@
1503
1504 #
1505 # test_fcb_read_image example program
1506 #
1507 $(BIN)/test_fcb_read_image: $(LIB)/libfcb.a $(EXAMPLES)/test_fcb_read_image.f90
1508 $(F90C) $(F90FLAGS) $(F90LDFLAGS) $(EXAMPLES)/test_fcb_read_image.f90 \
1509 -L$(LIB) -lfcb -o $@
1510 endif
1511
1512 #
1513 # testcbf (C)
1514 #
1515 $(BIN)/ctestcbf: $(EXAMPLES)/testcbf.c $(LIB)/libcbf.a
1516 $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) \
1517 $(EXAMPLES)/testcbf.c -L$(LIB) \
1518 -lcbf $(EXTRALIBS) $(HDF5LIBS) -o $@
1519
1520 #
1521 # testcbf (Java)
1522 #
1523 $(BIN)/testcbf.class: $(EXAMPLES)/testcbf.java $(JCBF)/cbflib-$(VERSION).jar $(SOLIB)/libcbf_wrap.so
1524 $(JAVAC) -cp $(JCBF)/cbflib-$(VERSION).jar -d $(BIN) $(EXAMPLES)/testcbf.java
1525
1526 ifneq ($(CBF_USE_ULP),)
1527 #
1528 # testulp test program
1529 #
1530 $(BIN)/testulp: $(LIB)/libcbf.a $(EXAMPLES)/testulp.c $(EXAMPLES)/unittest.h
1531 $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) $(EXAMPLES)/testulp.c -L$(LIB) $(LIB)/libcbf.a $(EXTRALIBS) -o [email protected]
1532 mv [email protected] $@
1533 endif
1534
1535 #
1536 # testhdf5 test program
1537 #
1538 $(BIN)/testhdf5: $(LIB)/libcbf.a $(EXAMPLES)/testhdf5.c $(EXAMPLES)/unittest.h
1539 $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) $(EXAMPLES)/testhdf5.c -L$(LIB) $(LIB)/libcbf.a $(HDF5LIBS) $(EXTRALIBS) -o [email protected]
1540 mv [email protected] $@
1541
1542 #
1543 # testalloc test program
1544 #
1545 $(BIN)/testalloc: $(LIB)/libcbf.a $(EXAMPLES)/testalloc.c $(EXAMPLES)/unittest.h
1546 $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) $(EXAMPLES)/testalloc.c -L$(LIB) $(LIB)/libcbf.a $(EXTRALIBS) -o [email protected]
1547 mv [email protected] $@
1548
1549 #
1550 # test_cbf_airy_disk test program
1551 #
1552 $(BIN)/test_cbf_airy_disk: $(LIB)/libcbf.a $(EXAMPLES)/test_cbf_airy_disk.c
1553 $(CC) $(CFLAGS) $(MISCFLAG) $(CBF_REGEXFLAG) $(INCLUDES) $(WARNINGS) $(EXAMPLES)/test_cbf_airy_disk.c -L$(LIB) $(LIB)/libcbf.a $(EXTRALIBS) -o [email protected]
1554 mv [email protected] $@
1555
1556
1557 #
1558 # Data files for tests
1559 #
1560
1561 $(DATADIRI): $(M4)/Makefile.m4
1562 (cd ..; $(DOWNLOAD) $(DATAURLI))
1563 (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Input.tar.gz)
1564 touch $(DATADIRI)
1565 -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Input.tar.gz)
1566
1567 $(DATADIRO): $(M4)/Makefile.m4
1568 (cd ..; $(DOWNLOAD) $(DATAURLO))
1569 (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Output.tar.gz)
1570 touch $(DATADIRO)
1571 -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Output.tar.gz)
1572
1573 $(DATADIRS): $(M4)/Makefile.m4
1574 (cd ..; $(DOWNLOAD) $(DATAURLS))
1575 (cd ..; tar -zxvf CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz)
1576 touch $(DATADIRS)
1577 -(cd ..; rm CBFlib_$(VERSION)_Data_Files_Output_Sigs_Only.tar.gz)
1578
1579
1580 # Input Data Files
1581
1582 TESTINPUT_BASIC = example.mar2300
1583 DATADIRI_INPUT_BASIC = $(DATADIRI)/example.mar2300
1584
1585
1586 TESTINPUT_EXTRA = \
1587 1191_00005.cbf \
1588 9ins.cif \
1589 hit-20140306005258847.cbf \
1590 insulin_pilatus6m.cbf \
1591 mb_LP_1_001.img \
1592 testflatin.cbf \
1593 testflatpackedin.cbf \
1594 testrealin.cbf \
1595 thaumatin_die_M1S5_1_0005_2.cbf \
1596 X4_lots_M1S4_1_0001.cbf \
1597 X4_lots_M1S4_1_0002.cbf \
1598 X4_lots_M1S4_1_0003.cbf \
1599 X4_lots_M1S4_1_0004.cbf \
1600 X4_lots_M1S4_1_0005.cbf \
1601 XRD1621.tif
1602
1603
1604
1605 DATADIRI_INPUT_EXTRA = \
1606 $(DATADIRI)/1191_00005.cbf \
1607 $(DATADIRI)/9ins.cif \
1608 $(DATADIRI)/hit-20140306005258847.cbf \
1609 $(DATADIRI)/insulin_pilatus6m.cbf \
1610 $(DATADIRI)/mb_LP_1_001.img \
1611 $(DATADIRI)/testflatin.cbf \
1612 $(DATADIRI)/testflatpackedin.cbf \
1613 $(DATADIRI)/testrealin.cbf \
1614 $(DATADIRI)/thaumatin_die_M1S5_1_0005_2.cbf \
1615 $(DATADIRI)/X4_lots_M1S4_1_0001.cbf \
1616 $(DATADIRI)/X4_lots_M1S4_1_0002.cbf \
1617 $(DATADIRI)/X4_lots_M1S4_1_0003.cbf \
1618 $(DATADIRI)/X4_lots_M1S4_1_0004.cbf \
1619 $(DATADIRI)/X4_lots_M1S4_1_0005.cbf \
1620 $(DATADIRI)/XRD1621.tif
1621
1622
1623 # Output Data Files
1624
1625 TESTOUTPUT = adscconverted_flat_orig.cbf \
1626 adscconverted_orig.cbf converted_flat_orig.cbf converted_orig.cbf \
1627 insulin_pilatus6mconverted_rev_orig.cbf \
1628 insulin_pilatus6mconverted_orig_rev22Feb15.cbf.h5\
1629 insulin_pilatus6mconverted_orig.cbf.h5.cbf \
1630 insulin_pilatus6mconverted_v2_orig.cbf \
1631 mb_LP_1_001_orig.cbf testcell_orig.prt \
1632 test_xds_bin_testflatout_orig.out \
1633 test_xds_bin_testflatpackedout_orig.out test_fcb_read_testflatout_orig.out \
1634 test_fcb_read_testflatpackedout_orig.out \
1635 XRD1621_orig.cbf XRD1621_I4encbC100_orig.cbf \
1636 minicbf_orig_3Jul14.h5
1637 NEWTESTOUTPUT = adscconverted_flat.cbf \
1638 adscconverted.cbf converted_flat.cbf converted.cbf \
1639 insulin_pilatus6mconverted.cbf \
1640 insulin_pilatus6mconverted_v2.cbf \
1641 mb_LP_1_001.cbf testcell.prt \
1642 test_xds_bin_testflatout.out \
1643 test_xds_bin_testflatpackedout.out test_fcb_read_testflatout.out \
1644 test_fcb_read_testflatpackedout.out \
1645 XRD1621.cbf XRD1621_I4encbC100.cbf \
1646 minicbf.h5
1647 DATADIRO_OUTPUT = $(DATADIRO)/adscconverted_flat_orig.cbf \
1648 $(DATADIRO)/adscconverted_orig.cbf \
1649 $(DATADIRO)/converted_flat_orig.cbf \
1650 $(DATADIRO)/converted_orig.cbf \
1651 $(DATADIRO)/insulin_pilatus6mconverted_rev_orig.cbf \
1652 $(DATADIRO)/insulin_pilatus6mconverted_orig_rev22Feb15.cbf.h5 \
1653 $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf \
1654 $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf \
1655 $(DATADIRO)/mb_LP_1_001_orig.cbf \
1656 $(DATADIRO)/testcell_orig.prt \
1657 $(DATADIRO)/test_xds_bin_testflatout_orig.out \
1658 $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out \
1659 $(DATADIRO)/test_fcb_read_testflatout_orig.out \
1660 $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out \
1661 $(DATADIRO)/XRD1621_orig.cbf \
1662 $(DATADIRO)/XRD1621_I4encbC100_orig.cbf \
1663 $(DATADIRO)/minicbf_orig_3Jul14.h5
1664 DATADIRO_OUTPUT_SIGNATURES = $(DATADIRO)/adscconverted_flat_orig.cbf$(SEXT) \
1665 $(DATADIRO)/adscconverted_orig.cbf$(SEXT) \
1666 $(DATADIRO)/converted_flat_orig.cbf$(SEXT) \
1667 $(DATADIRO)/converted_orig.cbf$(SEXT) \
1668 $(DATADIRO)/insulin_pilatus6mconverted_rev_orig.cbf$(SEXT) \
1669 $(DATADIRO)/insulin_pilatus6mconverted_orig_rev22Feb15.cbf.h5$(SEXT) \
1670 $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \
1671 $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \
1672 $(DATADIRO)/mb_LP_1_001_orig.cbf$(SEXT) \
1673 $(DATADIRO)/testcell_orig.prt$(SEXT) \
1674 $(DATADIRO)/test_xds_bin_testflatout_orig.out$(SEXT) \
1675 $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out$(SEXT) \
1676 $(DATADIRO)/test_fcb_read_testflatout_orig.out$(SEXT) \
1677 $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out$(SEXT) \
1678 $(DATADIRO)/XRD1621_orig.cbf$(SEXT) \
1679 $(DATADIRO)/XRD1621_I4encbC100_orig.cbf$(SEXT) \
1680 $(DATADIRO)/minicbf_orig_3Jul14.h5$(SEXT)
1681
1682
1683
1684 # Output Data File Signatures
1685
1686 TESTOUTPUTSIGS = adscconverted_flat_orig.cbf$(SEXT) \
1687 adscconverted_orig.cbf$(SEXT) converted_flat_orig.cbf$(SEXT) converted_orig.cbf$(SEXT) \
1688 insulin_pilatus6mconverted_rev_orig.cbf$(SEXT) \
1689 insulin_pilatus6mconverted_orig_rev22Feb15.cbf.h5$(SEXT) \
1690 insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \
1691 insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \
1692 mb_LP_1_001_orig.cbf$(SEXT) testcell_orig.prt$(SEXT) \
1693 test_xds_bin_testflatout_orig.out$(SEXT) \
1694 test_xds_bin_testflatpackedout_orig.out$(SEXT) test_fcb_read_testflatout_orig.out$(SEXT) \
1695 test_fcb_read_testflatpackedout_orig.out$(SEXT) \
1696 XRD1621_orig.cbf$(SEXT) \
1697 XRD1621_I4encbC100_orig.cbf$(SEXT) \
1698 minicbf_orig_3Jul14.h5$(SEXT)
1699 DATADIRS_OUTPUT_SIGNATURES = $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT) \
1700 $(DATADIRS)/adscconverted_orig.cbf$(SEXT) \
1701 $(DATADIRS)/converted_flat_orig.cbf$(SEXT) \
1702 $(DATADIRS)/converted_orig.cbf$(SEXT) \
1703 $(DATADIRS)/insulin_pilatus6mconverted_rev_orig.cbf$(SEXT) \
1704 $(DATADIRS)/insulin_pilatus6mconverted_orig_rev22Feb15.cbf.h5$(SEXT) \
1705 $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT) \
1706 $(DATADIRS)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT) \
1707 $(DATADIRS)/mb_LP_1_001_orig.cbf$(SEXT) \
1708 $(DATADIRS)/testcell_orig.prt$(SEXT) \
1709 $(DATADIRS)/test_xds_bin_testflatout_orig.out$(SEXT) \
1710 $(DATADIRS)/test_xds_bin_testflatpackedout_orig.out$(SEXT) \
1711 $(DATADIRS)/test_fcb_read_testflatout_orig.out$(SEXT) \
1712 $(DATADIRS)/test_fcb_read_testflatpackedout_orig.out$(SEXT) \
1713 $(DATADIRS)/XRD1621_orig.cbf$(SEXT) \
1714 $(DATADIRS)/XRD1621_I4encbC100_orig.cbf$(SEXT) \
1715 $(DATADIRS)/minicbf_orig_3Jul14.h5$(SEXT)
1716
1717 # Fetch Input Data Files
1718
1719 $(TESTINPUT_BASIC): $(DATADIRI) $(DATADIRI_INPUT_BASIC)
1720 cp $(DATADIRI)/$@ $@
1721 cp $(DATADIRI)/$@$(SEXT) $@$(SEXT)
1722 -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT)
1723
1724 $(TESTINPUT_EXTRA): $(DATADIRI) $(DATADIRI_INPUT_EXTRA)
1725 cp $(DATADIRI)/$@ $@
1726 cp $(DATADIRI)/$@$(SEXT) $@$(SEXT)
1727 -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT)
1728
1729
1730 # Fetch Output Data Files and Signatures
1731
1732 $(TESTOUTPUT): $(DATADIRO) $(DATADIRO_OUTPUT) $(DATADIRO_OUTPUT_SIGNATURES)
1733 cp $(DATADIRO)/$@ $@
1734 cp $(DATADIRO)/$@$(SEXT) $@$(SEXT)
1735 -$(SIGNATURE) < $@ | $(DIFF) - $@$(SEXT)
1736
1737 # Fetch Output Data File Signatures
1738
1739 $(TESTOUTPUTSIGS): $(DATADIRS) $(DATADIRS_OUTPUT_SIGNATURES)
1740 cp $(DATADIRS)/$@ $@
1741
1742
1743
1744 #
1745 # Tests
1746 #
1747 tests: all $(LIB) $(BIN) symlinksdone basic extra dectristests pycbftests
1748 tests_sigs_only: $(LIB) $(BIN) symlinksdone basic extra_sigs_only
1749 restore_output: $(NEWTESTOUTPUT) $(DATADIRO)
1750 $(SIGNATURE) < adscconverted_flat.cbf > $(DATADIRO)/adscconverted_flat_orig.cbf$(SEXT)
1751 $(SIGNATURE) < adscconverted.cbf > $(DATADIRO)/adscconverted_orig.cbf$(SEXT)
1752 $(SIGNATURE) < converted_flat.cbf > $(DATADIRO)/converted_flat_orig.cbf$(SEXT)
1753 $(SIGNATURE) < converted.cbf > $(DATADIRO)/converted_orig.cbf$(SEXT)
1754 $(SIGNATURE) < insulin_pilatus6mconverted.cbf > $(DATADIRO)/insulin_pilatus6mconverted_rev_orig.cbf$(SEXT)
1755 $(SIGNATURE) < insulin_pilatus6mconverted.cbf > $(DATADIRO)/insulin_pilatus6mconverted_orig_rev22Feb15.cbf.h5
1756 $(SIGNATURE) < insulin_pilatus6mconverted.cbf > $(DATADIRO)/ insulin_pilatus6mconverted_orig.cbf.h5.cbf
1757 $(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf > $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT)
1758 $(SIGNATURE) < mb_LP_1_001.cbf$ > $(DATADIRO)/mb_LP_1_001_orig.cbf$(SEXT)
1759 $(SIGNATURE) < testcell.prt > $(DATADIRO)/testcell_orig.prt$(SEXT)
1760 $(SIGNATURE) < test_xds_bin_testflatout.out > $(DATADIRO)/test_xds_bin_testflatout_orig.out$(SEXT)
1761 $(SIGNATURE) < test_xds_bin_testflatpackedout.out > $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out$(SEXT)
1762 $(SIGNATURE) < test_fcb_read_testflatout.out > $(DATADIRO)/test_fcb_read_testflatout_orig.out$(SEXT)
1763 $(SIGNATURE) < test_fcb_read_testflatpackedout.out > $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out$(SEXT)
1764 $(SIGNATURE) < XRD1621.cbf > $(DATADIRO)/XRD1621_orig.cbf$(SEXT)
1765 $(SIGNATURE) < XRD1621_I4encbC100.cbf > $(DATADIRO)/XRD1621_I4encbC100_orig.cbf$(SEXT)
1766 $(SIGNATURE) < minicbf_orig_3Jul14.h5 > $(DATADIRO)/minicbf_orig_3Jul14.h5$(SEXT)
1767 cp adscconverted_flat.cbf $(DATADIRO)/adscconverted_flat_orig.cbf$
1768 cp adscconverted.cbf $(DATADIRO)/adscconverted_orig.cbf
1769 cp converted_flat.cbf $(DATADIRO)/converted_flat_orig.cbf
1770 cp converted.cbf $(DATADIRO)/converted_orig.cbf
1771 cp insulin_pilatus6mconverted.cbf > $(DATADIRO)/insulin_pilatus6mconverted_rev_orig.cbf
1772 cp insulin_pilatus6mconverted.cbf > $(DATADIRO)/insulin_pilatus6mconverted_orig_rev22Feb15.cbf.h5
1773 cp insulin_pilatus6mconverted.cbf > $(DATADIRO)/insulin_pilatus6mconverted_orig.cbf.h5.cbf
1774 cp insulin_pilatus6mconverted_v2.cbf > $(DATADIRO)/insulin_pilatus6mconverted_v2_orig.cbf
1775 cp mb_LP_1_001.cbf$ > $(DATADIRO)/mb_LP_1_001_orig.cbf
1776 cp testcell.prt > $(DATADIRO)/testcell_orig.prt
1777 cp test_xds_bin_testflatout.out > $(DATADIRO)/test_xds_bin_testflatout_orig.out
1778 cp test_xds_bin_testflatpackedout.out > $(DATADIRO)/test_xds_bin_testflatpackedout_orig.out
1779 cp test_fcb_read_testflatout.out > $(DATADIRO)/test_fcb_read_testflatout_orig.out
1780 cp test_fcb_read_testflatpackedout.out > $(DATADIRO)/test_fcb_read_testflatpackedout_orig.out
1781 cp XRD1621.cbf > $(DATADIRO)/XRD1621_orig.cbf
1782 cp XRD1621_I4encbC100.cbf > $(DATADIRO)/XRD1621_I4encbC100_orig.cbf
1783 cp minicbf_orig_3Jul14.h5 > $(DATADIRO)/minicbf_orig_3Jul14.h5
1784
1785 restore_sigs_only: $(NEWTESTOUTPUT) $(DATADIRS)
1786 $(SIGNATURE) < adscconverted_flat.cbf > $(DATADIRS)/adscconverted_flat_orig.cbf$(SEXT)
1787 $(SIGNATURE) < adscconverted.cbf > $(DATADIRS)/adscconverted_orig.cbf$(SEXT)
1788 $(SIGNATURE) < converted_flat.cbf > $(DATADIRS)/converted_flat_orig.cbf$(SEXT)
1789 $(SIGNATURE) < converted.cbf > $(DATADIRS)/converted_orig.cbf$(SEXT)
1790 $(SIGNATURE) < insulin_pilatus6mconverted.cbf > $(DATADIRS)/insulin_pilatus6mconverted_rev_orig.cbf$(SEXT)
1791 $(SIGNATURE) < insulin_pilatus6mconverted.cbf > $(DATADIRS)/insulin_pilatus6mconverted_orig_rev22Feb15.cbf.h5$(SEXT)
1792 $(SIGNATURE) < insulin_pilatus6mconverted.cbf > $(DATADIRS)/insulin_pilatus6mconverted_orig.cbf.h5.cbf$(SEXT)
1793 $(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf > $(DATADIRS)/insulin_pilatus6mconverted_v2_orig.cbf$(SEXT)
1794 $(SIGNATURE) < mb_LP_1_001.cbf$ > $(DATADIRS)/mb_LP_1_001_orig.cbf$(SEXT)
1795 $(SIGNATURE) < testcell.prt > $(DATADIRS)/testcell_orig.prt$(SEXT)
1796 $(SIGNATURE) < test_xds_bin_testflatout.out > $(DATADIRS)/test_xds_bin_testflatout_orig.out$(SEXT)
1797 $(SIGNATURE) < test_xds_bin_testflatpackedout.out > $(DATADIRS)/test_xds_bin_testflatpackedout_orig.out$(SEXT)
1798 $(SIGNATURE) < test_fcb_read_testflatout.out > $(DATADIRS)/test_fcb_read_testflatout_orig.out$(SEXT)
1799 $(SIGNATURE) < test_fcb_read_testflatpackedout.out > $(DATADIRS)/test_fcb_read_testflatpackedout_orig.out$(SEXT)
1800 $(SIGNATURE) < XRD1621.cbf > $(DATADIRS)/XRD1621_orig.cbf$(SEXT)
1801 $(SIGNATURE) < XRD1621_I4encbC100.cbf > $(DATADIRS)/XRD1621_I4encbC100_orig.cbf$(SEXT)
1802 $(SIGNATURE) < minicbf_orig_3Jul14.h5 > $(DATADIRS)/minicbf_orig_3Jul14.h5$(SEXT)
1803 restore_signatures: restore_output restore_sigs_only
1804
1805 #
1806 # Basic Tests
1807 #
1808
1809 basic: $(BIN)/makecbf $(BIN)/img2cif $(BIN)/cif2cbf $(TESTINPUT_BASIC)
1810 $(BIN)/makecbf example.mar2300 makecbf.cbf
1811 $(BIN)/img2cif -c flatpacked -m headers -d digest \
1812 -e base64 example.mar2300 img2cif_packed.cif
1813 $(BIN)/img2cif -c canonical -m headers -d digest \
1814 -e base64 example.mar2300 img2cif_canonical.cif
1815 $(BIN)/img2cif -c flatpacked -m headers -d digest \
1816 -e none example.mar2300 img2cif_packed.cbf
1817 $(BIN)/img2cif -c canonical -m headers -d digest \
1818 -e none example.mar2300 img2cif_canonical.cbf
1819 $(BIN)/cif2cbf -e none -c flatpacked \
1820 img2cif_canonical.cif cif2cbf_packed.cbf
1821 $(BIN)/cif2cbf -e none -c canonical \
1822 img2cif_packed.cif cif2cbf_canonical.cbf
1823 -cmp cif2cbf_packed.cbf makecbf.cbf
1824 -cmp cif2cbf_packed.cbf img2cif_packed.cbf
1825 -cmp cif2cbf_canonical.cbf img2cif_canonical.cbf
1826
1827
1828 #
1829 # Extra Tests
1830 #
1831 ifneq ($(F90C),)
1832 extra: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf \
1833 $(BIN)/minicbf2nexus $(BIN)/cbf2nexus $(BIN)/nexus2cbf $(BIN)/testcell \
1834 $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \
1835 $(BIN)/test_xds_binary $(BIN)/test_fcb_read_image $(BIN)/convert_minicbf \
1836 $(BIN)/sauter_test $(BIN)/adscimg2cbf $(BIN)/cbf2adscimg \
1837 $(BIN)/changtestcompression $(BIN)/tiff2cbf \
1838 $(BIN)/testhdf5 $(BIN)/testalloc \
1839 $(BIN_TESTULP) \
1840 basic $(TESTINPUT_EXTRA) $(TESTOUTPUT) $(EXAMPLES)/batch_convert_minicbf.sh \
1841 $(TEMPLATES)/template_X4_lots_M1S4.cbf
1842 else
1843 extra: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf \
1844 $(BIN)/minicbf2nexus $(BIN)/cbf2nexus $(BIN)/nexus2cbf $(BIN)/testcell \
1845 $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \
1846 $(BIN)/convert_minicbf \
1847 $(BIN)/sauter_test $(BIN)/adscimg2cbf $(BIN)/cbf2adscimg \
1848 $(BIN)/testhdf5 $(BIN)/testalloc \
1849 $(BIN_TESTULP) \
1850 basic $(TESTINPUT_EXTRA) $(TESTOUTPUT) $(EXAMPLES)/batch_convert_minicbf.sh
1851 endif
1852 $(TIME) $(BIN)/cif2cbf -e hex -c none \
1853 makecbf.cbf cif2cbf_ehcn.cif
1854 $(TIME) $(BIN)/cif2cbf -e none -c flatpacked \
1855 cif2cbf_ehcn.cif cif2cbf_encp.cbf; rm cif2cbf_ehcn.cif
1856 -cmp makecbf.cbf cif2cbf_encp.cbf
1857 $(TIME) $(BIN)/cif2cbf -i 9ins.cif -o 9ins.cbf
1858 -cmp 9ins.cif 9ins.cbf
1859 $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_mar345_2300x2300.cbf -F example.mar2300 converted_flat.cbf
1860 -cmp converted_flat.cbf converted_flat_orig.cbf
1861 $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_mar345_2300x2300.cbf example.mar2300 converted.cbf
1862 -cmp converted.cbf converted_orig.cbf
1863 -$(TIME) $(BIN)/testcell < testcell.dat > testcell.prt
1864 -cmp testcell.prt testcell_orig.prt
1865 $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_adscquantum315_3072x3072.cbf -F -d adscquantum315 mb_LP_1_001.img adscconverted_flat.cbf
1866 -cmp adscconverted_flat.cbf adscconverted_flat_orig.cbf
1867 $(TIME) $(BIN)/convert_image -p $(TEMPLATES)/template_adscquantum315_3072x3072.cbf -d adscquantum315 mb_LP_1_001.img adscconverted.cbf
1868 -cmp adscconverted.cbf adscconverted_orig.cbf
1869 $(TIME) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img
1870 -cmp mb_LP_1_001.cbf mb_LP_1_001_orig.cbf
1871 ifneq ($(CLEANTESTS),)
1872 mv mb_LP_1_001.cbf nmb_LP_1_001.cbf
1873 else
1874 cp mb_LP_1_001.cbf nmb_LP_1_001.cbf
1875 endif
1876 $(TIME) $(BIN)/cbf2adscimg nmb_LP_1_001.cbf
1877 -cmp nmb_LP_1_001.img mb_LP_1_001.img
1878 rm nmb_LP_1_001.cbf
1879 ifneq ($(CLEANTESTS),)
1880 rm nmb_LP_1_001.img
1881 endif
1882 $(TIME) $(BIN)/convert_minicbf -p $(TEMPLATES)/template_pilatus6m_2463x2527.cbf -d pilatus6m -v 1 insulin_pilatus6m.cbf insulin_pilatus6mconverted.cbf
1883 -cmp insulin_pilatus6mconverted.cbf insulin_pilatus6mconverted_rev_orig.cbf
1884 -$(TIME) $(BIN)/convert_minicbf -p $(TEMPLATES)/template_pilatus6m_2463x2527.cbf -d pilatus6m insulin_pilatus6m.cbf insulin_pilatus6mconverted_v2.cbf
1885 -cmp insulin_pilatus6mconverted_v2.cbf insulin_pilatus6mconverted_v2_orig.cbf
1886 (CBF_CONVERT_MINICBF_PATH=$(BIN); export CBF_CONVERT_MINICBF_PATH; \
1887 $(EXAMPLES)/batch_convert_minicbf.sh "." "minicbf_test" \
1888 "X4_lots_M1S4_1_*.cbf" $(TEMPLATES)/template_X4_lots_M1S4.cbf)
1889 -(HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \
1890 $(TIME) $(BIN)/cif2cbf -5 w -O $(HDF5REGISTER) -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted.cbf.h5)
1891 -(HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \
1892 $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cI -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encI.cbf.h5)
1893 -(HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \
1894 $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encp.cbf.h5)
1895 -(HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \
1896 $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cb -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encb.cbf.h5)
1897 -(HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \
1898 $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cc -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encc.cbf.h5)
1899 -(HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \
1900 $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cz -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encz.cbf.h5)
1901 -(HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \
1902 $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -cl -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_encl.cbf.h5)
1903 -(HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \
1904 $(TIME) $(BIN)/cif2cbf -5 w $(HDF5REGISTER) -en -c2 -i insulin_pilatus6mconverted.cbf -o insulin_pilatus6mconverted_enc2.cbf.h5)
1905 -(HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \
1906 $(BIN)/h5dump insulin_pilatus6mconverted_orig_rev22Feb15.cbf.h5 | $(ALLBUTONE) > insulin_pilatus6mconverted_orig_rev22Feb15.cbf.h5.dump)
1907 -(HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \
1908 $(BIN)/h5dump insulin_pilatus6mconverted.cbf.h5 | $(ALLBUTONE) > insulin_pilatus6mconverted.cbf.h5.dump)
1909 -$(DIFF) insulin_pilatus6mconverted_orig_rev22Feb15.cbf.h5.dump insulin_pilatus6mconverted.cbf.h5.dump
1910 -rm -f insulin_pilatus6mconverted_orig_rev22Feb15.cbf.h5.dump
1911 -rm -f insulin_pilatus6mconverted.cbf.h5.dump
1912 -(HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \
1913 $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted.cbf.h5 -o insulin_pilatus6mconverted.cbf.h5.cbf)
1914 -cmp insulin_pilatus6mconverted.cbf.h5.cbf insulin_pilatus6mconverted_orig.cbf.h5.cbf
1915 -(HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \
1916 $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encp.cbf.h5 -o insulin_pilatus6mconverted_encp.cbf.h5.cbf)
1917 -cmp insulin_pilatus6mconverted_encp.cbf.h5.cbf insulin_pilatus6mconverted_orig.cbf.h5.cbf
1918 -(HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \
1919 $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encb.cbf.h5 -o insulin_pilatus6mconverted_encb.cbf.h5.cbf)
1920 -cmp insulin_pilatus6mconverted_encb.cbf.h5.cbf insulin_pilatus6mconverted_orig.cbf.h5.cbf
1921 -(HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \
1922 $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encI.cbf.h5 -o insulin_pilatus6mconverted_encI.cbf.h5.cbf)
1923 -cmp insulin_pilatus6mconverted_encI.cbf.h5.cbf insulin_pilatus6mconverted_orig.cbf.h5.cbf
1924 -(HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \
1925 $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encc.cbf.h5 -o insulin_pilatus6mconverted_encc.cbf.h5.cbf)
1926 -cmp insulin_pilatus6mconverted_encc.cbf.h5.cbf insulin_pilatus6mconverted_orig.cbf.h5.cbf
1927 -(HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \
1928 $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encz.cbf.h5 -o insulin_pilatus6mconverted_encz.cbf.h5.cbf)
1929 -cmp insulin_pilatus6mconverted_encz.cbf.h5.cbf insulin_pilatus6mconverted_orig.cbf.h5.cbf
1930 -(HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \
1931 $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_encl.cbf.h5 -o insulin_pilatus6mconverted_encl.cbf.h5.cbf)
1932 -cmp insulin_pilatus6mconverted_encl.cbf.h5.cbf insulin_pilatus6mconverted_orig.cbf.h5.cbf
1933 -(HDF5_PLUGIN_PATH=$(SOLIB); export HDF5_PLUGIN_PATH; \
1934 $(TIME) $(BIN)/cif2cbf -5 rn $(HDF5REGISTER) -en -cp -i insulin_pilatus6mconverted_enc2.cbf.h5 -o insulin_pilatus6mconverted_enc2.cbf.h5.cbf)
1935 -cmp insulin_pilatus6mconverted_enc2.cbf.h5.cbf insulin_pilatus6mconverted_orig.cbf.h5.cbf
1936 $(TINE) $(BIN)/test_cbf_airy_disk
1937 $(TIME) $(BIN)/testalloc
1938 $(TIME) $(BIN)/testhdf5; rm -f testfile.h5
1939 ifneq ($(CBF_USE_ULP),)
1940 $(TIME) $(BIN)/testulp
1941 endif
1942 cd $(MINICBF_TEST); $(TIME) ../$(BIN)/minicbf2nexus -c zlib \
1943 -C config $(HDF5REGISTER) -o minicbf.h5 ../X4_lots_M1S4_1_*.cbf
1944 cd $(MINICBF_TEST); $(TIME) ../$(BIN)/h5dump ../minicbf_orig_3Jul14.h5 | $(ALLBUTONE) > minicbf_original.dump
1945 cd $(MINICBF_TEST); $(TIME) ../$(BIN)/h5dump minicbf.h5 | $(ALLBUTONE) > minicbf.dump
1946 -cd $(MINICBF_TEST); $(DIFF) minicbf_original.dump minicbf.dump
1947 cd $(MINICBF_TEST); rm -f minicbf_original.dump
1948 cd $(MINICBF_TEST); rm -f minicbf.dump
1949 cd $(MINICBF_TEST); rm -f minicbf.h5
1950 cd $(MINICBF_TEST); $(TIME) ../$(BIN)/cbf2nexus -c zlib \
1951 --list -o i19-1.h5 ../1191_00005.cbf
1952 cd $(MINICBF_TEST); $(TIME) ../$(BIN)/nexus2cbf \
1953 -o i19-1.cbf i19-1.h5
1954 cd $(MINICBF_TEST); $(TIME) ../$(BIN)/cbf2nexus -c zlib \
1955 --list -o i19-2.h5 i19-1.cbf
1956 cd $(MINICBF_TEST); $(TIME) ../$(BIN)/nexus2cbf \
1957 -o i19-2.cbf i19-2.h5
1958 cd $(MINICBF_TEST); $(TIME) ../$(BIN)/h5dump i19-1.h5 | $(ALLBUTONE) > i19-1.dump
1959 cd $(MINICBF_TEST); $(TIME) ../$(BIN)/h5dump i19-2.h5 | $(ALLBUTONE) > i19-2.dump
1960 -cd $(MINICBF_TEST); $(DIFF) i19-1.dump i19-2.dump
1961 -cd $(MINICBF_TEST); $(DIFF) i19-1.cbf i19-2.cbf
1962 $(TIME) $(BIN)/testreals
1963 -cmp testrealin.cbf testrealout.cbf
1964 $(TIME) $(BIN)/testflat
1965 -cmp testflatin.cbf testflatout.cbf
1966 $(TIME) $(BIN)/testflatpacked
1967 -cmp testflatpackedin.cbf testflatpackedout.cbf
1968 ifneq ($(F90C),)
1969 echo testflatout.cbf | $(TIME) $(BIN)/test_xds_binary > test_xds_bin_testflatout.out
1970 -$(DIFF) test_xds_bin_testflatout.out test_xds_bin_testflatout_orig.out
1971 echo testflatpackedout.cbf | $(TIME) $(BIN)/test_xds_binary > test_xds_bin_testflatpackedout.out
1972 -$(DIFF) test_xds_bin_testflatpackedout.out test_xds_bin_testflatpackedout_orig.out
1973 echo testflatout.cbf | $(TIME) $(BIN)/test_fcb_read_image > test_fcb_read_testflatout.out
1974 -$(DIFF) test_fcb_read_testflatout.out test_fcb_read_testflatout_orig.out
1975 echo testflatpackedout.cbf | $(TIME) $(BIN)/test_fcb_read_image > test_fcb_read_testflatpackedout.out
1976 -$(DIFF) test_fcb_read_testflatpackedout.out test_fcb_read_testflatpackedout_orig.out
1977 endif
1978 $(TIME) $(BIN)/sauter_test
1979 $(TIME) $(BIN)/changtestcompression
1980 $(TIME) (LD_LIBRARY_PATH=$(LIB);export LD_LIBRARY_PATH;$(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf)
1981 -$(DIFF) XRD1621.cbf XRD1621_orig.cbf
1982 $(TIME) $(BIN)/cif2cbf -I 4 -C 100. -L 0. -e n -c b -i XRD1621.cbf -o XRD1621_I4encbC100.cbf
1983 -$(DIFF) XRD1621_I4encbC100.cbf XRD1621_I4encbC100_orig.cbf
1984
1985 ifneq ($(F90C),)
1986 extra_sigs_only: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf $(BIN)/testcell \
1987 $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \
1988 $(BIN)/test_xds_binary $(BIN)/test_fcb_read_image $(BIN)/convert_minicbf \
1989 $(BIN)/sauter_test $(BIN)/adscimg2cbf \
1990 $(BIN)/cbf2adscimg \
1991 $(BIN)/changtestcompression $(BIN)/tiff2cbf\
1992 basic $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS)
1993 else
1994 extra_sigs_only: $(BIN)/convert_image $(BIN)/convert_minicbf $(BIN)/cif2cbf $(BIN)/testcell \
1995 $(BIN)/testreals $(BIN)/testflat $(BIN)/testflatpacked \
1996 $(BIN)/convert_minicbf \
1997 $(BIN)/sauter_test $(BIN)/adscimg2cbf\
1998 $(BIN)/cbf2adscimg \
1999 $(BIN)/changtestcompression $(BIN)/tiff2cbf\
2000 basic $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS)
2001 endif
2002 $(TIME) $(BIN)/cif2cbf -e hex -c none \
2003 makecbf.cbf cif2cbf_ehcn.cif
2004 $(TIME) $(BIN)/cif2cbf -e none -c flatpacked \
2005 cif2cbf_ehcn.cif cif2cbf_encp.cbf; rm cif2cbf_ehcn.cif
2006 -cmp makecbf.cbf cif2cbf_encp.cbf
2007 $(TIME) $(BIN)/cif2cbf -i 9ins.cif -o 9ins.cbf
2008 -cmp 9ins.cif 9ins.cbf
2009 $(TIME) $(BIN)/convert_image -F example.mar2300 converted_flat.cbf
2010 -$(SIGNATURE) < converted_flat.cbf | $(DIFF) - converted_flat_orig.cbf$(SEXT); rm converted_flat.cbf
2011 $(TIME) $(BIN)/convert_image example.mar2300 converted.cbf
2012 -$(SIGNATURE) < converted.cbf | $(DIFF) - converted_orig.cbf$(SEXT); rm converted.cbf
2013 -$(TIME) $(BIN)/testcell < testcell.dat | \
2014 $(SIGNATURE) | $(DIFF) - testcell_orig.prt$(SEXT)
2015 $(TIME) $(BIN)/convert_image -F -d adscquantum315 mb_LP_1_001.img adscconverted_flat.cbf
2016 -$(SIGNATURE) < adscconverted_flat.cbf | $(DIFF) - adscconverted_flat_orig.cbf$(SEXT)
2017 $(TIME) $(BIN)/convert_image -d adscquantum315 mb_LP_1_001.img adscconverted.cbf
2018 -$(SIGNATURE) < adscconverted.cbf | $(DIFF) - adscconverted_orig.cbf$(SEXT); rm adscconverted.cbf
2019 $(TIME) $(BIN)/adscimg2cbf --no_pad --cbf_packed,flat mb_LP_1_001.img
2020 -$(SIGNATURE) < mb_LP_1_001.cbf | $(DIFF) - mb_LP_1_001_orig.cbf$(SEXT)
2021 mv mb_LP_1_001.cbf nmb_LP_1_001.cbf
2022 $(TIME) $(BIN)/cbf2adscimg nmb_LP_1_001.cbf
2023 -cmp nmb_LP_1_001.img mb_LP_1_001.img
2024 rm nmb_LP_1_001.cbf
2025 rm nmb_LP_1_001.img
2026 $(TIME) $(BIN)/convert_minicbf -d pilatus6m -v 1 insulin_pilatus6m.cbf insulin_pilatus6mconverted.cbf
2027 -$(SIGNATURE) < insulin_pilatus6mconverted.cbf | $(DIFF) - insulin_pilatus6mconverted_rev_orig.cbf$(SEXT); rm insulin_pilatus6mconverted.cbf
2028 $(TIME) $(BIN)/convert_minicbf -d pilatus6m insulin_pilatus6m.cbf insulin_pilatus6mconverted_v2.cbf
2029 -$(SIGNATURE) < insulin_pilatus6mconverted_v2.cbf | $(DIFF) - insulin_pilatus6mconverted_v2_orig.cbf$(SEXT); rm insulin_pilatus6mconverted_v2.cbf
2030 $(TIME) $(BIN)/testreals
2031 -cmp testrealin.cbf testrealout.cbf
2032 $(TIME) $(BIN)/testflat
2033 -cmp testflatin.cbf testflatout.cbf
2034 $(TIME) $(BIN)/testflatpacked
2035 -cmp testflatpackedin.cbf testflatpackedout.cbf
2036 ifneq ($(F90C),)
2037 echo testflatout.cbf | $(TIME) $(BIN)/test_xds_binary | \
2038 $(SIGNATURE) | $(DIFF) - test_xds_bin_testflatout_orig.out$(SEXT)
2039 echo testflatpackedout.cbf | $(TIME) $(BIN)/test_xds_binary | \
2040 $(SIGNATURE) | $(DIFF) - test_xds_bin_testflatpackedout_orig.out$(SEXT)
2041 echo testflatout.cbf | $(TIME) $(BIN)/test_fcb_read_image | \
2042 $(SIGNATURE) | $(DIFF) - test_fcb_read_testflatout_orig.out$(SEXT)
2043 echo testflatpackedout.cbf | $(TIME) $(BIN)/test_fcb_read_image | \
2044 $(SIGNATURE) | $(DIFF) - test_fcb_read_testflatpackedout_orig.out$(SEXT)
2045 endif
2046 $(TIME) $(BIN)/sauter_test
2047 $(TIME) $(BIN)/changtestcompression
2048 $(TIME) (LD_LIBRARY_PATH=$(LIB);export LD_LIBRARY_PATH;$(BIN)/tiff2cbf XRD1621.tif XRD1621.cbf)
2049 $(TIME) $(BIN)/cif2cbf -I 4 -C 100. -L 0. -e n -c b -i XRD1621.cbf -o XRD1621_I4encbC100.cbf
2050 -$(SIGNATURE) < XRD1621.cbf | $(DIFF) - XRD1621_orig.cbf$(SEXT); rm XRD1621.cbf
2051 -$(SIGNATURE) < XRD1621_I4encbC100.cbf | $(DIFF) - XRD1621_I4encbC100_orig.cbf$(SEXT); rm XRD1621_I4encbC100.cbf
2052 @-rm -f adscconverted_flat.cbf
2053 @-rm -f $(TESTINPUT_BASIC) $(TESTINPUT_EXTRA) $(TESTOUTPUTSIGS)
2054 @-rm -f cif2cbf_packed.cbf makecbf.cbf \
2055 cif2cbf_packed.cbf img2cif_packed.cbf \
2056 cif2cbf_canonical.cbf img2cif_canonical.cbf
2057 @-rm -f testrealout.cbf testflatout.cbf testflatpackedout.cbf \
2058 cif2cbf_encp.cbf img2cif_canonical.cif img2cif_packed.cif 9ins.cbf
2059
2060
2061
2062 pycbftests: $(PYCBF)/_pycbf.$(PYCBFEXT)
2063 ($(RTLPEXPORTS) cd $(PYCBF); python pycbf_test1.py)
2064 ($(RTLPEXPORTS) cd $(PYCBF); python pycbf_test2.py)
2065 ($(RTLPEXPORTS) cd $(PYCBF); python pycbf_test3.py)
2066 ($(RTLPEXPORTS) cd $(PYCBF); python pycbf_test4.py)
2067 ($(RTLPEXPORTS) cd $(PYCBF); python pycbf_testfelaxes.py fel_test1.cbf > fel_test1.out)
2068 ($(RTLPEXPORTS) cd $(PYCBF); python pycbf_testfelaxes.py fel_test2.cbf > fel_test2.out)
2069 ($(RTLPEXPORTS) cd $(PYCBF); python pycbf_testfelaxes.py ../hit-20140306005258847.cbf > fel_test3.out)
2070 -$(DIFF) $(PYCBF)/fel_test1.out $(PYCBF)/fel_test1_orig.out
2071 -$(DIFF) $(PYCBF)/fel_test2.out $(PYCBF)/fel_test2_orig.out
2072 -$(DIFF) $(PYCBF)/fel_test3.out $(PYCBF)/fel_test3_orig.out
2073
2074 javatests: $(BIN)/ctestcbf $(BIN)/testcbf.class $(SOLIB)/libcbf_wrap.so
2075 $(BIN)/ctestcbf > testcbfc.txt
2076 $(LDPREFIX) java -cp $(JCBF)/cbflib-$(VERSION).jar:$(BIN) testcbf > testcbfj.txt
2077 $(DIFF) testcbfc.txt testcbfj.txt
2078
2079 dectristests: $(BIN)/cbf_template_t $(TEMPLATES)/cbf_test_orig.out
2080 (cd templates; ../bin/cbf_template_t; diff -a -u cbf_test_orig.out cbf_template_t.out)
2081
2082 #
2083 # Remove all non-source files
2084 #
2085 empty:
2086 @-rm -f $(LIB)/*.o
2087 @-rm -f $(LIB)/libcbf.a
2088 @-rm -f $(LIB)/libfcb.a
2089 @-rm -f $(LIB)/libimg.a
2090 @-rm -f $(LIB)/_pycbf.$(PYCBFEXT)
2091 @-rm -f $(LIB)/*tiff*
2092 @-rm -f $(LIB)/*hdf5*
2093 @-rm -f $(PYCBF)/_pycbf.$(PYCBFEXT)
2094 @-rm -rf $(PYCBF)/build/*
2095 @-rm -f $(PYCBF)/newtest1.cbf
2096 @-rm -f $(PYCBF)/fel_test1.out
2097 @-rm -f $(PYCBF)/fel_test2.out
2098 @-rm -rf $(BIN)/adscimg2cbf*
2099 @-rm -rf $(BIN)/cbf2adscimg*
2100 @-rm -rf $(BIN)/makecbf*
2101 @-rm -rf $(BIN)/img2cif*
2102 @-rm -rf $(BIN)/cif2cbf*
2103 @-rm -rf $(BIN)/cbf2nexus*
2104 @-rm -rf $(BIN)/minicbf2nexus*
2105 @-rm -rf $(BIN)/nexus2cbf*
2106 @-rm -rf $(BIN)/convert_image*
2107 @-rm -rf $(BIN)/convert_minicbf*
2108 @-rm -rf $(BIN)/test_fcb_read_image*
2109 @-rm -rf $(BIN)/test_xds_binary*
2110 @-rm -rf $(BIN)/testcell*
2111 @-rm -rf $(BIN)/cif2c*
2112 @-rm -rf $(BIN)/test*
2113 @-rm -rf $(BIN)/cbf_template_t*
2114 @-rm -rf $(BIN)/sauter_test*
2115 @-rm -rf $(BIN)/arvai_test*
2116 @-rm -rf $(BIN)/changtestcompression*
2117 @-rm -rf $(BIN)/*tiff*
2118 @-rm -rf $(BIN)/fax*
2119 @-rm -rf $(BIN)/pal*
2120 @-rm -rf $(BIN)/h5*
2121 @-rm -rf $(BIN)/rgb*
2122 @-rm -rf $(BIN)/sequence*
2123 @-rm -rf $(BIN)/gif*
2124 @-rm -rf $(BIN)/thumbnail*
2125 @-rm -rf $(BIN)/test_cbf_airy_disk
2126 @-rm -f makecbf.cbf
2127 @-rm -f img2cif_packed.cif
2128 @-rm -f img2cif_canonical.cif
2129 @-rm -f img2cif_packed.cbf
2130 @-rm -f img2cif_canonical.cbf
2131 @-rm -f img2cif_raw.cbf
2132 @-rm -f cif2cbf_packed.cbf
2133 @-rm -f cif2cbf_canonical.cbf
2134 @-rm -f converted.cbf
2135 @-rm -f adscconverted.cbf
2136 @-rm -f converted_flat.cbf
2137 @-rm -f adscconverted_flat.cbf
2138 @-rm -f adscconverted_flat_rev.cbf
2139 @-rm -f mb_LP_1_001.cbf
2140 @-rm -f cif2cbf_ehcn.cif
2141 @-rm -f cif2cbf_encp.cbf
2142 @-rm -f 9ins.cbf
2143 @-rm -f 9ins.cif
2144 @-rm -f testcell.prt
2145 @-rm -f example.mar2300
2146 @-rm -f converted_orig.cbf
2147 @-rm -f adscconverted_orig.cbf
2148 @-rm -f converted_flat_orig.cbf
2149 @-rm -f adscconverted_flat_orig.cbf
2150 @-rm -f adscconverted_flat_rev_orig.cbf
2151 @-rm -f mb_LP_1_001_orig.cbf
2152 @-rm -f insulin_pilatus6mconverted*.cbf
2153 @-rm -f insulin_pilatus6mconverted*.h5
2154 @-rm -f insulin_pilatus6m.cbf
2155 @-rm -f testrealin.cbf
2156 @-rm -f testrealout.cbf
2157 @-rm -f testflatin.cbf
2158 @-rm -f testflatout.cbf
2159 @-rm -f testflatpackedin.cbf
2160 @-rm -f testflatpackedout.cbf
2161 @-rm -f CTC.cbf
2162 @-rm -f test_fcb_read_testflatout.out
2163 @-rm -f test_fcb_read_testflatpackedout.out
2164 @-rm -f test_xds_bin_testflatpackedout.out
2165 @-rm -f test_xds_bin_testflatout.out
2166 @-rm -f test_fcb_read_testflatout_orig.out
2167 @-rm -f test_fcb_read_testflatpackedout_orig.out
2168 @-rm -f test_xds_bin_testflatpackedout_orig.out
2169 @-rm -f test_xds_bin_testflatout_orig.out
2170 @-rm -f mb_LP_1_001.img
2171 @-rm -f 9ins.cif
2172 @-rm -f testcell_orig.prt
2173 @-rm -f $(DECTRIS_EXAMPLES)/cbf_template_t.out
2174 @-rm -f XRD1621.cbf
2175 @-rm -f XRD1621_orig.cbf
2176 @-rm -f XRD1621_I4encbC100_orig.cbf
2177 @-rm -f XRD1621_I4encbC100.cbf
2178 @-rm -f minicbf_orig_3Jul14.h5
2179 @-rm -f $(SRC)/fcb_exit_binary.f90
2180 @-rm -f $(SRC)/fcb_next_binary.f90
2181 @-rm -f $(SRC)/fcb_open_cifin.f90
2182 @-rm -f $(SRC)/fcb_packed.f90
2183 @-rm -f $(SRC)/fcb_read_bits.f90
2184 @-rm -f $(SRC)/fcb_read_image.f90
2185 @-rm -f $(SRC)/fcb_read_xds_i2.f90
2186 @-rm -f $(EXAMPLES)/test_fcb_read_image.f90
2187 @-rm -f $(EXAMPLES)/test_xds_binary.f90
2188 @-rm -f symlinksdone
2189 @-rm -f $(TESTOUTPUT) *$(SEXT)
2190 @-rm -f $(SOLIB)/*.o
2191 @-rm -f $(SOLIB)/libcbf_wrap.so
2192 @-rm -f $(SOLIB)/libjcbf.so
2193 @-rm -f $(SOLIB)/libimg.so
2194 @-rm -f $(SOLIB)/libfcb.so
2195 @-rm -f $(SOLIB)/libcbf.so
2196 @-rm -rf $(JCBF)/org
2197 @-rm -f $(JCBF)/*.java
2198 @-rm -f $(JCBF)/jcbf_wrap.c
2199 @-rm -f $(SRC)/cbf_wrap.c
2200 @-rm -f $(BIN)/ctestcbf $(BIN)/testcbf.class testcbfc.txt testcbfj.txt
2201 @-rm -rf $(REGEX)
2202 @-rm -rf $(TIFF)
2203 @-rm -rf $(INCLUDE)/tiff*
2204 @-rm -rf $(INCLUDE)/H5*
2205 @-rm -rf $(INCLUDE)/hdf5*
2206 @-rm -rf share
2207 @-rm -rf $(MINICBF_TEST)/i19*
2208 @-rm -rf solib
2209 @-rm -f thaumatin_die_M1S5_1_0005_2.cbf
2210 @-rm -f 1191_00005.cbf
2211 @-rm -f XRD1621.tif
2212 @-rm -f md5tmp
2213 @-rm -rf $(PYCBF)/build
2214 @-rm -f *_old
2215 @-rm -f X4_lots_M1S4_1_*.cbf
2216 @-rm -f testfile.h5
2217 @-rm -f hit-20140306005258847.cbf
2218 ./.undosymlinks
2219
2220 #
2221 # Remove temporary files
2222 #
2223 clean:
2224 @-rm -f core
2225 @-rm -f *.o
2226 @-rm -f *.u
2227 #
2228 # Restore to distribution state
2229 #
2230 distclean: clean empty
2231
2232 #
2233 # Create a Tape Archive for distribution
2234 #
2235
2236 tar: $(DOCUMENTS) $(SOURCE) $(SRC)/cbf.stx $(HEADERS) $(M4FILES)\
2237 $(EXAMPLES) \
2238 README.html README Makefile \
2239 $(JPEGS)
2240 -/bin/rm -f CBFlib.tar*
2241 tar cvBf CBFlib.tar \
2242 $(DOCUMENTS) $(SOURCE) $(SRC)/cbf.stx $(HEADERS) $(M4FILES)\
2243 $(EXAMPLES) \
2244 README.html README Makefile \
2245 $(JPEGS)
2246 gzip --best CBFlib.tar
2247