srcdir = @srcdir@
VPATH = @srcdir@

include ../MakeVars

LD = $(CXX)
LDLIBS += $(BLAS) -lpthread

PSILIBS = libPSI_qt.a libPSI_chkpt.a libPSI_iwl.a libPSI_psio.a libPSI_ciomr.a \
libPSI_psio.a libPSI_ipv1.a

CSRC = \
gprgid.c get_mo_info.c check_energy.c ints.c \
stringlist.c og_addr.c printing.c set_ciblks.c calc_hd_block.c \
misc.c h0block.c olsenupdt.c b2brepl.c vector.c calc_d.c \
sem_test.c slater.c form_ov.c s3_block_bz.c s1v.c s2v.c s3v.c \
s1.c s2.c s3.c gencic.c ssq.c tpool.c time.c import_vector.c

CXXSRC = detci.cc params.cc olsengraph.cc civect.cc odometer.cc slaterd.cc \
mitrush_iter.cc sem.cc sigma.cc opdm.cc tpdm.cc genci.cc mpn.cc

BINOBJ = $(CSRC:%.c=%.o) $(CXXSRC:%.cc=%.o)

# DEC/Compaq Alpha compilers apparently require this for threaded code
ifneq (,$(findstring osf, $(target)))
  COPT += -pthread
  CXXOPT += -pthread
  LDFLAGS += -pthread
endif

include ../MakeRules

ifneq ($(DODEPEND),no)
$(BINOBJ:%.o=%.d): $(DEPENDINCLUDE)
include $(BINOBJ:%.o=%.d)
endif

install_man:: detci.1
	$(MKDIRS) $(mandir)/man1
	$(INSTALL_INCLUDE) $^ $(mandir)/man1
