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.


fixed default build target
[palacios.git] / build / Makefile
1 # Top level Makefile for V3Vee
2 #
3 #  Northwestern University 
4 # (c) 2008, Jack Lange <jarusl@cs.northwestern.edu>
5 # (c) 2008, Peter Dinda <pdinda@northwestern.edu> 
6 # (c) 2008, Lei Xia <xiaxlei@gmail.com>
7 # (c) 2008, The V3VEE Project <http://www.v3vee.org> 
8 #
9 # Required software to build V3Vee:
10 # - GNU Make (http://www.gnu.org/software/make)
11 # - nasm (http://nasm.sourceforge.net)
12 # - Perl5, AWK (any version), egrep
13 #
14
15
16
17
18
19
20 PROJECT_ROOT := ..
21 PALACIOS_BUILD_DIR := $(PROJECT_ROOT)/palacios/build
22 GEEKOS_BUILD_DIR := $(PROJECT_ROOT)/geekos/build
23 GUEST_ISO_DIR := /opt/vmm-tools/isos
24
25
26 QEMU := /usr/local/qemu/bin/qemu-system-x86_64
27
28
29
30 #when -DNDEBUG is set the kassert functions are disabled
31 #JRLDEBUG=-DNDEBUG
32
33 # DEBUG=1 means VMM_DEBUG, VMM_INFO, and VMM_TRACE are enabled
34 # as are SERIAL_PRINT_DEBUG
35
36 DEBUG_SECTIONS := DEBUG=1
37
38 ifeq ($(DEBUG_ALL),1)
39   DEBUG_SECTIONS:= $(DEBUG_SECTIONS) DEBUG_ALL=1
40 endif
41
42 ifeq ($(DEBUG_SHADOW_PAGING),1)
43 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_SHADOW_PAGING=1
44 else 
45 ifeq ($(DEBUG_SHADOW_PAGING),0) 
46 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_SHADOW_PAGING=0
47 endif
48 endif
49
50 ifeq ($(DEBUG_NESTED_PAGING),1)
51 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_NESTED_PAGING=1
52 else 
53 ifeq ($(DEBUG_NESTED_PAGING),0) 
54 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_NESTED_PAGING=0
55 endif
56 endif
57
58 ifeq ($(DEBUG_CTRL_REGS),1)
59 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_CTRL_REGS=1
60 else 
61 ifeq ($(DEBUG_CTRL_REGS),0) 
62 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_CTRL_REGS=0
63 endif
64 endif
65
66 ifeq ($(DEBUG_INTERRUPTS),1)
67 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_INTERRUPTS=1
68 else 
69 ifeq ($(DEBUG_INTERRUPTS),0) 
70 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_INTERRUPTS=0
71 endif
72 endif
73
74 ifeq ($(DEBUG_IO),1)
75 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_IO=1
76 else 
77 ifeq ($(DEBUG_IO),0) 
78 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_IO=0
79 endif
80 endif
81
82 ifeq ($(DEBUG_KEYBOARD),1)
83 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_KEYBOARD=1
84 else 
85 ifeq ($(DEBUG_KEYBOARD),0) 
86 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_KEYBOARD=0
87 endif
88 endif
89
90 ifeq ($(DEBUG_PIC),1)
91 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_PIC=1
92 else 
93 ifeq ($(DEBUG_PIC),0) 
94 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_PIC=0
95 endif
96 endif
97
98 ifeq ($(DEBUG_PIT),1)
99 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_PIT=1
100 else 
101 ifeq ($(DEBUG_PIT),0) 
102 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_PIT=0
103 endif
104 endif
105
106 ifeq ($(DEBUG_NVRAM),1)
107 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_NVRAM=1
108 else 
109 ifeq ($(DEBUG_NVRAM),0) 
110 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_NVRAM=0
111 endif
112 endif
113
114 ifeq ($(DEBUG_GENERIC),1)
115 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_GENERIC=1
116 else 
117 ifeq ($(DEBUG_GENERIC),0) 
118 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_GENERIC=0
119 endif
120 endif
121
122 ifeq ($(DEBUG_EMULATOR),1)
123 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_EMULATOR=1
124 else 
125 ifeq ($(DEBUG_EMULATOR),0) 
126 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_EMULATOR=0
127 endif
128 endif
129
130 ifeq ($(DEBUG_RAMDISK),1)
131 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_RAMDISK=1
132 else 
133 ifeq ($(DEBUG_RAMDISK),0) 
134 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_RAMDISK=0
135 endif
136 endif
137
138 ifeq ($(DEBUG_XED),1)
139 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_XED=1
140 else 
141 ifeq ($(DEBUG_XED),0) 
142 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_XED=0
143 endif
144 endif
145
146 ifeq ($(DEBUG_HALT),1)
147 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_HALT=1
148 else 
149 ifeq ($(DEBUG_HALT),0) 
150 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_HALT=0
151 endif
152 endif
153
154 ifeq ($(DEBUG_DEV_MGR),1)
155 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_DEV_MGR=1
156 else 
157 ifeq ($(DEBUG_DEV_MGR),0) 
158 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_DEV_MGR=0
159 endif
160 endif
161
162 ifeq ($(DEBUG_APIC),1)
163 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_APIC=1
164 else 
165 ifeq ($(DEBUG_APIC),0) 
166 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_APIC=0
167 endif
168 endif
169
170 ifeq ($(DEBUG_PCI),1)
171 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_PCI=1
172 else 
173 ifeq ($(DEBUG_PCI),0) 
174 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_PCI=0
175 endif
176 endif
177
178
179 ifeq ($(PROFILE_VMM),1)
180   GEEKOS_FLAGS:= $(GEEKOS_FLAGS) PROFILE_VMM=1
181 endif
182
183 ifeq ($(INSTRUMENT_VMM),1)
184   GEEKOS_FLAGS:= $(GEEKOS_FLAGS) INSTRUMENT_VMM=1
185 endif
186
187
188
189 # ----------------------------------------------------------------------
190 # Targets -
191 #   Specifies files to be built
192 # ----------------------------------------------------------------------
193
194 # Default target - see definition of ALL_TARGETS in Configuration section
195 all : palacios-full64
196
197
198 palacios64:
199         (cd $(PALACIOS_BUILD_DIR) && make ARCH=64 $(DEBUG_SECTIONS))
200
201 palacios32:
202         (cd $(PALACIOS_BUILD_DIR) && make $(DEBUG_SECTIONS))
203
204
205 palacios-full32:
206         (cd $(PALACIOS_BUILD_DIR) && make $(DEBUG_SECTIONS) world)
207
208 palacios-full64:
209         (cd $(PALACIOS_BUILD_DIR) && make ARCH=64 $(DEBUG_SECTIONS) world)      
210
211 palacios-full-cray:
212         (cd $(PALACIOS_BUILD_DIR) && make V=1 ARCH=64 CRAY_XT=1 $(DEBUG_SECTIONS) world)        
213
214 palacios-lean:
215         (cd $(PALACIOS_BUILD_DIR) && make LEAN_AND_MEAN=1 world)
216
217
218
219 geekos: palacios32
220         cp $(PALACIOS_BUILD_DIR)/libv3vee.a $(GEEKOS_BUILD_DIR)/palacios/
221         cp $(PALACIOS_BUILD_DIR)/../lib/xed/libxed.a $(GEEKOS_BUILD_DIR)/palacios/
222         cp $(PALACIOS_BUILD_DIR)/vm_kernel $(GEEKOS_BUILD_DIR)/palacios/
223         (cd $(GEEKOS_BUILD_DIR) && make $(GEEKOS_FLAGS))
224
225
226 geekos-full: palacios-full32
227         cp $(PALACIOS_BUILD_DIR)/libv3vee.a $(GEEKOS_BUILD_DIR)/palacios/
228         cp $(PALACIOS_BUILD_DIR)/../lib/xed/libxed.a $(GEEKOS_BUILD_DIR)/palacios/
229         cp $(PALACIOS_BUILD_DIR)/vm_kernel $(GEEKOS_BUILD_DIR)/palacios/
230         (cd $(GEEKOS_BUILD_DIR) && make clean && make $(GEEKOS_FLAGS))
231
232
233 world: geekos-full palacios-full64
234
235 lean-and-mean: palacios-lean geekos-full
236
237
238
239 # make ready to boot over PXE
240 geekos-pxe: 
241         cp $(GEEKOS_BUILD_DIR)/vmm.img /tftpboot/vmm.img
242
243 geekos-run: 
244         $(QEMU) -m 1024 -serial file:serial.out -cdrom $(GUEST_ISO_DIR)/puppy.iso -fda $(GEEKOS_BUILD_DIR)/vmm.img 
245
246 geekos-iso: 
247         cp $(GEEKOS_BUILD_DIR)/vmm.img iso/vmm.img
248         mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o test.iso iso
249
250
251
252 force:
253
254
255
256
257 # Clean build directories of generated files
258 clean :
259         for d in $(GEEKOS_BUILD_DIR) $(PALACIOS_BUILD_DIR); do \
260                 (cd $$d && make clean); \
261         done
262
263