main :: IO ()
main = do
    args <- getArgs
    putStrLn $ "[PFQ] pfq-omatic: v" ++ pfq_omatic_ver
    generalChecks
    getRecursiveContents "." [".c"] >>= mapM_ tryPatch
    symver <- liftM fromJust $ getMostRecentFile pfq_symvers
    copyFile symver "Module.symvers"
    let cmd = "make KBUILD_EXTRA_SYMBOLS=" ++ symver ++ " -j" ++ show getNumberOfPhyCores ++ " " ++ unwords args
    putStrLn $ "[PFQ] compiling: " ++ cmd ++ "..."
    void $ system cmd
    putStrLn "[PFQ] done."



main :: IO ()
main = do
    args <- getArgs
    putStrLn $ "[PFQ] pfq-omatic: v" ++ pfq_omatic_ver
    generalChecks
    getRecursiveContents "." [".c"] >>= mapM_ tryPatch
    symver <- liftM fromJust $ getMostRecentFile pfq_symvers
    copyFile symver "Module.symvers"
    let cmd = "make KBUILD_EXTRA_SYMBOLS=" ++ symver ++ " -j" ++ show getNumberOfPhyCores ++ " " ++ unwords args
    putStrLn $ "[PFQ] compiling: " ++ cmd ++ "..."
    void $ system cmd
    putStrLn "[PFQ] done."



main = do
    args <- getArgs
    putStrLn $ "[PFQ] pfq-omatic: v" ++ pfq_omatic_ver
    generalChecks
    getRecursiveContents "." [".c"] >>= mapM_ tryPatch
    symver <- liftM fromJust $ getMostRecentFile pfq_symvers
    copyFile symver "Module.symvers"
    let cmd = "make KBUILD_EXTRA_SYMBOLS=" ++ symver ++ " -j" ++ show getNumberOfPhyCores ++ " " ++ unwords args
    putStrLn $ "[PFQ] compiling: " ++ cmd ++ "..."
    void $ system cmd
    putStrLn "[PFQ] done."


