X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=Makefile;h=97022f38399056e7eac0c2a682c306a5f33ab6d2;hb=f4b69a7f12e47d146be4cecf1d46dfd37f87d89a;hp=3d8379107adaaead69d4c01a31e7f5f3096583b9;hpb=64322c155031a0eff3e2b4ff69c3d9d7be92a643;p=palacios.git diff --git a/Makefile b/Makefile index 3d83791..97022f3 100644 --- a/Makefile +++ b/Makefile @@ -298,7 +298,14 @@ V3_INCLUDE := -Ipalacios/include \ CPPFLAGS := $(V3_INCLUDE) -D__V3VEE__ +# +# We want no-strict-aliasing here whether or not the target kernel +# has it configued. See Linus's rant about gcc's "if the standard +# says we can do anything, we will do the wrong thing" behavior with +# regard to this option +# CFLAGS := -fno-stack-protector -Wall -Werror -mno-red-zone -fno-common \ + -fno-strict-aliasing -ffreestanding \ $(call cc-option, -Wno-unused-but-set-variable,) @@ -473,8 +480,12 @@ endif ifdef V3_CONFIG_LINUX DEFAULT_EXTRA_TARGETS=linux_module else +ifdef V3_CONFIG_NAUTILUS +DEFAULT_EXTRA_TARGETS=nautilus +else DEFAULT_EXTRA_TARGETS= endif +endif # The all: target is the default when no target is given on the # command line. @@ -486,8 +497,19 @@ all: palacios $(DEFAULT_EXTRA_TARGETS) ifdef V3_CONFIG_LINUX CFLAGS += -mcmodel=kernel else +ifdef V3_CONFIG_NAUTILUS +CFLAGS += -O2 \ + -fno-omit-frame-pointer \ + -ffreestanding \ + -fno-stack-protector \ + -fno-strict-aliasing \ + -mno-red-zone \ + -mcmodel=large +LDFLAGS += -z max-page-size=0x1000 +else CFLAGS += -fPIC endif +endif ifdef V3_CONFIG_FRAME_POINTER CFLAGS += -fno-omit-frame-pointer $(call cc-option,-fno-optimize-sibling-calls,) @@ -514,6 +536,8 @@ NOSTDINC_FLAGS += # disable pointer signedness warnings in gcc 4.0 CFLAGS += $(call cc-option,-Wno-pointer-sign,) +CFLAGS += -O2 + # Default kernel image to build when no specific target is given. # KBUILD_IMAGE may be overruled on the commandline or # set in the environment @@ -624,12 +648,18 @@ palacios: libv3vee.a linux_module/v3vee.ko: linux_module/*.c linux_module/*.h libv3vee.a - cd linux_module/ && make + cd linux_module/ && make -j 8 cp linux_module/v3vee.ko v3vee.ko - +.PHONY: linux_module linux_module: linux_module/v3vee.ko +nautilus/libnautilus.a: nautilus/*.c nautilus/*.h libv3vee.a + cd nautilus/ && make + cp nautilus/libnautilus.a . + +.PHONY: nautilus +nautilus: nautilus/libnautilus.a palacios.asm: palacios