d2a3dd1d037247a4b075a030a6eef2c635cae202
[barrelfish] / usr / skb / Hakefile
1 --------------------------------------------------------------------------
2 -- Copyright (c) 2007-2010, 2013, 2016 ETH Zurich.
3 -- All rights reserved.
4 --
5 -- This file is distributed under the terms in the attached LICENSE file.
6 -- If you do not find this file, copies can be found by writing to:
7 -- ETH Zurich D-INFK, Universitaetsstrasse 6, CH-8092 Zurich. Attn: Systems Group.
8 --
9 -- Hakefile for /usr/skb
10 --
11 --------------------------------------------------------------------------
12
13 let ramfs_files = find inDir "programs" ".pl" ++
14                   find inDir ("programs" </> "platforms") ".pl"
15     ramdisk = "/skb_ramfs.cpio.gz"
16     args arch = application {
17                         target = "skb",
18                                 cFiles = [ "skb_main.c", "skb_service.c", "queue.c",
19                                    "octopus/code_generator.c",
20                                    "octopus/predicates.c", "octopus/skb_query.c", 
21                                    "octopus/skiplist.c", "octopus/fnv.c", "octopus/bitfield.c" ],
22                         -- some include files cause problems...
23                         omitCFlags = [ "-Wshadow", "-Wstrict-prototypes" ],
24                         -- force optimisations on, without them we blow the stack
25                         addCFlags = [ "-O2" ],
26                         flounderBindings = [ "skb", "octopus" ],
27                         addIncludes = [ "/usr/eclipseclp/Kernel/src"],
28                         addLibraries = libDeps [ "eclipse", "shm", "dummies",
29                                                  "icsolver", "vfs_ramfs",
30                                                  "posixcompat", "hashtable", "pcre", 
31                                                  "octopus_server", "octopus_parser", "skb",
32                                                  "bench", "dmalloc", "lwip", "gmp" ],
33                        architectures = [ arch ]
34                 }
35 in
36   [ Rules [build (args arch) | arch <- [ "x86_64", "x86_32", "armv8", "armv7" ]],
37     Rule ( [ Str "bash",
38              In SrcTree "src" "skripts/mkcpio",
39              NoDep SrcTree "src" "", Out "root" ramdisk]
40              ++ [ In SrcTree "src" f | f <- ramfs_files ] )
41   ]