diff options
author | Brad Richardson <brichardson@structint.com> | 2020-02-27 21:01:13 -0800 |
---|---|---|
committer | Brad Richardson <brichardson@structint.com> | 2020-02-27 21:01:13 -0800 |
commit | d4c0aea26050b32bf394eabe91c95ab56113ce1a (patch) | |
tree | bd662532554e059fdcc782af8c9b840c5ee68a7d /app | |
parent | 775841b8437adf4f400a21fa939156dc6ef48cc2 (diff) | |
download | fpm-d4c0aea26050b32bf394eabe91c95ab56113ce1a.tar.gz fpm-d4c0aea26050b32bf394eabe91c95ab56113ce1a.zip |
Enable building executables
Diffstat (limited to 'app')
-rw-r--r-- | app/Main.hs | 13 |
1 files changed, 11 insertions, 2 deletions
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 |