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.


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