X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fbuild%2FMakefile;h=8e9d972d273758529c407b7fd9ed7931891494c7;hb=7569a7e7b33dc1c26b68d66e4bcd3aebf3beaf7f;hp=604c266facb74d3bc0471a0eaf5fbfb3107caf68;hpb=3e2c1876fc0d3049514ce1c82c6da217f28380a8;p=palacios-OLD.git diff --git a/palacios/build/Makefile b/palacios/build/Makefile index 604c266..8e9d972 100644 --- a/palacios/build/Makefile +++ b/palacios/build/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 @@ -217,6 +217,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 - @@ -265,6 +274,12 @@ VMM_OBJS := \ 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 \ + $(OBJ_FILES) # vmx.c vmcs_gen.c vmcs.c @@ -278,8 +293,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 \ @@ -293,20 +308,12 @@ DEVICES_OBJS := \ devices/ramdisk.o \ devices/cdrom.o \ devices/bochs_debug.o \ + devices/os_debug.o \ + devices/apic.o \ + devices/io_apic.o \ -$(DEVICES_OBJS) :: EXTRA_CFLAGS = - -# -# DECODER is the decoder that will be used -# currently we only support xed -# -DECODER=XED - -ifeq ($(DECODER),XED) -VMM_OBJS += palacios/vmm_xed.o -else -# This is an error -endif +$(DEVICES_OBJS) :: EXTRA_CFLAGS = \ + $(JRLDEBUG) \ @@ -399,15 +406,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 @@ -443,6 +450,7 @@ CC_COMPILE = \ -c \ $< \ -o $@ \ + $(INSTRUMENT_OPT) \ ) AS_COMPILE = \ @@ -452,6 +460,7 @@ AS_COMPILE = \ -c \ $< \ -o $@ \ + $(INSTRUMENT_OPT) \ )