aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorBrad Richardson <brichardson@structint.com>2020-02-27 21:01:13 -0800
committerBrad Richardson <brichardson@structint.com>2020-02-27 21:01:13 -0800
commitd4c0aea26050b32bf394eabe91c95ab56113ce1a (patch)
treebd662532554e059fdcc782af8c9b840c5ee68a7d /app
parent775841b8437adf4f400a21fa939156dc6ef48cc2 (diff)
downloadfpm-d4c0aea26050b32bf394eabe91c95ab56113ce1a.tar.gz
fpm-d4c0aea26050b32bf394eabe91c95ab56113ce1a.zip
Enable building executables
Diffstat (limited to 'app')
-rw-r--r--app/Main.hs13
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