srcdir = @srcdir@
VPATH = @srcdir@

include ../MakeVars

LD = $(CXX)
LDLIBS += $(LAPACK) $(BLAS)
#LDLIBS += /home/users/rking/dmalloc-4.8.2/dmallocc.o
#LDLIBS += /home/users/rking/dmalloc-4.8.2/libdmallocxx.a

PSILIBS = -lPSI_qt -lPSI_chkpt -lPSI_psio -lPSI_ciomr -lPSI_ipv1

CSRC = char_table.c get_optinfo.c misc.c zmat_to_intco.c \
         zval_to_symbol.c

CXXSRC = opt.cc compute_B.cc compute_G.cc compute_H.cc compute_q.cc \
         new_geom.cc empirical_H.cc salc.cc internals.cc cartesians.cc \
         delocalize.cc irrep.cc get_syminfo.cc \
         opt_step.cc disp_user.cc make_disp.cc \
         grad_save.cc freq_grad.cc grad_energy.cc energy_save.cc \
         print_zmat.cc

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

include ../MakeRules

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

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

