# Makefile for GeekOS kernel, userspace, and tools
+#
+# Northwestern University
+# (c) 2008, Jack Lange <jarusl@cs.northwestern.edu>
+# (c) 2008, Peter Dinda <pdinda@northwestern.edu>
+# (c) 2008, Lei Xia <xiaxlei@gmail.com>
+# (c) 2008, The V3VEE Project <http://www.v3vee.org>
+#
+# Based on GeekOS Makefile:
# Copyright (c) 2004,2005 David H. Hovemeyer <daveho@cs.umd.edu>
# $Revision: 1.71 $
+
# This is free software. You are permitted to use,
# redistribute, and modify it as specified in the file "COPYING".
#
#TCPSTACK, uIP is used currently
#
-TCPSTACK=UIP
+UIP=ON
+
+#
+#LWIP, ON -- used, OFF -- not used
+#
+LWIP=ON
#
#RAMDISK
V3LIBS := $(DECODER_LIBS)
-TCPSTACK_C_SRCS := psock.c timer.c uip_arp.c uip.c uip-fw.c uiplib.c uip-neighbor.c uip-split.c resolv.c
-TCPSTACK_C_OBJS := $(TCPSTACK_C_SRCS:%.c=net/%.o)
-TCPSTACK_OBJS := $(TCPSTACK_C_OBJS)
+ifeq ($(UIP),ON)
+ UIP_C_SRCS := psock.c timer.c uip_arp.c uip.c uip-fw.c uiplib.c uip-neighbor.c uip-split.c resolv.c
+ UIP_C_OBJS := $(UIP_C_SRCS:%.c=net/%.o)
+else
+ UIP_C_SRCS :=
+ UIP_C_OBJS :=
+endif
+
+ifeq ($(LWIP),ON)
+ LWIP_OBJS := lwip/*.o
+else
+ LWIP_OBJS :=
+endif
+
+TCPSTACK_OBJS := $(UIP_C_OBJS) $(LWIP_OBJS)
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)
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.img