Remove <nodeputy.h> from default flags
[barrelfish] / tools / elver / Hakefile
1 ----------------------------------------------------------------------
2 -- Copyright (c) 2009, 2010, 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, Haldeneggsteig 4, CH-8092 Zurich. Attn: Systems Group.
8 --
9 -- Hakefile for /tools/elver
10 --
11 ----------------------------------------------------------------------
12
13 --
14 -- This has to be rather low-level, since elver is indeed a module for
15 -- x86_64, but is built for 32-bits, so it's easiest to do this rather
16 -- explicitly.
17 -- 
18 let arch = "x86_64"
19     opts = (options arch) { 
20              optFlags = [ Str s | s <- [ "-fno-builtin",
21                                            "-nostdinc",
22                                            "-std=gnu99",
23                                            "-m32",
24                                            "-mno-red-zone",
25
26                                            -- avoid SSE instructions, SIMD is disabled
27                                            "-mno-mmx",
28                                            "-mno-sse",
29                                            "-mno-sse2",
30                                            "-mno-sse3",
31                                            "-mno-sse4.1",
32                                            "-mno-sse4.2",
33                                            "-mno-sse4",
34                                            "-mno-sse4a",
35                                            "-mno-3dnow",
36
37                                            "-fPIE",
38                                            "-fno-stack-protector",
39                                            "-U__linux__",
40                                            "-Wall",
41                                            "-Wshadow",
42                                            "-Wstrict-prototypes",
43                                            "-Wold-style-definition",
44                                            "-Wmissing-prototypes",
45                                            "-Wmissing-declarations",
46                                            "-Wmissing-field-initializers",
47                                            "-Wredundant-decls",
48                                            "-Werror" ] ],
49              optIncludes = [ NoDep SrcTree "src" "/include",
50                              NoDep SrcTree "src" "/include/oldc", 
51                              NoDep SrcTree "src" "/include/c", 
52                              NoDep SrcTree "src" "/include/arch/x86_32",
53                              NoDep BuildTree arch "/include" ],
54              optDefines = [],
55              optLibs = [],
56              optLdFlags = [ Str s | s <- [ "-m32", 
57                                         "-fno-builtin", 
58                                         "-nostdlib",
59                                         "-Wl,--fatal-warnings",
60                                         "-e start", 
61                                         "-Wl,-Ttext,0x100000",
62                                         "-Wl,--build-id=none" ]],
63              optSuffix = "_for_elver" 
64            }
65     objs = [ objectFilePath opts f | f <- [ "boot.S", "elver.c", "lib.c",
66                                             "../../lib/elf/elf64.c" ] ]
67 in 
68   [ compileCFiles opts [ "elver.c", "lib.c", "../../lib/elf/elf64.c" ],
69     assembleSFiles opts [ "boot.S" ],
70     link opts objs [] "elver"
71   ]