"/kernel/include",
"/include",
"/include/arch" </> archFamily arch,
- "/lib/newlib/newlib/libc/include",
- "/include/c",
"/include/target" </> archFamily arch]]
++ kernelOptIncludes arch
]]
+--
+-- Build SKB facts from Sockeye file
+--
+sockeyeProgLoc = In InstallTree "tools" "/bin/sockeye"
+sockeyeSocFileLoc d = In SrcTree "src" ("/socs" </> (d ++ ".soc"))
+sockeyeFactFilePath d = "/sockeyefacts" </> (d ++ ".pl")
+sockeyeFactFileLoc d = In BuildTree "" $ sockeyeFactFilePath d
+
+sockeye :: String -> HRule
+sockeye net =
+ let
+ factFile = sockeyeFactFilePath net
+ depFile = dependFilePath factFile
+ in Rules
+ [ Rule
+ [ sockeyeProgLoc
+ , Str "-o", Out "" factFile
+ , Str "-d", Out "" depFile
+ , sockeyeSocFileLoc net
+ ]
+ , Include (Out "" depFile)
+ ]
--
-- Build a Fugu library
(options arch) { extraIncludes =
[ NoDep SrcTree "src" a | a <- Args.addIncludes args]
++
- [ NoDep BuildTree arch a | a <- Args.addGeneratedIncludes args],
+ [ NoDep BuildTree arch a | a <- Args.addGeneratedIncludes args]
+ ++
+ [ NoDep SrcTree "src" ("/include" </> l) | l <- Args.addLibraries args ],
optIncludes = (optIncludes $ options arch) \\
[ NoDep SrcTree "src" i | i <- Args.omitIncludes args ],
optFlags = (optFlags $ options arch) \\
libGetOptionsForArch arch args =
(options arch) { extraIncludes =
- [ NoDep SrcTree "src" a | a <- Args.addIncludes args],
+ [ NoDep SrcTree "src" a | a <- Args.addIncludes args]
+ ++
+ [ NoDep SrcTree "src" ("/include" </> l) | l <- Args.addLibraries args ],
optIncludes = (optIncludes $ options arch) \\
[ NoDep SrcTree "src" i | i <- Args.omitIncludes args ],
optFlags = (optFlags $ options arch) \\
libnetQmng_deps = LibDeps $ [ LibDep x | x <- deps ]
where deps = ["net_queue_manager"]
libnfs_deps = LibDeps $ [ LibDep "nfs", liblwip_deps]
- libssh_deps = LibDeps [ libposixcompat_deps, libopenbsdcompat_deps,
- LibDep "zlib", LibDep "crypto", LibDep "ssh" ]
- libopenbsdcompat_deps = LibDeps [ libposixcompat_deps, LibDep "crypto",
- LibDep "openbsdcompat" ]
-- we need to make vfs more modular to make this actually useful
data VFSModules = VFS_RamFS | VFS_NFS | VFS_BlockdevFS | VFS_FAT
| str == "vfs_noblockdev"= libvfs_deps_noblockdev str
| str == "lwip" = liblwip_deps
| str == "netQmng" = libnetQmng_deps
- | str == "ssh" = libssh_deps
- | str == "openbsdcompat" = libopenbsdcompat_deps
| otherwise = LibDep str
-- get library depdencies
-- we need a specific order for the .a, so we define a total order
libDeps :: [String] -> [String]
libDeps xs = [x | (LibDep x) <- (sortBy xcmp) . nub . flat $ map str2dep xs ]
- where xord = [ "ssh"
- , "openbsdcompat"
- , "crypto"
+ where xord = [ "crypto"
, "zlib"
, "posixcompat"
, "term_server"
let ramfs_files = find inDir "programs" ".pl" ++
find inDir ("programs" </> "platforms") ".pl"
+ sockeyeFiles = [ "omap44xx" ]
ramdisk = "/skb_ramfs.cpio.gz"
args arch = application {
target = "skb",
"icsolver", "vfs_ramfs",
"posixcompat", "hashtable", "pcre",
"octopus_server", "octopus_parser", "skb",
- "bench", "dmalloc", "lwip" ],
+ "bench", "lwip" ],
architectures = [ arch ]
}
in
Rule ( [ Str "bash",
In SrcTree "src" "skripts/mkcpio",
NoDep SrcTree "src" "", Out "root" ramdisk]
- ++ [ In SrcTree "src" f | f <- ramfs_files ] )
+ ++ [ In SrcTree "src" f | f <- ramfs_files ]
+ ++ [ In BuildTree "" (sockeyeFactFilePath f) | f <- sockeyeFiles ] )
]