Index: EcnlProtoTool/trunk/ntshell/Debug/Makefile
===================================================================
--- EcnlProtoTool/trunk/ntshell/Debug/Makefile	(revision 321)
+++ EcnlProtoTool/trunk/ntshell/Debug/Makefile	(revision 331)
@@ -203,7 +203,7 @@
 ifdef USE_CXX
 	APPL_CXXOBJS := main.o
-	APPL_COBJS := fdtable.o io_stub.o socket_stub.o ffarch.o time.o tlsf.o diskio.o ff.o sdfs.o ccsbcs.o base64.o http-strings.o http_parser.o httpd.o httpd-fs.o sha1.o websocket.o websocket_fbs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntstdio.o ntopt.o shellif.o
-else
-	APPL_COBJS := main.o fdtable.o io_stub.o socket_stub.o ffarch.o time.o tlsf.o diskio.o ff.o sdfs.o ccsbcs.o base64.o http-strings.o http_parser.o httpd.o httpd-fs.o sha1.o websocket.o websocket_fbs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntstdio.o ntopt.o shellif.o
+	APPL_COBJS := fdtable.o io_stub.o socket_stub.o ffarch.o fftime.o tlsf.o diskio.o ff.o sdfs.o ccsbcs.o base64.o http-strings.o http_parser.o httpd.o httpd-fs.o sha1.o websocket.o websocket_fbs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o mbedcall.o
+else
+	APPL_COBJS := main.o fdtable.o io_stub.o socket_stub.o ffarch.o fftime.o tlsf.o diskio.o ff.o sdfs.o ccsbcs.o base64.o http-strings.o http_parser.o httpd.o httpd-fs.o sha1.o websocket.o websocket_fbs.o ntshell.o text_editor.o text_history.o usrcmd.o vtrecv.o vtsend.o ntlibc.o ntstdio.o ntopt.o syscall.o mbedcall.o
 endif
 APPL_COBJS := $(APPL_COBJS) log_output.o vasyslog.o t_perror.o strerror.o
@@ -214,36 +214,36 @@
 endif
 
-#
-#  ãããã¯ã¼ã¯ãµã¼ãã¹ã®å®ç¾©
-#
-
-NO_USE_TINET_LIBRARY = true
-
-#  ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®é¸æãä½ããä¸ã¤é¸æããã
-
-NET_IF = ether
-
-#  ã¤ã¼ãµãããã»ãã£ãã¤ã¹ãã©ã¤ãã®é¸æ
-
-NET_DEV = if_mbed
-
-#  ãããã¯ã¼ã¯å±¤ã®é¸æ
-
-#SUPPORT_INET6 = true
-SUPPORT_INET4 = true
-
-#  API ã«çµè¾¼ãæ©è½ã®é¸æ
-
-#API_CFG_IP4MAPPED_ADDR = true
-
-#  ãã©ã³ã¹ãã¼ãå±¤ã®é¸æ
-
-SUPPORT_TCP = true
-SUPPORT_UDP = true
-
-#
-#  ã·ã¹ãã ãµã¼ãã¹ã® Makefile ã®ã¤ã³ã¯ã«ã¼ã
-#
-include $(SRCDIR)/tinet/Makefile.tinet
+TINETDIR = tinet
+ifdef TINETDIR
+	#
+	#  ãããã¯ã¼ã¯ãµã¼ãã¹ã®å®ç¾©
+	#
+	NO_USE_TINET_LIBRARY = true
+
+	#  ãããã¯ã¼ã¯ã¤ã³ã¿ãã§ã¼ã¹ã®é¸æãä½ããä¸ã¤é¸æããã
+	NET_IF = ether
+
+	#  ã¤ã¼ãµãããã»ãã£ãã¤ã¹ãã©ã¤ãã®é¸æ
+	NET_DEV = if_mbed
+
+	#  ãããã¯ã¼ã¯å±¤ã®é¸æ
+	#SUPPORT_INET6 = true
+	SUPPORT_INET4 = true
+
+	#  API ã«çµè¾¼ãæ©è½ã®é¸æ
+	#API_CFG_IP4MAPPED_ADDR = true
+
+	#  ãã©ã³ã¹ãã¼ãå±¤ã®é¸æ
+	SUPPORT_TCP = true
+	SUPPORT_UDP = true
+
+	# IGMPãæå¹ã«è¨­å®
+	SUPPORT_IGMP = true
+
+	#
+	#  ãããã¯ã¼ã¯ãµã¼ãã¹ã® Makefile ã®ã¤ã³ã¯ã«ã¼ã
+	#
+	include $(SRCDIR)/$(TINETDIR)/Makefile.tinet
+endif
 
 #
@@ -272,5 +272,4 @@
 #all: check $(OBJNAME).srec
 endif
-	ruby ../shellif.rb
 	$(OBJCOPY) -B arm -I binary -O elf32-littlearm --rename-section .data=.boot $(OBJNAME).bin $(OBJNAME)_bin.o
 
@@ -280,8 +279,15 @@
 #  ã³ã³ãã£ã®ã¥ã¬ã¼ã¿ã«é¢ããå®ç¾©
 #
-CFG_TABS := --api-table $(SRCDIR)/tinet/tcpip_api.def:tcpip \
+ifndef TINETDIR
+  CFG_TRB := -T $(TARGETDIR)/target_kernel.trb
+  CFG_TABS := --api-table $(SRCDIR)/kernel/kernel_api.def \
+			--symval-table $(SRCDIR)/kernel/kernel_sym.def $(CFG_TABS)
+else
+  CFG_TRB := -T $(TINET_ROOT)/tinet.trb:tcpip -T $(TARGETDIR)/target_kernel.trb:kernel
+  CFG_TABS := --api-table $(TINET_ROOT)/tcpip_api.def:tcpip \
 			--api-table $(SRCDIR)/kernel/kernel_api.def:kernel \
 			--symval-table $(SRCDIR)/tinet/tcpip_sym.def \
 			--symval-table $(SRCDIR)/kernel/kernel_sym.def $(CFG_TABS)
+endif
 CFG_ASMOBJS := $(CFG_ASMOBJS)
 CFG_COBJS := kernel_cfg.o $(CFG_COBJS)
@@ -353,5 +359,5 @@
 #
 KERNEL_LIB_OBJS = $(KERNEL_ASMOBJS) $(KERNEL_COBJS) $(KERNEL_LCOBJS)
-SYSSVC_OBJS = $(SYSSVC_ASMOBJS) $(SYSSVC_COBJS)
+SYSSVC_OBJS = $(SYSSVC_ASMOBJS) $(SYSSVC_COBJS) $(HIDDEN_OBJS)
 APPL_OBJS = $(APPL_ASMOBJS) $(APPL_COBJS) $(APPL_CXXOBJS) $(APPL_BINOBJS)
 ALL_OBJS = $(START_OBJS) $(APPL_OBJS) $(SYSSVC_OBJS) $(CFG_OBJS) \
@@ -395,4 +401,5 @@
 cfg1_out.c cfg1_out.db: cfg1_out.timestamp ;
 cfg1_out.timestamp: $(APPL_CFG) $(TECSGEN_TIMESTAMP)
+	echo $(CFG_TABS)
 	$(CFG) --pass 1 --kernel asp $(INCLUDES) $(CFG_TABS) \
 						-M $(DEPDIR)/cfg1_out_c.d $(TARGET_KERNEL_CFG) $<
@@ -410,5 +417,5 @@
 $(CFG2_OUT_SRCS) cfg2_out.db: kernel_cfg.timestamp ;
 kernel_cfg.timestamp: cfg1_out.db cfg1_out.syms cfg1_out.srec
-	$(CFG) --pass 2 --kernel asp $(INCLUDES) -T $(TARGET_TCPIP_TRB):tcpip -T $(TARGET_KERNEL_TRB):kernel
+	$(CFG) --pass 2 --kernel asp $(INCLUDES) $(CFG_TRB)
 
 #
@@ -483,5 +490,5 @@
 	rm -f cfg1_out.syms cfg1_out.srec $(CFG1_OUT)
 	rm -f cfg1_out.timestamp cfg1_out.c cfg1_out.db
-	rm -f $(TECSGENDIR)/*
+	rm -rf $(TECSGENDIR)
 ifndef KERNEL_LIB
 	rm -f libkernel.a
