X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fbuild%2FMakefile;h=bf527cdf82a391c5f7aca2a75c72db10207eafed;hb=e63caa4c57933b3b38f498fea015785f8869c5ef;hp=8f2da64ac15266b95cefe577e7e7793e4e569e1b;hpb=9b31f917eae9b397cb21ff78d81084301b289e43;p=palacios.git diff --git a/palacios/build/Makefile b/palacios/build/Makefile index 8f2da64..bf527cd 100644 --- a/palacios/build/Makefile +++ b/palacios/build/Makefile @@ -3,7 +3,7 @@ # Northwestern University # (c) 2008, Jack Lange # (c) 2008, Peter Dinda -# (c) 2008, Lei Xia +# (c) 2008, Lei Xia # (c) 2008, The V3VEE Project # # Based on GeekOS Makefile: @@ -53,11 +53,11 @@ VPATH := $(PROJECT_ROOT)/src # ifeq ($(LEAN_AND_MEAN),1) -DEBUG=0 -DEBUG_SECTIONS= +DEBUG := 0 +DEBUG_SECTIONS := else -DEBUG=1 -DEBUG_SECTIONS= +DEBUG := 1 +DEBUG_SECTIONS := endif @@ -179,6 +179,14 @@ DEBUG_SECTIONS := $(DEBUG_SECTIONS) -UDEBUG_HALT endif endif +ifeq ($(DEBUG_APIC),1) +DEBUG_SECTIONS := $(DEBUG_SECTIONS) -DDEBUG_APIC +else +ifeq ($(DEBUG_APIC),0) +DEBUG_SECTIONS := $(DEBUG_SECTIONS) -UDEBUG_APIC +endif +endif + ifeq ($(DEBUG_DEV_MGR),1) DEBUG_SECTIONS := $(DEBUG_SECTIONS) -DDEBUG_DEV_MGR else @@ -217,6 +225,15 @@ endif +ifeq ($(INSTRUMENT_VMM),1) + EXTRA_C_OPTS:= -DINSTRUMENT_VMM + INSTRUMENT_OPT := -finstrument-functions + OBJ_FILES := palacios/vmm_instrument.o +else + INSTRUMENT_OPT := +endif + + # ---------------------------------------------------------------------- # Configuration - @@ -229,7 +246,7 @@ endif # List of targets to build by default. # These targets encompass everything needed to boot # and run GeekOS. -ALL_TARGETS := vmm vm_kernel +ALL_TARGETS := vmm force_payload VMM_OBJS := \ @@ -264,6 +281,14 @@ VMM_OBJS := \ palacios/svm_lowlevel.o \ palacios/vmm_msr.o \ palacios/svm_msr.o \ + palacios/vmm_socket.o \ + palacios/vmm_xed.o \ + palacios/vmm_rbtree.o \ + palacios/vmm_profiler.o \ + palacios/vmm_direct_paging.o \ + palacios/vmm_ringbuffer.o \ + palacios/vmm_hypercall.o \ + $(OBJ_FILES) # vmx.c vmcs_gen.c vmcs.c @@ -277,8 +302,8 @@ XED_OBJS := \ xed/v3-xed-compat.o \ xed/v3-udiv-compat.o \ -$(XED_OBJS) :: EXTRA_CFLAGS = - +$(XED_OBJS) :: EXTRA_CFLAGS = \ + $(JRLDEBUG) \ DEVICES_OBJS := \ devices/generic.o \ @@ -292,20 +317,16 @@ DEVICES_OBJS := \ devices/ramdisk.o \ devices/cdrom.o \ devices/bochs_debug.o \ + devices/os_debug.o \ + devices/apic.o \ + devices/io_apic.o \ + devices/vpci.o \ -$(DEVICES_OBJS) :: EXTRA_CFLAGS = -# -# DECODER is the decoder that will be used -# currently we only support xed -# -DECODER=XED +# devices/vnic.o \ -ifeq ($(DECODER),XED) -VMM_OBJS += palacios/vmm_xed.o -else -# This is an error -endif +$(DEVICES_OBJS) :: EXTRA_CFLAGS = \ + $(JRLDEBUG) \ @@ -398,15 +419,15 @@ CC_GENERAL_OPTS = \ $(EXTRA_C_OPTS) \ $(VMM_FLAGS) \ -I$(PROJECT_ROOT)/include \ - -fPIC \ -Werror \ + -fPIC \ -Wp,-MD,$(@D)/.$(@F).d \ -Wp,-MT,$@ \ +#-fPIC \ #-fvisibility=hidden - # Flags passed to objcopy program (strip unnecessary sections from kernel.exe) OBJCOPY_FLAGS := -R .dynamic -R .note -R .comment @@ -442,6 +463,7 @@ CC_COMPILE = \ -c \ $< \ -o $@ \ + $(INSTRUMENT_OPT) \ ) AS_COMPILE = \ @@ -451,6 +473,7 @@ AS_COMPILE = \ -c \ $< \ -o $@ \ + $(INSTRUMENT_OPT) \ )