Commit 56aa6cb9 authored by Zolnierczuk, Piotr's avatar Zolnierczuk, Piotr
Browse files

makefile cleanup

parent ed525d52
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ sources/makeconf
sources/extract_figures
sources/plain_figures
sources/mxx
sources/nxs2echo
#
tests/test[a-z]*
!tests/test[a-z]*.[Ff]90
+14 −0
Original line number Diff line number Diff line
@@ -7,6 +7,8 @@
2. GR Framework [https://gr-framework.org]()
3. TeX Live [https://www.tug.org/texlive]()
4. Python and some SciPy packages
5. HDF5 Libraries [https://www.hdfgroup.org]()


### Fortran Compiler
Fortran 2008 compatible compiler, for example
@@ -42,6 +44,16 @@ Two convenient methods exist:
 details).


### HDF5 Libraries
To allow reading SNS NeXus files you must install HDF5 library. 
See [https://www.hdfgroup.org/downloads/hdf5]() for more details.

*Notes:*

* For Ubuntu `apt install libhdf5-dev`
* For macOS use `brew install hdf5`



## Installation

@@ -64,6 +76,8 @@ The defaults are usually safe.
	FCFLAGS = -g
	#external libraries (set to empty to disable)
	GRDIR   = /usr/local/gr
	HDF5DIR = /us



### Build and install
+0 −1
Original line number Diff line number Diff line
@@ -11,7 +11,6 @@ export MKDIR_P=mkdir -p

SUBDIRS=python sources scripts tests examples doc


all:
	@for s in $(SUBDIRS); do $(MAKE) -C $$s all; done

Makefile.common

0 → 100644
+34 −0
Original line number Diff line number Diff line
# -*- Makefile -*-
# vim: filetype=make

MAKEDEPEND := $(shell command -v makedepend 2> /dev/null)
MAKEDEPF90 := $(shell command -v makedepf90 2> /dev/null)
HASMAKEDEP := $(and $(MAKEDEPEND),$(MAKEDEPF90))

ifneq ($(GRDIR),)
ifeq  ($(GRDIR),pkg-config)
LDFLAGS += $(shell pkg-config --libs-only-L GR) 
else
LDFLAGS += -Wl,-rpath,$(GRDIR)/lib -L$(GRDIR)/lib -lGR
endif
LDLIBS  += -lGR
endif

ifneq ($(HDF5DIR),)
ifeq  ($(HDF5DIR),pkg-config)
FCFLAGS += $(shell pkg-config --cflags      hdf5)
LDFLAGS += $(shell pkg-config --libs-only-L hdf5) 
else
FCFLAGS += -I$(HDF5DIR)/include
LDFLAGS += -L$(HDF5DIR)/lib 
endif
LDLIBS  += -lhdf5_fortran -lhdf5
endif


%.o: %.F90
	$(FC) $(FCFLAGS) $(DEFINES) -c -o $@ $<

%.o: %.f90
	$(FC) $(FCFLAGS)            -c -o $@ $<
+3 −1
Original line number Diff line number Diff line
@@ -14,4 +14,6 @@ FCFLAGS = -g

#external libraries (set to empty to disable)
GRDIR   = /usr/local/gr
HDF5DIR = /usr/local/Cellar/hdf5/1.14.3_1/lib  # location of pkg-config files
HDF5DIR = pkg-config # we'll use pkg-config to search for libs

Loading