From: Lei Xia Date: Mon, 6 Oct 2008 22:01:38 +0000 (-0500) Subject: Support for lwIP switch on/off in Makefile X-Git-Tag: 1.0~3^2~5^2~3 X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=commitdiff_plain;h=0275d8e8b9bc4c08095426a20e82054d759094e7 Support for lwIP switch on/off in Makefile --- diff --git a/geekos/build/Makefile b/geekos/build/Makefile index f49bfd2..0601b6d 100644 --- a/geekos/build/Makefile +++ b/geekos/build/Makefile @@ -53,14 +53,14 @@ VPATH := $(PROJECT_ROOT)/src # -#TCPSTACK, uIP is used currently +#uIP, ON -- used, OFF -- not used # UIP=OFF # #LWIP, ON -- used, OFF -- not used # -LWIP=ON +LWIP=OFF # @@ -138,17 +138,11 @@ COMMON_C_SRCS := fmtout.c string.c memmove.c COMMON_C_OBJS := $(COMMON_C_SRCS:%.c=common/%.o) - - V3_LD_FLAGS := -L./palacios/ #V3_LIBS := -lxed -lv3vee V3_LIBS := ./palacios/libxed.a ./palacios/libv3vee.a ./palacios/libxed.a ./palacios/libv3vee.a - - - - 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) @@ -159,7 +153,7 @@ endif ifeq ($(LWIP),ON) LWIP_OBJS := lwip/*.o - CC_LWIP_OPTS := -I$(PROJECT_ROOT)/include/lwip -I$(PROJECT_ROOT)/include/lwip/ipv4 -I$(PROJECT_ROOT)/include/libc -DLWIP_DEBUG + CC_LWIP_OPTS := -I$(PROJECT_ROOT)/include/lwip -I$(PROJECT_ROOT)/include/lwip/ipv4 -I$(PROJECT_ROOT)/include/libc -DLWIP_DEBUG -DLWIP else LWIP_OBJS := CC_LWIP_OPTS := diff --git a/geekos/src/geekos/net.c b/geekos/src/geekos/net.c index 7067a38..ceb41c1 100644 --- a/geekos/src/geekos/net.c +++ b/geekos/src/geekos/net.c @@ -5,6 +5,10 @@ #include #include #include +#include + +#ifdef LWIP + #include #include #include @@ -13,7 +17,6 @@ #include #include #include -#include static void @@ -24,11 +27,14 @@ tcpip_init_done(void *arg) sys_sem_signal(*sem); } +#endif + void Init_Network() { //temporay now we are using lwip sockets // init_socket_layer(); - + +#ifdef LWIP struct ip_addr ipaddr, netmask, gateway; sys_sem_t sem; err_t err; @@ -65,6 +71,9 @@ void Init_Network() { //initial a network application ping_init(); + +#endif + }