tock-mirror/config/CompilerCommands.hs.in
Adam Sampson 441b2ee344 Do away with the pkgconfig file in favour of another generated module.
Paths.hs is now generated by the Makefile.am, so it can include paths.

As a bonus, this actually works, since we weren't previously installing the .pc
file anywhere...
2008-05-07 13:06:27 +00:00

22 lines
793 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" ++ pkgIncludeDir
cCommand :: String -> String -> String
cCommand inp out = "@CC@ @TOCK_CFLAGS@ " ++ tockIncludeFlags ++ " -c -o " ++ out ++ " " ++ inp
cAsmCommand :: String -> String -> String
cAsmCommand inp out = "@CC@ @TOCK_CFLAGS@ -S -o " ++ out ++ " " ++ inp
cLinkCommand :: [String] -> String -> String
cLinkCommand files out = "@CC@ @TOCK_CFLAGS@ -o " ++ out ++ " " ++ (concat (intersperse " " files)) ++ " @TOCK_CLDFLAGS@"
cxxCommand :: String -> String -> String
cxxCommand inp out = "@CXX@ @TOCK_CXXFLAGS@ " ++ tockIncludeFlags ++ " -o " ++ out ++ " " ++ inp ++ " @TOCK_CXXLDFLAGS@"