From d4c0aea26050b32bf394eabe91c95ab56113ce1a Mon Sep 17 00:00:00 2001 From: Brad Richardson Date: Thu, 27 Feb 2020 21:01:13 -0800 Subject: Enable building executables --- app/Main.hs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/Main.hs b/app/Main.hs index e1451af..02d54d6 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -1,10 +1,13 @@ module Main where -import Build ( buildLibrary ) +import Build ( buildLibrary + , buildPrograms + ) import Development.Shake ( FilePattern , () , getDirectoryFilesIO ) +import Development.Shake.FilePath ( () ) import Options.Applicative ( Parser , (<**>) , command @@ -37,10 +40,16 @@ build = do putStrLn "Building" buildLibrary "src" [".f90", ".f", ".F", ".F90", ".f95", ".f03"] - "build" + ("build" "library") "gfortran" ["-g", "-Wall", "-Wextra", "-Werror", "-pedantic"] "library" + buildPrograms "app" + ["build" "library"] + [".f90", ".f", ".F", ".F90", ".f95", ".f03"] + ("build" "app") + "gfortran" + ["-g", "-Wall", "-Wextra", "-Werror", "-pedantic"] getArguments :: IO Arguments getArguments = execParser -- cgit v1.2.3