Skip to content
Snippets Groups Projects
vars.mk 1.87 KiB
#########################################################
# Variables used for FSL project compilation/installation
#########################################################

# All projects must specify a name
PROJNAME =

# Project-specific compiler/linker flags - these
# can be overridden in the project Makefile.
USRLDFLAGS  =
USRINCFLAGS =
USRCFLAGS   =
USRCXXFLAGS =
LIBS        =

# Project outputs - these variables control
# what gets installed from a project. The
# values given below are the defaults -
# they may be customised/overridden in
# project Makefiles
HFILES    = *.h
AFILES    = *.a
SOFILES   = *.so
XFILES    =
SCRIPTS   =
PYFILES   = *.py
TCLFILES  = *.tcl
TESTXILES =

# Final install destinations
# for project outputs
DESTDIR      = ${FSLDEVDIR}
dest_INCDIR  = ${DESTDIR}/include
dest_LIBDIR  = ${DESTDIR}/lib
dest_BINDIR  = ${DESTDIR}/bin
dest_TCLDIR  = ${DESTDIR}/tcl
dest_PYDIR   = ${DESTDIR}/etc/fsl/python
dest_DOCDIR  = ${DESTDIR}/doc
dest_DATADIR = ${DESTDIR}/data

# Standard header/library locations for compiling/linking
INCDIR    = ${FSLDIR}/include
LIBDIR    = ${FSLDIR}/lib
DEVINCDIR = ${FSLDEVDIR}/include
DEVLIBDIR = ${FSLDEVDIR}/lib

# Final header include directories
INCFLAGS = ${USRINCFLAGS} -I. -I${DEVINCDIR} -I${INCDIR}

#############################
# Final compiler/linker flags
#############################

# Ignore flags provided by the environment
CFLAGS   =
CXXFLAGS =
LDFLAGS  =

# All projects must use these flags for
# compilation/linking, using the form:
#
# $(CXX) $(CXXFLAGS) <project flags/files> $(LDFLAGS)
# $(CC)  $(CFLAGS)   <project flags/files> $(LDFLAGS)
#
# LDFLAGS *must* come at the end, to ensure proper linking.

LDFLAGS  += ${ARCHLDFLAGS} ${USRLDFLAGS} \
            -L. -L${DEVLIBDIR} -L${LIBDIR} \
            ${LIBS} ${ARCHLIBS}
CFLAGS   += ${ARCHCFLAGS}   ${USRCFLAGS}   ${INCFLAGS}
CXXFLAGS += ${ARCHCXXFLAGS} ${USRCXXFLAGS} ${INCFLAGS}