CXXFLAGS=-Wall

.SILENT :
.EXPORT_ALL_VARIABLES :

.PHONY : all
.PHONY : subdirectories

OBJ_LIST= ../src/Interface/*.o ../src/OpenMath/OpenMath_object/*.o ../src/QMath_parser/*.o ../src/QMath_parser/Tokenizer/*.o ../src/QMath_parser/Tokenizer/Unicode_regexp/*.o ../src/QMath_parser/Tokenizer/Unicode_regexp/Unicode_regexp_node/*.o ../src/Unicode_data/*.o ../src/Unicode_translator/*.o ../src/XML_infoset/XML_ent_start_marker_info_item/*.o ../src/XML_infoset/XML_unexp_ent_ref_info_item/*.o ../src/XML_infoset/XML_info_item/*.o ../src/XML_infoset/XML_doc_info_item/*.o ../src/XML_infoset/XML_string/*.o ../src/XML_infoset/XML_doc_type_decl_info_item/*.o ../src/XML_infoset/XML_comment_info_item/*.o ../src/XML_infoset/XML_character_info_item/*.o ../src/XML_infoset/XML_namespace_info_item/*.o ../src/XML_infoset/XML_external_ent_info_item/*.o ../src/XML_infoset/XML_elem_info_item/*.o ../src/XML_infoset/XML_internal_ent_info_item/*.o ../src/XML_infoset/XML_cdata_end_marker_info_item/*.o ../src/XML_infoset/XML_unparsed_ent_info_item/*.o ../src/XML_infoset/XML_attr_info_item/*.o ../src/XML_infoset/XML_notation_info_item/*.o ../src/XML_infoset/XML_cdata_start_marker_info_item/*.o ../src/XML_infoset/XML_ent_end_marker_info_item/*.o ../src/XML_infoset/XML_proc_inst_info_item/*.o ../src/XML_parser/*.o

all: subdirectories
	for f in *.c *.cc *.cxx *.cpp; do                  \
	  case "$$f" in                                          \
	    \*.*)                                                \
	      ;;                                                 \
	    *)                                                   \
	      result_name=`echo $$f | sed 's/\.[a-zA-Z]*$$//'`   ;\
	      $(CXX) $(CXXFLAGS) -o $$result_name $(OBJ_LIST) $$f ;\
	      ;;                                                 \
	  esac                                                  ;\
	done                                                    ;\

subdirectories:
	for d in *; do if [ -f "$$d/makefile" ]; then echo "make $$d"; $(MAKE) -C $$d; fi; done
