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.


minor alignment change
[palacios.git] / Makefile
index e21caf4..9acf2de 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -181,9 +181,9 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
 
 HOSTCC         = gcc
 HOSTCXX        = g++
-HOSTCFLAGS     = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer \
+HOSTCFLAGS     = -Wall -Wstrict-prototypes  -fomit-frame-pointer \
                        -Wno-unused -Wno-format-security -U_FORTIFY_SOURCE
-HOSTCXXFLAGS   = -O2
+HOSTCXXFLAGS   = -O
 
 #      Decide whether to build built-in, modular, or both.
 #      Normally, just do built-in.
@@ -298,9 +298,12 @@ V3_INCLUDE      := -Ipalacios/include \
 
 CPPFLAGS        := $(V3_INCLUDE) -D__V3VEE__
 
-CFLAGS                 :=  -fno-stack-protector -Wall -O -Werror -fPIC -mno-red-zone
+CFLAGS                 :=  -fno-stack-protector -Wall -Werror -fPIC -mno-red-zone -fno-common
+#-fPIC
+#-ffreestanding
 
-LDFLAGS         := --whole-archive
+
+LDFLAGS         := --whole-archive 
 
 ifeq ($(call cc-option-yn, -fgnu89-inline),y)
 CFLAGS         += -fgnu89-inline
@@ -429,6 +432,7 @@ scripts_basic: palacios/include/autoconf.h
 core-y          := palacios/src/palacios/
 libs-y         := palacios/lib/$(ARCH)/
 devices-y       := palacios/src/devices/
+modules-y       := modules/
 
 ifeq ($(dot-config),1)
 # In this section, we need .config
@@ -478,6 +482,8 @@ endif
 
 ifdef CONFIG_DEBUG_INFO
 CFLAGS         += -g
+else 
+CFLAGS          += -O
 endif
 
 
@@ -507,7 +513,7 @@ export      INSTALL_PATH ?= /build
 
 
 palacios-dirs  := $(patsubst %/,%,$(filter %/,  \
-                    $(core-y) $(devices-y) $(libs-y)))
+                    $(core-y) $(devices-y) $(libs-y)) $(modules-y))
 
 #palacios-alldirs      := $(sort $(palacios-dirs) $(patsubst %/,%,$(filter %/, \
 #                   $(core-n) $(core-) $(devices-n) $(devices-) \
@@ -515,13 +521,14 @@ palacios-dirs     := $(patsubst %/,%,$(filter %/,  \
 
 
 palacios-cleandirs := $(sort $(palacios-dirs) $(patsubst %/,%,$(filter %/, \
-                       $(core-n) $(core-) $(devices-n) $(devices-))))
+                       $(core-n) $(core-) $(devices-n) $(devices-) $(modules-n) $(modules-))))
 
 
 
 core-y         := $(patsubst %/, %/built-in.o, $(core-y))
 devices-y      := $(patsubst %/, %/built-in.o, $(devices-y))
 libs-y         := $(patsubst %/, %/built-in.o, $(libs-y))
+modules-y       := $(patsubst %/, %/built-in.o, $(modules-y))
 #core-y                := $(patsubst %/, %/lib.a, $(core-y))
 #devices-y     := $(patsubst %/, %/lib.a, $(devices-y))
 
@@ -544,7 +551,7 @@ libs-y              := $(patsubst %/, %/built-in.o, $(libs-y))
 
 
 
-palacios := $(core-y) $(devices-y) $(libs-y)
+palacios := $(core-y) $(devices-y) $(libs-y) $(modules-y)
 
 # Rule to link palacios - also used during CONFIG_KALLSYMS
 # May be overridden by /Makefile.$(ARCH)
@@ -680,6 +687,9 @@ MRPROPER_FILES += .config .config.old  .version .old_version \
                  tags TAGS cscope*
 
 
+#              \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
+
+
 # clean - Delete most, but leave enough to build external modules
 #
 clean: rm-dirs  := $(CLEAN_DIRS)
@@ -690,12 +700,13 @@ PHONY += $(clean-dirs) clean archclean
 $(clean-dirs):
        $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
 
+
 clean: archclean $(clean-dirs)
        $(call cmd,rmdirs)
        $(call cmd,rmfiles)
        @find . $(RCS_FIND_IGNORE) \
                \( -name 'lib' \) -prune -o \
-               \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
+               \( -name '*.[oas]' -o -name '.*.cmd' \
                -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \) \
                -type f -print | xargs rm -f
 
@@ -812,7 +823,7 @@ endif
 ALLSOURCE_ARCHS := $(ARCH)
 
 define all-sources
-       ( find $(__srctree)/palacios $(RCS_FIND_IGNORE) \
+       ( find $(__srctree)palacios $(RCS_FIND_IGNORE) \
               \( -name lib \) -prune -o \
               -name '*.[chS]' -print; )
 endef