Changes for nameservice. Use RPC client for NS functionality.
[barrelfish] / lib / barrelfish / Hakefile
1 --------------------------------------------------------------------------
2 -- Copyright (c) 2007-2011, 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 lib/barrelfish
10 -- 
11 --------------------------------------------------------------------------
12
13 [(let arch_dir = "arch" ./. archFamily arch
14       common_srcs = [ "capabilities.c", "init.c", "dispatch.c", "threads.c",
15                       "thread_sync.c", "slab.c", "domain.c", "idc.c",
16                       "waitset.c", "event_queue.c", "event_mutex.c",
17                       "idc_export.c", "nameservice_client.c", "msgbuf.c",
18                       "monitor_client.c", "flounder_support.c", "flounder_glue_binding.c",
19                       "morecore.c", "debug.c", "heap.c", "ram_alloc.c",
20                       "terminal.c", "spawn_client.c", "vspace/vspace.c", 
21                       "vspace/vregion.c", "vspace/memobj_one_frame.c",
22                       "vspace/memobj_one_frame_lazy.c",
23                       "vspace/utils.c",
24                       "vspace/memobj_one_frame_one_map.c", "vspace/mmu_aware.c",
25                       "slot_alloc/single_slot_alloc.c", "slot_alloc/multi_slot_alloc.c",
26                       "slot_alloc/slot_alloc.c", "slot_alloc/range_slot_alloc.c",
27                       "bulk_transfer.c", "trace.c", "resource_ctrl.c", "coreset.c",
28                       "inthandler.c", "deferred.c"
29                     ]
30
31       idc_srcs = concat $ map getsrcs $ optInterconnectDrivers $ options arch
32           where
33             getsrcs "lmp" = [ "lmp_chan.c", "lmp_endpoints.c" ]
34             getsrcs "ump" = [ "ump_chan.c", "ump_endpoint.c" ]
35             getsrcs "multihop" = [ "multihop_chan.c" ]
36             getsrcs _ = []
37
38       -- sources specific to the architecture family
39       archfam_srcs "x86_32"  = [ "arch/x86_32/debug.c" ,
40                               "arch/x86_32/dispatch.c" , "arch/x86_32/syscalls.c" ,
41                               "arch/x86_32/sys_debug.c", "target/x86_32/pmap_target.c",
42                               "target/x86/pmap_x86.c",
43                               "vspace/arch/x86_32/layout.c" , "vspace/memobj_pinned.c" ,
44                               "vspace/pinned.c", "vspace/memobj_anon.c",
45                               "arch/x86/perfmon.c", "arch/x86/tls.c"]
46       archfam_srcs "x86_64"  = [ "arch/x86_64/debug.c", "arch/x86_64/dispatch.c" ,
47                                  "arch/x86_64/syscalls.c", "arch/x86_64/sys_debug.c",
48                                  "arch/x86_64/ldt.c",
49                                  "target/x86_64/pmap_target.c", "target/x86/pmap_x86.c",
50                                  "vspace/arch/x86_64/layout.c",
51                                  "vspace/memobj_pinned.c", "vspace/pinned.c", "vspace/memobj_anon.c",
52                                  "arch/x86/perfmon.c", "arch/x86/tls.c"]
53       archfam_srcs "arm"     = [ "arch/arm/debug.c", "arch/arm/dispatch.c", 
54                                  "arch/arm/pmap_arch.c", "arch/arm/sys_debug.c",
55                                  "arch/arm/syscalls.c", "vspace/memobj_pinned.c" ,
56                                  "vspace/pinned.c", "vspace/memobj_anon.c",
57                                  "vspace/arch/arm/layout.c" ]
58       archfam_srcs _         = []
59
60       -- sources specific to the architecture
61       arch_srcs "scc" = [ "arch/x86/ipi_notify.c" ]
62       arch_srcs "x86_32" = [ "arch/x86/ipi_notify.c" ]
63       arch_srcs "x86_64" = [ "arch/x86/ipi_notify.c" ]
64       arch_srcs _     = []
65
66       arch_assembly "x86_32"  = [ "arch/x86_32/entry.S" ]
67       arch_assembly "x86_64"  = [ "arch/x86_64/entry.S" ]
68       arch_assembly "arm"     = [ "arch/arm/entry.S", "arch/arm/syscall.S" ]
69       arch_assembly _         = []
70
71   in
72     build library { target = "barrelfish",
73                     architectures = [arch],
74                     cFiles = arch_srcs arch ++ archfam_srcs (archFamily arch)
75                              ++ common_srcs ++ idc_srcs,
76                     assemblyFiles = arch_assembly (archFamily arch),
77                     flounderBindings = [ "mem", "dist2", "serial",
78                                          "interdisp", "spawn", "keyboard" ],
79                     -- only makes sense to compile monitor binding for lmp
80                     flounderExtraBindings = [ ("monitor", ["lmp"]),
81                                               ("monitor_blocking", ["lmp", "rpcclient"]),
82                                               ("mem", ["rpcclient"]),
83                                               ("dist2", ["rpcclient"]),
84                                               ("spawn", ["rpcclient"]),
85                                               ("serial", ["rpcclient"])],
86                     addIncludes = [ "include", "include" ./. arch_dir ],
87                     addGeneratedDependencies = [ "/include/asmoffsets.h" ]
88                   }
89  ) | arch <- allArchitectures ]