yat  0.14.5pre
Build Tools

yat-config

The yat-config script provides information on the local version of the library. For instance the following command shows that yat was installed at prefix '/usr/local'

 #> yat-config --prefix
/usr/local

This information can then be used in a Makefile, for example, as follows:

BIN=foo
SRC=$(BIN).cc
OBJECTS=$(SRC:.cc=.o)

CPPFLAGS+=`yat-config --cppflags`
CXXFLAGS+=`yat-config --cxxflags`
LDFLAGS+=`yat-config --ldflags`
LIBS+=`yat-config --libs`

all: $(BIN)

$(BIN): $(OBJECTS)
  $(CXX) $(LDFLAGS) $(OBJECTS) -o $(BIN) $(LIBS)

.cc.o:
  $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@

clean:; $(RM) $(OBJECTS) $(BIN)

or if you are using GNU Make and prefer using default rules, you can use yat-config with

CPPFLAGS = `yat-config --cppflags`
CXXFLAGS = `yat-config --cxxflags`
LDFLAGS = `yat-config --ldflags --libs`

all: foo

From yat 0.6 an alternative CBLAS library can be specified using YAT_CBLAS_LIB environment variable. By default the CBLAS library detected during configuration of yat is used.

For further information on yat-config use 'yat-config –help'

Since
New in yat 0.5

Autoconf Macro

For applications using GNU Autoconf there is a macro available in yat.m4. The macro can be called from your configure.ac:

YAT_CHECK_YAT([minimum-version=0.5], [action-if-found], [action-if-not-found])

The argument minimum-version should be the number (MAJOR.MINOR or MAJOR.MINOR.PATCH) of the version you require. If yat header files and library are not found or the version is not new enough, macro will complain and execute shell command action-if-not-found. A suitable action-if-not-found could be

AC_MSG_FAILURE([could not find required version of yat])

If the test is successful, HAVE_YAT is defined and action-if-found is executed. The test calls yat-config and sets variables YAT_CPPFLAGS, YAT_CXXFLAGS, YAT_LDFLAGS, YAT_LIBS, and YAT_LA_FILE. These flags can then be used in the Makefile.am. For instance:

AM_CPPFLAGS = $(YAT_CPPFLAGS)
AM_CXXFLAGS = $(YAT_CXXFLAGS)
AM_LDFLAGS = $(YAT_LDFLAGS)
LDADD = $(YAT_LIBS)
Note
this macro assumes that yat-config has been installed; yat-config was introduced in yat 0.5 and consequently this macro does not work with yat 0.4.x (or older).

Generated on Tue Sep 26 2017 02:33:29 for yat by  doxygen 1.8.5