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.


General fixes and clean up
[palacios.git] / palacios / build / Makefile
index 551d9c3..7a4c23d 100644 (file)
@@ -78,7 +78,7 @@ endif
 ifeq ($(DEBUG_INTERRUPTS),1)
 DEBUG_SECTIONS := $(DEBUG_SECTIONS) -DDEBUG_INTERRUPTS
 else 
-ifeq ($(DEBUG_DEBUG_INTERRUPTS),0) 
+ifeq ($(DEBUG_INTERRUPTS),0) 
 DEBUG_SECTIONS := $(DEBUG_SECTIONS) -UDEBUG_INTERRUPTS
 endif
 endif
@@ -147,6 +147,15 @@ DEBUG_SECTIONS := $(DEBUG_SECTIONS) -UDEBUG_RAMDISK
 endif
 endif
 
+ifeq ($(TRACE_RAMDISK),1)
+DEBUG_SECTIONS := $(DEBUG_SECTIONS -DTRACE_RAMDISK
+else
+ifeq ($(TRACE_RAMDSK),0)
+DEBUG_SECTIONS := $(DEBUG_SECTIONS) -UTRACE_RAMDISK
+endif
+endif
+
+
 
 #DEBUG_SECTIONS := $(DEBUG_SECTIONS) -DTEST_NE2K
 
@@ -252,6 +261,7 @@ XED_GAS_OBJS := $(XED_GAS_SRCS:%.s=xed/%.o)
 XED_OBJS := $(XED_C_OBJS) $(XED_GAS_OBJS)
 
 
+
 DEVICE_C_SRCS := generic.c keyboard.c nvram.c timer.c simple_pic.c 8259a.c 8254.c serial.c ramdisk.c cdrom.c
 
 DEVICE_C_OBJS := $(DEVICE_C_SRCS:%.c=devices/%.o)
@@ -263,17 +273,22 @@ V3LIBS := $(DECODER_LIBS)
 
 
 
+
 # ----------------------------------------------------------------------
 # Tools -
 #   This section defines programs that are used to build GeekOS.
 # ----------------------------------------------------------------------
 
+
+V3_ARCH := __V3_32BIT__
+#V3_ARCH := __V3_64BIT__
+
 # Uncomment if cross compiling
-TARGET_CC_PREFIX :=  $(PROJECT_ROOT)/../devtools/i386/bin/i386-elf-
+#TARGET_CC_PREFIX :=  $(PROJECT_ROOT)/../devtools/i386/bin/i386-elf-
 #TARGET_CC_PREFIX :=  i386-elf-
 
 # Target C compiler.  gcc 2.95.2 or later should work.
-TARGET_CC := $(TARGET_CC_PREFIX)gcc
+TARGET_CC := $(TARGET_CC_PREFIX)gcc -m32
 #TARGET_CC := $(TARGET_CC_PREFIX)gcc34 -m32
 
 
@@ -323,11 +338,12 @@ FD_SECTORS_PER_TRACK := $(PERL) $(PROJECT_ROOT)/scripts/numsecs_per_track
 # ----------------------------------------------------------------------
 
 # Flags used for all C source files
-GENERAL_OPTS := -O -Wall $(EXTRA_C_OPTS) $(VMM_FLAGS) -fPIC #-fvisibility=hidden
+#GENERAL_OPTS := -O -Wall $(EXTRA_C_OPTS) $(VMM_FLAGS) -fPIC #-fvisibility=hidden
+GENERAL_OPTS :=  -O -Wall  $(EXTRA_C_OPTS) $(VMM_FLAGS) -fPIC #-fvisibility=hidden
 CC_GENERAL_OPTS := $(GENERAL_OPTS) -Werror 
 
 # Flags used for VMM C source files
-CC_VMM_OPTS := -g -I$(PROJECT_ROOT)/include -D__V3VEE__ -D__V3_32BIT__ $(DECODER_FLAGS) $(JRLDEBUG)
+CC_VMM_OPTS := -g -I$(PROJECT_ROOT)/include -D__V3VEE__ -D$(V3_ARCH) $(DECODER_FLAGS) $(JRLDEBUG)
 
 # Flags used for VMM C ASM files
 NASM_VMM_OPTS := -I$(PROJECT_ROOT)/src/palacios/ -f elf $(EXTRA_NASM_OPTS)
@@ -346,7 +362,6 @@ OBJCOPY_FLAGS := -R .dynamic -R .note -R .comment
 
 
 
-
 palacios/%.o : palacios/%.c
        $(TARGET_CC) -c $(CC_GENERAL_OPTS) $(CC_VMM_OPTS) $< -o palacios/$*.o
 
@@ -395,6 +410,9 @@ rombios_link:
 vgabios_link:
        ln -s -f ../src/vmboot/vgabios/VGABIOS-lgpl-latest.bin vgabios
 
+force_lwip:
+       (cd ../src/lwip/build; make clean; make)
+
 force_rombios: rombios_link
        (cd ../src/vmboot/rombios; make clean; make)
 
@@ -404,7 +422,7 @@ force_vgabios: vgabios_link
 force_payload: force_rombios force_vgabios
        ../scripts/make_payload.pl payload_layout.txt vm_kernel
 
-inter1: force_payload
+inter1: force_payload force_lwip
        -make clean
 
 world: inter1 vmm