tock-mirror/config/CompilerCommands.hs.in

26 lines
960 B
Haskell

-- | This file is automatically generated by autoconf from CompilerCommands.hs.in
module CompilerCommands where
import Data.List
import Paths
tockIncludeFlags :: String
tockIncludeFlags = "-I. -I" ++ pkgIncludeDir
cCommand :: String -> String -> String -> String
cCommand inp out extra = "@CC@ @TOCK_CFLAGS@ " ++ tockIncludeFlags ++ " -c -o " ++ out ++ " " ++ inp
++ " " ++ extra
cAsmCommand :: String -> String -> String -> String
cAsmCommand inp out extra = "@CC@ @TOCK_CFLAGS@ -S " ++ tockIncludeFlags ++ " -o " ++ out ++ " " ++ inp ++
" " ++ extra
cLinkCommand :: [String] -> String -> String -> String
cLinkCommand files out extra = "@CC@ @TOCK_CFLAGS@ -o " ++ out ++ " " ++ (concat (intersperse " " files)) ++ " @TOCK_CLDFLAGS@"
++ " " ++ extra
cxxCommand :: String -> String -> String -> String
cxxCommand inp out extra = "@CXX@ @TOCK_CXXFLAGS@ " ++ tockIncludeFlags ++ " -o " ++ out ++ " " ++ inp ++ " @TOCK_CXXLDFLAGS@"
++ " " ++ extra