all_cmo = Set.cmo Tester.cmo Bst.cmo RBTree.cmo
all_cmi =

all_ml = Set.ml Tester.ml Bst.ml RBTree.ml
all_mli =

ocaml_q_test: $(all_cmo) $(all_cmi) $(all_ml) $(all_mli)
        ocamlmktop -custom -o ocaml_s_test unix.cma $(all_cmo)

%.cmo: $(all_ml) $(all_cmi)
        ocamlc -c $*.ml

%.cmi: $(all_mli)
        ocamlc -c $*.mli

install:
#       if [[ ! -e tests ]]; then
#               mkdir tests
#       elif [[ ! -d tests ]]; then 
#               mkdir tests
        install --mode=+rx ocaml_s_test tests
        install --mode=+rx Set.cmi tests
        install --mode=+rx Tester.cmi tests
        install --mode=+rx Bst.cmi tests
        install --mode=+rx RBTree.cmi tests

clean:
        rm -f *.cmo *.cmi ocaml_q_test

clean_temp:
        rm -f *.cmo *.cma