
# These variables substituted by configure
TRUNK    = @abs_top_srcdir@
CXX      = @CXX@
CXXFLAGS = @CXXFLAGS@ 
CPPFLAGS = @CPPFLAGS@ -I$(TRUNK)/include -I$(TRUNK)/src -I$(TRUNK)/src/apps
LDFLAGS  = @LDFLAGS@
LIBS     = @LIBS@

# Directories holding libraries
LIBWORLDDIR=$(TRUNK)/src/madness/world
LIBTENSORDIR=$(TRUNK)/src/madness/tensor
LIBMISCDIR=$(TRUNK)/src/madness/misc
LIBMRADIR=$(TRUNK)/src/madness/mra
LIBTINYXMLDIR=$(TRUNK)/src/madness/external/tinyxml
LIBMUPARSERDIR=$(TRUNK)/src/madness/external/muParser

# Individual libraries
LIBWORLD=$(LIBWORLDDIR)/libMADworld@LIB_SUFFIX@
LIBTENSOR=$(LIBTENSORDIR)/libMADtensor@LIB_SUFFIX@
LIBLINALG=$(LIBTENSORDIR)/libMADlinalg@LIB_SUFFIX@
LIBMISC=$(LIBMISCDIR)/libMADmisc@LIB_SUFFIX@
LIBMRA=$(LIBMRADIR)/libMADmra@LIB_SUFFIX@
LIBTINYXML=$(LIBTINYXMLDIR)/libMADtinyxml@LIB_SUFFIX@
LIBMUPARSER=$(LIBMUPARSERDIR)/libMADmuparser@LIB_SUFFIX@



# Most scientific/numeric applications will link against these libraries
MRALIBS=$(LIBMRA) $(LIBLINALG) $(LIBTENSOR) $(LIBMISC) $(LIBMUPARSER) \
        $(LIBTINYXML) $(LIBWORLD) 

# This to enable implicit Gnumake rule for linking from single source
LDLIBS := $(MRALIBS) $(LIBS)


# Define your targets below here ... this is just an example

OBJ = a.o b.o c.o

myprog:   $(OBJ)
	$(CXX) -o $@ $^ $(LDLIBS)

