open Conf;;
open Printf;;	

let spec =
	[
		findlib_check "str";
        findlib_check "pxp";
        findlib_check "unix";
	]

let configuration = Conf.configure spec

open AutoMake

let sources = Util.prefix "src" ["Dotfiles.ml"; 
                                 "Config.mli"; "Config.ml"; 
                                 "Debug.mli"; "Debug.ml";
                                 "Deck.mli"; "Deck.ml";
                                 "Data.mli"; "Data.ml";
                                 "CardBoxes.mli"; "CardBoxes.ml";
                                 "GtkUi.mli"; "GtkUi.ml";
                                 "SimpleUi.mli"; "SimpleUi.ml"]
                                 


let pack =
    (package
	     ~package:"cardflasher"
         
	     ~version:"0.1"
         
	     ~findlibs:["str"; "pxp"; "unix"]
         
         ~cleaned:["src/*~"]
         
         ~flags:[
             [`compile; `ml], ["-w m"; "-warn-error A"; "-pp camlp4o"];
             [`byte; `ml], ["-g"];
             [`document], ["-colorize-code"; "-keep-code"; "-sort"]
         ]
         
         ~includes:["+lablgtk2"; "src"]
         
         ~libs:["lablgtk"]
         
	     [
             executable "cardflasher" ~sources:(sources @ ["src/main.ml"]);
             toplevel "toplevel" ~sources;
	     ]
    )

let _ =
    output_makefile ~configuration:(configuration :> AutoMake.configuration) pack;


;;
