Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


User utils for memory offlining and VM creation with binding
[palacios.git] / linux_usr / Makefile
1 #
2 # Build Static or Dynamic versions of the control utilities
3 #
4 #
5
6 # define this at the command-line or here
7 # to get dynamically linked versions
8 STATIC = 1
9
10 #
11 # Executables that implement core functionality
12 #
13 BASE_EXECS =    v3_mem \
14                 v3_mem_free \
15                 v3_create \
16                 v3_create_bind \
17                 v3_free  \
18                 v3_launch \
19                 v3_stop   \
20                 v3_pause  \
21                 v3_continue \
22                 v3_core_move \
23                 v3_load \
24                 v3_save \
25                 v3_cons \
26                 v3_cons_sc \
27                 v3_stream \
28                 v3_monitor \
29                 v3_hypercall \
30                 v3_debug
31
32 #
33 # Examples
34 #
35 EXAMPLE_EXECS = v3_user_host_dev_example \
36                 v3_os_debug \
37                 v3_user_keyed_stream_example \
38                 v3_user_keyed_stream_file 
39
40 #
41 # Currently experimental things
42 #
43 EXPERIMENTAL_EXECS =    v3_simulate  \
44                         v3_inject_ecc_scrubber_mce  \
45                         v3_top_inject \
46                         v3_env_inject \
47                                                 v3_syscall
48
49
50
51
52 #
53 # Things that have been built elsewhere - just for reference here
54 #
55 PRECOMPILED_EXECS = x0vncserver
56
57 COPIED_EXECS = v3_x0vncserver
58
59 #
60 # Libraries that we need to build
61 #
62 LIBS = libv3_user_host_dev.a libv3_user_keyed_stream.a
63
64 BUILD_EXECS = $(BASE_EXECS) $(EXAMPLE_EXECS) $(EXPERIMENTAL_EXECS) 
65 BUILD_LIBS = $(LIBS)
66
67
68 CFILES = $(BUILD_EXECS:%=%.c) $(BUILD_LIBS:lib%.a=%.c) 
69
70 ifeq ($(STATIC),1)
71   CFLAGS += -static 
72 endif
73
74 CFLAGS += -I../linux_module
75
76 CC = gcc
77 AR = ar
78
79 all: $(BUILD_EXECS) $(BUILD_LIBS) $(COPIED_EXECS)
80
81
82 #
83 # Most tools compile in a straightforward way
84 #
85 % :: %.c v3_ctrl.h
86         $(CC) $(CFLAGS) $< -o $@
87
88
89 #
90 # Console support requires curses
91 #
92 ifeq ($(STATIC),1)
93   CURSES_CFLAGS = -DNCURSES_STATIC
94 endif
95
96 v3_cons: v3_cons.c
97         $(CC) $(CFLAGS) $(CURSES_CFLAGS) $< -lcurses -o $@
98
99 v3_cons_sc: v3_cons_sc.c
100         $(CC) $(CFLAGS) $(CURSES_CFLAGS) $< -lcurses -o $@
101
102
103
104 #
105 # User host devices include a library and some examples
106 #
107 libv3_user_host_dev.a : v3_user_host_dev.c v3_user_host_dev.h v3_ctrl.h
108         $(CC) $(CFLAGS) -I../linux_module -c v3_user_host_dev.c 
109         $(AR) ruv libv3_user_host_dev.a v3_user_host_dev.o
110         rm -f v3_user_host_dev.o
111
112 v3_user_host_dev_example : v3_user_host_dev_example.c libv3_user_host_dev.a
113         $(CC) $(CFLAGS) $< -I../linux_module -L. -lv3_user_host_dev -o $@
114
115 v3_os_debug : v3_os_debug.c libv3_user_host_dev.a
116         $(CC) $(CFLAGS) $< -I../linux_module -L. -lv3_user_host_dev -o $@
117
118
119 #
120 # User keyed stream support includes a library and examples
121 #
122 #
123 libv3_user_keyed_stream.a :: v3_user_keyed_stream.c v3_user_keyed_stream.h v3_ctrl.h
124         $(CC) $(CFLAGS) -I../linux_module -c v3_user_keyed_stream.c 
125         $(AR) ruv libv3_user_keyed_stream.a v3_user_keyed_stream.o
126         rm -f v3_user_keyed_stream.o
127
128
129 v3_user_keyed_stream_example : v3_user_keyed_stream_example.c libv3_user_keyed_stream.a
130         $(CC) $(CFLAGS) $< -I../linux_module -L. -lv3_user_keyed_stream -o $@
131
132 v3_user_keyed_stream_file : v3_user_keyed_stream_file.c libv3_user_keyed_stream.a
133         $(CC) $(CFLAGS) $< -I../linux_module -L. -lv3_user_keyed_stream -o $@
134
135
136
137 #
138 # VNC support is compiled separately
139 #
140 v3_x0vncserver : x0vncserver
141         cp x0vncserver v3_x0vncserver
142
143
144 #
145 # Cleanup and dependency builds are automated
146 #
147 clean:
148         rm -f $(BUILD_EXECS) $(BUILD_LIBS) $(COPIED_EXECS)
149
150 depend:
151         $(CC) -MM $(CFILES) -I../linux_module > .dependencies
152