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
index ac356b7..ae2db7f 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile for GeekOS kernel, userspace, and tools
+# Top level Makefile for V3Vee
 #
 #  Northwestern University 
 # (c) 2008, Jack Lange <jarusl@cs.northwestern.edu>
@@ -6,48 +6,22 @@
 # (c) 2008, Lei Xia <xiaxlei@gmail.com>
 # (c) 2008, The V3VEE Project <http://www.v3vee.org> 
 #
-# Based on GeekOS Makefile:
-# Copyright (c) 2004,2005 David H. Hovemeyer <daveho@cs.umd.edu>
-# $Revision: 1.71 $
-
-
-# This is free software.  You are permitted to use,
-# redistribute, and modify it as specified in the file "COPYING".
-
-# Required software to build GeekOS:
+# Required software to build V3Vee:
 # - GNU Make (http://www.gnu.org/software/make)
-# - gcc 2.95.2 generating code for target (i386/ELF) and host platforms
 # - nasm (http://nasm.sourceforge.net)
 # - Perl5, AWK (any version), egrep
 #
-# Cygwin (http://cygwin.com) may be used to build GeekOS.
-# Make sure that gcc, binutils, nasm, and perl are installed.
 
-# NOTES:
-# - This makefile has been written carefully to work correctly
-#   with the -j (parallel make) option.  I regularly use "make -j 2"
-#   to speed the build process on 2 processor systems.
 
 
 
 
-# ----------------------------------------------------------------------
-# Configuration -
-#   Various options specifying how GeekOS should be built,
-#   what source files to build, which user programs to build,
-#   etc.  This is generally the only section of the makefile
-#   that will need to be modified.
-# ----------------------------------------------------------------------
+
 PROJECT_ROOT := ..
 PALACIOS_BUILD_DIR := $(PROJECT_ROOT)/palacios/build
-KITTEN_TOP_DIR := $(PROJECT_ROOT)/kitten
 GEEKOS_BUILD_DIR := $(PROJECT_ROOT)/geekos/build
 GUEST_ISO_DIR := /opt/vmm-tools/isos
 
-# List of targets to build by default.
-# These targets encompass everything needed to boot
-# and run GeekOS.
-ALL_TARGETS := palacios geekos
 
 QEMU := /usr/local/qemu/bin/qemu-system-x86_64
 
@@ -73,6 +47,14 @@ DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_SHADOW_PAGING=0
 endif
 endif
 
+ifeq ($(DEBUG_NESTED_PAGING),1)
+DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_NESTED_PAGING=1
+else 
+ifeq ($(DEBUG_NESTED_PAGING),0) 
+DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_NESTED_PAGING=0
+endif
+endif
+
 ifeq ($(DEBUG_CTRL_REGS),1)
 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_CTRL_REGS=1
 else 
@@ -177,6 +159,32 @@ DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_DEV_MGR=0
 endif
 endif
 
+ifeq ($(DEBUG_APIC),1)
+DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_APIC=1
+else 
+ifeq ($(DEBUG_APIC),0) 
+DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_APIC=0
+endif
+endif
+
+ifeq ($(DEBUG_PCI),1)
+DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_PCI=1
+else 
+ifeq ($(DEBUG_PCI),0) 
+DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_PCI=0
+endif
+endif
+
+
+ifeq ($(PROFILE_VMM),1)
+  GEEKOS_FLAGS:= $(GEEKOS_FLAGS) PROFILE_VMM=1
+endif
+
+ifeq ($(INSTRUMENT_VMM),1)
+  GEEKOS_FLAGS:= $(GEEKOS_FLAGS) INSTRUMENT_VMM=1
+endif
+
+
 
 # ----------------------------------------------------------------------
 # Targets -
@@ -184,45 +192,45 @@ endif
 # ----------------------------------------------------------------------
 
 # Default target - see definition of ALL_TARGETS in Configuration section
-all : $(ALL_TARGETS)
+all : palacios-full64
 
 
+palacios64:
+       (cd $(PALACIOS_BUILD_DIR) && make ARCH=64 $(DEBUG_SECTIONS))
 
-palacios:
+palacios32:
        (cd $(PALACIOS_BUILD_DIR) && make $(DEBUG_SECTIONS))
 
 
-palacios-full:
+palacios-full32:
        (cd $(PALACIOS_BUILD_DIR) && make $(DEBUG_SECTIONS) world)
 
 palacios-full64:
        (cd $(PALACIOS_BUILD_DIR) && make ARCH=64 $(DEBUG_SECTIONS) world)      
 
+palacios-full-cray:
+       (cd $(PALACIOS_BUILD_DIR) && make V=1 ARCH=64 CRAY_XT=1 $(DEBUG_SECTIONS) world)        
+
 palacios-lean:
        (cd $(PALACIOS_BUILD_DIR) && make LEAN_AND_MEAN=1 world)
 
-kitten: palacios-full64
-       cp $(PALACIOS_BUILD_DIR)/libv3vee.a $(KITTEN_TOP_DIR)/palacios/
-       cp $(PALACIOS_BUILD_DIR)/../lib/xed/libxed32e.a $(KITTEN_TOP_DIR)/palacios/
-       cp $(PALACIOS_BUILD_DIR)/vm_kernel $(KITTEN_TOP_DIR)/palacios/
-       (cd $(KITTEN_TOP_DIR) && make oldconfig && make)
 
 
-geekos: 
+geekos: palacios32
        cp $(PALACIOS_BUILD_DIR)/libv3vee.a $(GEEKOS_BUILD_DIR)/palacios/
        cp $(PALACIOS_BUILD_DIR)/../lib/xed/libxed.a $(GEEKOS_BUILD_DIR)/palacios/
        cp $(PALACIOS_BUILD_DIR)/vm_kernel $(GEEKOS_BUILD_DIR)/palacios/
-       (cd $(GEEKOS_BUILD_DIR) && make)
+       (cd $(GEEKOS_BUILD_DIR) && make $(GEEKOS_FLAGS))
 
 
-geekos-full: 
+geekos-full: palacios-full32
        cp $(PALACIOS_BUILD_DIR)/libv3vee.a $(GEEKOS_BUILD_DIR)/palacios/
        cp $(PALACIOS_BUILD_DIR)/../lib/xed/libxed.a $(GEEKOS_BUILD_DIR)/palacios/
        cp $(PALACIOS_BUILD_DIR)/vm_kernel $(GEEKOS_BUILD_DIR)/palacios/
-       (cd $(GEEKOS_BUILD_DIR) && make clean && make)
+       (cd $(GEEKOS_BUILD_DIR) && make clean && make $(GEEKOS_FLAGS))
 
 
-world: palacios-full geekos-full
+world: geekos-full palacios-full64
 
 lean-and-mean: palacios-lean geekos-full