| 1 |
# Makefile to compile cif2hkl. |
| 2 |
# required: gfortran |
| 3 |
# |
| 4 |
# just type: make; sudo make install |
| 5 |
|
| 6 |
# simple one-shot compile |
| 7 |
all: |
| 8 |
${FC} -ffree-line-length-512 \ |
| 9 |
CFML/CFML_GlobalDeps_Linux.f90 CFML/CFML_Math_General.f90 \ |
| 10 |
CFML/CFML_String_Utilities_gf.f90 CFML/CFML_Math_3D.f90 \ |
| 11 |
CFML/CFML_Symmetry_Tables.f90 CFML/CFML_Scattering_Chemical_Tables.f90 \ |
| 12 |
CFML/CFML_Crystallographic_Symmetry.f90 CFML/CFML_Crystal_Metrics.f90 \ |
| 13 |
CFML/CFML_Reflections_Utilities.f90 CFML/CFML_Atom_TypeDef.f90 \ |
| 14 |
CFML/CFML_Geometry_Calc.f90 CFML/CFML_Molecular_Crystals.f90 \ |
| 15 |
CFML/CFML_Diffraction_Patterns.f90 CFML/CFML_Magnetic_Groups.f90 \ |
| 16 |
CFML/CFML_EisPack.f90 CFML/CFML_IO_Formats.f90 \ |
| 17 |
CFML/CFML_Structure_Factors.f90 -o cif2hkl cif2hkl.F90 -lm $(FFLAGS) $(LDFLAGS) $(CPPFLAGS) |
| 18 |
rm *.mod |
| 19 |
|
| 20 |
help: |
| 21 |
@help2man --output=man/cif2hkl.1 --version-string=1.4.7 --no-discard-stderr --no-info --name="compute diffraction structure factors" ./cif2hkl || echo "WARNING: failed to generate man page" |
| 22 |
@pandoc README.md --to pdf > man/README.pdf || echo "WARNING: skip pdf doc (missing pandoc)" |
| 23 |
@echo "Usage: install cif2hkl" |
| 24 |
@echo "make all" |
| 25 |
@echo " compile" |
| 26 |
@echo "make install" |
| 27 |
@echo " install cif2hkl" |
| 28 |
@echo "make deb" |
| 29 |
@echo " create debian package" |
| 30 |
|
| 31 |
clean: |
| 32 |
rm -f *.o *.mod cif2hkl |
| 33 |
|
| 34 |
install: |
| 35 |
install -D cif2hkl $(DESTDIR)$(prefix)/usr/bin/cif2hkl |
| 36 |
install -D man/cif2hkl.1 $(DESTDIR)$(prefix)/usr/share/man/man1/cif2hkl.1 |
| 37 |
install -D -d $(DESTDIR)$(prefix)/usr/share/doc/cif2hkl |
| 38 |
install -D man/README.pdf $(DESTDIR)$(prefix)/usr/share/doc/cif2hkl |
| 39 |
|
| 40 |
distclean: clean |
| 41 |
|
| 42 |
uninstall: |
| 43 |
-rm -f $(DESTDIR)$(prefix)/usr/bin/cif2hkl |
| 44 |
-rm -f $(DESTDIR)$(prefix)/usr/share/man/man1/cif2hkl.* |
| 45 |
-rm -fr $(DESTDIR)$(prefix)/usr/share/doc/cif2hkl |
| 46 |
|
| 47 |
test: |
| 48 |
./cif2hkl --version |
| 49 |
./cif2hkl --verbose --xtal --no-output-files examples/CaF2.cfl |
| 50 |
@echo Test OK |
| 51 |
|
| 52 |
deb: |
| 53 |
rm -rf debian |
| 54 |
cp -r packaging/debian . |
| 55 |
debuild -b || true |
| 56 |
rm -rf debian |
| 57 |
|
| 58 |
.PHONY: all install clean distclean uninstall test deb |
| 59 |
|