ACLOCAL_AMFLAGS = -I m4

EXTRA_DIST = config.rpath m4/ChangeLog

SUBDIRS = po . src pluginsrc/TREcalc pluginsrc/fetch_nist_database

nobase_dist_pkgdata_DATA = rings/steroids/sigmasterole.bist rings/protective/dansyl.bist rings/protective/edans.bist rings/protective/fmoc.bist rings/protective/dabcyl.bist rings/protective/dabsyl.bist rings/protective/boc.bist rings/aromatic/sulfonic_acid.bist rings/aromatic/biphenyl.bist rings/aromatic/benzene.bist rings/aromatic/benzene_nok.bist  rings/aromatic/condensed/anthracene.bist rings/alifatic/4_terms/cyclobutane.bist rings/alifatic/8_terms/cyclooctane.bist rings/alifatic/5_terms/pentane.bist rings/alifatic/7_terms/cycloeptane.bist rings/alifatic/6_terms/cicloesane_chair.bist rings/alifatic/6_terms/cicloesane_boat.bist rings/IR_prediction/1carbonyl.bist rings/IR_prediction/0ketone.bist rings/insatures/cyclopentadiene.bist rings/insatures/cyclopentadiene_sp.bist rings/RNA/uracil.bist rings/aminoacids/tryptophane.bist rings/aminoacids/leucine.bist rings/aminoacids/proline.bist rings/aminoacids/cysteine.bist rings/aminoacids/serine.bist rings/aminoacids/glutamic_acid.bist rings/aminoacids/alanine.bist rings/aminoacids/threonine.bist rings/aminoacids/aspartic_acid.bist rings/aminoacids/asparaginic_acid.bist rings/aminoacids/glycine.bist rings/aminoacids/tyrosine.bist rings/aminoacids/valine.bist rings/aminoacids/arginine.bist rings/aminoacids/isoleucine.bist rings/aminoacids/glutamine.bist rings/aminoacids/phenilalanine.bist rings/aminoacids/histidine.bist rings/aminoacids/methionine.bist rings/aminoacids/lisine.bist rings/aminoacids/asparagine.bist rings/glucids/d-fructose.bist rings/glucids/d-glucose.bist rings/residual/COOH.bist rings/residual/SO3H.bist rings/porphirine/porphirine.bist

dist_doc_DATA= doc/about.html doc/bistlogo.png doc/index.html doc/internals/grammar.bist doc/tutorial/bist_tutorial.html doc/tutorial/hotkeys.html doc/tutorial/atom_properties.png doc/tutorial/bond_properties.png  doc/tutorial/example1_step1.png doc/tutorial/example1_step3.png

dist_man_MANS = man/bist.1


pkglib_LTLIBRARIES = align_elements.la enumerate_atoms.la global_charge.la insert_template.la IR_prediction.la flip_around_bond.la wrap_in_bracket.la attach_ring.la

align_elements_la_SOURCES = pluginsrc/align_elements.cpp pluginsrc/align_elements_dialog.cpp pluginclude/align_elements.hpp pluginclude/align_elements_dialog.hpp 
align_elements_la_LDFLAGS = -module -avoid-version  -export-dynamic
align_elements_la_CXXFLAGS= -Werror=format-security $(AM_CXXFLAGS)

enumerate_atoms_la_SOURCES = pluginsrc/enumerate_atoms.cpp pluginclude/enumerate_atoms.hpp
enumerate_atoms_la_LDFLAGS = -module -avoid-version  -export-dynamic
enumerate_atoms_la_CXXFLAGS= -Werror=format-security $(AM_CXXFLAGS)

global_charge_la_SOURCES   = pluginsrc/global_charge.cpp pluginclude/global_charge.hpp
global_charge_la_LDFLAGS = -module -avoid-version  -export-dynamic
global_charge_la_CXXFLAGS= -Werror=format-security $(AM_CXXFLAGS)

insert_template_la_SOURCES   = pluginsrc/insert_template.cpp pluginclude/insert_template.hpp pluginsrc/insert_template_dialog.cpp pluginclude/insert_template_dialog.hpp
insert_template_la_LDFLAGS = -module -avoid-version  -export-dynamic
insert_template_la_CXXFLAGS= -Werror=format-security $(AM_CXXFLAGS)

IR_prediction_la_SOURCES = pluginsrc/IR_prediction.cpp pluginclude/IR_prediction.hpp
IR_prediction_la_LDFLAGS = -module -avoid-version  -export-dynamic
IR_prediction_la_CXXFLAGS= -Werror=format-security $(AM_CXXFLAGS)

flip_around_bond_la_SOURCES = pluginsrc/flip_around_bond.cpp pluginclude/flip_around_bond.hpp 
flip_around_bond_la_LDFLAGS = -module -avoid-version  -export-dynamic
flip_around_bond_la_CXXFLAGS= -Werror=format-security $(AM_CXXFLAGS)

wrap_in_bracket_la_SOURCES = pluginsrc/wrap_bracket_dialog.cxx pluginsrc/wrap_in_bracket.cpp pluginclude/wrap_bracket_dialog.hpp pluginclude/wrap_in_bracket.hpp
wrap_in_bracket_la_LDFLAGS = -module -avoid-version  -export-dynamic
wrap_in_bracket_la_CXXFLAGS= -Werror=format-security $(AM_CXXFLAGS)

attach_ring_la_SOURCES = pluginsrc/attach_ring.cpp pluginclude/attach_ring.hpp
attach_ring_la_LDFLAGS = -module -avoid-version  -export-dynamic
attach_ring_la_CXXFLAGS= -Werror=format-security $(AM_CXXFLAGS)

BUILT_SOURCES=   include/config_path.h

CONF_PATH_FILE = include/config_path.h

$(CONF_PATH_FILE):
	echo "#define LIB_PATH_HOME       \"/.bist/rings/\""            > $(CONF_PATH_FILE)
	echo "#define LIB_PATH_SHARE      \""$(pkgdatadir)"/rings/\""   >> $(CONF_PATH_FILE)
	echo "#define CONFIG_DIR          \".bist/\""                   >> $(CONF_PATH_FILE)
	echo "#define CONFIG_FILE         \"bistrc\""                   >> $(CONF_PATH_FILE)
	echo "#define TUTORIAL_HTML	 \""$(docdir)"/bist_tutorial.html\"" >> $(CONF_PATH_FILE)
	echo "#define ABOUT_HTML          \""$(docdir)"/about.html\""   >> $(CONF_PATH_FILE)
	echo "#define TEXT_DOMAIN         \""$(PACKAGE)"\""             >> $(CONF_PATH_FILE)
	echo "#define CATALOG_DIR         \""$(localedir)"/\""          >> $(CONF_PATH_FILE)
	echo "#define ELF                 \""$(PACKAGE)"\""             >> $(CONF_PATH_FILE)
	echo "#define VERSION             \""$(PACKAGE_VERSION)"\""     >> $(CONF_PATH_FILE)
	echo "#define PLUGIN_PATH_HOME    \"/.bist/plugin/\""           >> $(CONF_PATH_FILE)
	echo "#define PLUGIN_PATH_SHARED  \""$(pkglibdir)"/\""          >> $(CONF_PATH_FILE)
	echo "#define ELF_ABS_PATH        \""$(bindir)"/"$(PACKAGE)"\"" >> $(CONF_PATH_FILE)
