Index: EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/Makefile.netapp
===================================================================
--- EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/Makefile.netapp	(revision 321)
+++ EcnlProtoTool/trunk/asp3_dcre/tinet/netapp/Makefile.netapp	(revision 331)
@@ -2,5 +2,5 @@
 #   TINET (TCP/IP Protocol Stack)
 #  
-#   Copyright (C) 2001-2009 by Dep. of Computer Science and Engineering
+#   Copyright (C) 2001-2017 by Dep. of Computer Science and Engineering
 #                    Tomakomai National College of Technology, JAPAN
 # 
@@ -50,11 +50,25 @@
 
 TINET_ROOT = $(SRCDIR)/tinet
-NETAPP_DIR = $(TINET_ROOT)/netapp
+NETAPP_DIRS = $(TINET_ROOT)/netapp
 NETAPP_COBJS := $(NETAPP_COBJS) netapp_subr.o
 
+ifeq ($(USE_LCD),true)
+
+	NETAPP_COBJS := $(NETAPP_COBJS) lcd.o
+
+ifeq ($(TARGET_KERNEL),ASP)
+	NETAPP_COBJS := $(NETAPP_COBJS) target_lcd.o sc1602.o
+endif
+
+ifeq ($(TARGET_KERNEL),JSP)
+	NETAPP_COBJS := $(NETAPP_COBJS) hw_lcd.o sc1602.o
+endif
+
+endif
+
 #  トランスポート層の選択
 
-SUPPORT_TCP = false
-SUPPORT_UDP = false
+#SUPPORT_TCP = false
+#SUPPORT_UDP = false
 
 # 
@@ -62,37 +76,87 @@
 # 
 
+ifeq ($(USE_WWW4_SRV),true)
+	USE_WWW_SRV = true
+	CDEFS := $(CDEFS) -DUSE_WWW4_SRV
+endif
+
 ifeq ($(USE_WWW_SRV),true)
-	SUPPORT_TCP = true
-	TCP_CFG_PASSIVE_OPEN = true
+
+	SUPPORT_TCP = true
 	USE_NETAPP_SUBR = true
 	CDEFS := $(CDEFS) -DUSE_WWW_SRV
 	NETAPP_COBJS := $(NETAPP_COBJS) wwws.o
-	NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIR)/wwws.cfg
+	NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIRS)/wwws.cfg
+
+endif
+
+ifeq ($(USE_TCP4_ECHO_SRV),true)
+	TCP_ECHO_SRV = tcp_echo_srv1
+	CDEFS := $(CDEFS) -DUSE_TCP4_ECHO_SRV
 endif
 
 ifeq ($(TCP_ECHO_SRV),tcp_echo_srv1)		# 送受信タスク同一型
-	SUPPORT_TCP = true
-	TCP_CFG_PASSIVE_OPEN = true
+
+	SUPPORT_TCP = true
 	USE_NETAPP_SUBR = true
 	CDEFS := $(CDEFS) -DUSE_TCP_ECHO_SRV1
 	NETAPP_COBJS := $(NETAPP_COBJS) tcp_echo_srv1.o
-	NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIR)/tcp_echo_srv1.cfg
+	NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIRS)/tcp_echo_srv1.cfg
+
+	ifeq ($(USE_TCP_NON_BLOCKING),true)
+		NETAPP_COBJS := $(NETAPP_COBJS) tcp_echo_srv1_nblk.o
+	endif
+
+	ifeq ($(USE_TCP_EXTENTIONS),true)
+		NETAPP_COBJS := $(NETAPP_COBJS) tcp_echo_srv1_ext.o
+	endif
+
 endif
 
 ifeq ($(TCP_ECHO_SRV),tcp_echo_srv2)		# 送受信タスク分離型
 	SUPPORT_TCP = true
-	TCP_CFG_PASSIVE_OPEN = true
 	USE_NETAPP_SUBR = true
 	CDEFS := $(CDEFS) -DUSE_TCP_ECHO_SRV2
 	NETAPP_COBJS := $(NETAPP_COBJS) tcp_echo_srv2.o
-	NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIR)/tcp_echo_srv2.cfg
+	NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIRS)/tcp_echo_srv2.cfg
+endif
+
+ifeq ($(USE_UDP4_ECHO_SRV),true)
+	USE_UDP_ECHO_SRV = true
 endif
 
 ifeq ($(USE_UDP_ECHO_SRV),true)
-	SUPPORT_UDP = true
-	USE_NETAPP_SUBR = true
+
 	CDEFS := $(CDEFS) -DUSE_UDP_ECHO_SRV
-	NETAPP_COBJS := $(NETAPP_COBJS) udp_echo_srv.o
-	NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIR)/udp_echo_srv.cfg
+
+	ifeq ($(SUPPORT_INET6),true)
+		SUPPORT_UDP = true
+		USE_NETAPP_SUBR = true
+		CDEFS := $(CDEFS) -DUSE_UDP6_ECHO_SRV_TSK
+		NETAPP_COBJS := $(NETAPP_COBJS) udp6_echo_srv.o
+		NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIRS)/udp6_echo_srv.cfg
+
+		ifeq ($(SUPPORT_INET4),true)
+			ifeq ($(USE_UDP4_ECHO_SRV),true)
+				CDEFS := $(CDEFS) -DUSE_UDP4_ECHO_SRV_TSK
+				NETAPP_COBJS := $(NETAPP_COBJS) udp4_echo_srv.o
+				NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIRS)/udp4_echo_srv.cfg
+			endif
+		endif
+	else
+		ifeq ($(SUPPORT_INET4),true)
+			SUPPORT_UDP = true
+			USE_NETAPP_SUBR = true
+			CDEFS := $(CDEFS) -DUSE_UDP4_ECHO_SRV_TSK
+			NETAPP_COBJS := $(NETAPP_COBJS) udp4_echo_srv.o
+			NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIRS)/udp4_echo_srv.cfg
+		endif
+	endif
+endif
+
+
+ifeq ($(USE_TCP4_ECHO_CLI),true)
+	USE_TCP_ECHO_CLI = true
+	CDEFS := $(CDEFS) -DUSE_TCP4_ECHO_CLI
 endif
 
@@ -101,23 +165,48 @@
 	USE_NETAPP_SUBR = true
 	CDEFS := $(CDEFS) -DUSE_TCP_ECHO_CLI
-	NETAPP_COBJS := $(NETAPP_COBJS) tcp_echo_cli.o
-	NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIR)/tcp_echo_cli.cfg
+	NETAPP_COBJS := $(NETAPP_COBJS) tcp_echo_cli.o tcp_echo_cli_snd.o tcp_echo_cli_rcv.o
+	NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIRS)/tcp_echo_cli.cfg
+endif
+
+ifeq ($(USE_UDP4_ECHO_CLI),true)
+	USE_UDP_ECHO_CLI = true
 endif
 
 ifeq ($(USE_UDP_ECHO_CLI),true)
-	SUPPORT_UDP = true
-	USE_NETAPP_SUBR = true
+
 	CDEFS := $(CDEFS) -DUSE_UDP_ECHO_CLI
-	NETAPP_COBJS := $(NETAPP_COBJS) udp_echo_cli.o
-	NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIR)/udp_echo_cli.cfg
+
+	ifeq ($(SUPPORT_INET6),true)
+		SUPPORT_UDP = true
+		USE_NETAPP_SUBR = true
+		CDEFS := $(CDEFS) -DUSE_UDP6_ECHO_CLI_TSK
+		NETAPP_COBJS := $(NETAPP_COBJS) udp6_echo_cli.o
+		NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIRS)/udp6_echo_cli.cfg
+	
+		ifeq ($(SUPPORT_INET4),true)
+			ifeq ($(USE_UDP4_ECHO_CLI),true)
+				CDEFS := $(CDEFS) -DUSE_UDP4_ECHO_CLI_TSK
+				NETAPP_COBJS := $(NETAPP_COBJS) udp4_echo_cli.o
+				NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIRS)/udp4_echo_cli.cfg
+			endif
+		endif
+        else
+		ifeq ($(SUPPORT_INET4),true)
+			SUPPORT_UDP = true
+			USE_NETAPP_SUBR = true
+			CDEFS := $(CDEFS) -DUSE_UDP4_ECHO_CLI_TSK
+			NETAPP_COBJS := $(NETAPP_COBJS) udp4_echo_cli.o
+			NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIRS)/udp4_echo_cli.cfg
+		endif
+
+	endif
 endif
 
 ifeq ($(USE_TCP_DISCARD_SRV),true)
 	SUPPORT_TCP = true
-	TCP_CFG_PASSIVE_OPEN = true
 	USE_NETAPP_SUBR = true
 	CDEFS := $(CDEFS) -DUSE_TCP_DISCARD_SRV
 	NETAPP_COBJS := $(NETAPP_COBJS) tcp_discard_srv.o
-	NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIR)/tcp_discard_srv.cfg
+	NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIRS)/tcp_discard_srv.cfg
 endif
 
@@ -127,5 +216,5 @@
 	CDEFS := $(CDEFS) -DUSE_TCP_DISCARD_CLI
 	NETAPP_COBJS := $(NETAPP_COBJS) tcp_discard_cli.o
-	NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIR)/tcp_discard_cli.cfg
+	NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIRS)/tcp_discard_cli.cfg
 endif
 
@@ -135,5 +224,5 @@
 	CDEFS := $(CDEFS) -DUSE_UDP_DISCARD_CLI
 	NETAPP_COBJS := $(NETAPP_COBJS) udp_discard_cli.o
-	NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIR)/udp_discard_cli.cfg
+	NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIRS)/udp_discard_cli.cfg
 endif
 
@@ -141,37 +230,61 @@
 	ifeq ($(TCP_CFG_NON_BLOCKING),true)
 		SUPPORT_TCP = true
-		TCP_CFG_PASSIVE_OPEN = true
 		USE_DBG_CONS = true
 		USE_NETAPP_SUBR = true
 		CDEFS := $(CDEFS) -DUSE_NET_CONS
 		NETAPP_COBJS := $(NETAPP_COBJS) net_cons.o
-		NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIR)/net_cons.cfg
+		NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIRS)/net_cons.cfg
 	endif
 endif
 
 ifeq ($(USE_DBG_CONS),true)
-
 	USE_NETAPP_SUBR = true
 	CDEFS := $(CDEFS) -DUSE_DBG_CONS
 	NETAPP_COBJS := $(NETAPP_COBJS) dbg_cons.o 
-	NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIR)/dbg_cons.cfg
-
+	NETAPP_KERNEL_CFG := $(NETAPP_KERNEL_CFG) $(NETAPP_DIRS)/dbg_cons.cfg
+	ifeq ($(USE_DBG_CONS_PARSER),true)
+		CDEFS := $(CDEFS) -DUSE_DBG_CONS_PARSER
+	endif
+	ifeq ($(USE_DBG_CONS_EXTRA_PARSE),true)
+		CDEFS := $(CDEFS) -DUSE_DBG_CONS_EXTRA_PARSE
+	endif
 endif
 
 ifeq ($(USE_PING),true)
-
 	USE_NETAPP_SUBR = true
 	CDEFS := $(CDEFS) -DUSE_PING
-
 	ifeq ($(SUPPORT_INET4),true)
-
 		NETAPP_COBJS := $(NETAPP_COBJS) ping.o
 	endif
-
 	ifeq ($(SUPPORT_INET6),true)
-
 		NETAPP_COBJS := $(NETAPP_COBJS) ping6.o
 	endif
-
+endif
+
+ifeq ($(USE_RESOLVER),true)
+	SUPPORT_UDP = true
+	CDEFS := $(CDEFS) -DUSE_RESOLVER
+	NETAPP_COBJS := $(NETAPP_COBJS) resolver.o 
+
+endif
+
+ifeq ($(USE_DHCP6_CLI),true)
+	ifeq ($(SUPPORT_INET6),true)
+		SUPPORT_UDP = true
+		UDP_CFG_NON_BLOCKING = true
+		USE_UDP_NON_BLOCKING = true
+		CDEFS := $(CDEFS) -DDHCP6_CLI_CFG
+		NETAPP_COBJS := $(NETAPP_COBJS) dhcp6_cli.o 
+	endif
+endif
+
+ifeq ($(USE_DHCP4_CLI),true)
+	ifeq ($(SUPPORT_INET4),true)
+		SUPPORT_UDP = true
+		UDP_CFG_NON_BLOCKING = true
+		USE_UDP_NON_BLOCKING = true
+		CDEFS := $(CDEFS) -DDHCP4_CLI_CFG
+		NETAPP_COBJS := $(NETAPP_COBJS) dhcp4_cli.o 
+	endif
 endif
 
@@ -180,10 +293,10 @@
 endif
 
+ifeq ($(API_CFG_IP4MAPPED_ADDR),true)
+	CDEFS := $(CDEFS) -DAPI_CFG_IP4MAPPED_ADDR
+endif
+
 ifeq ($(USE_COPYSAVE_API),true)
 	CDEFS := $(CDEFS) -DUSE_COPYSAVE_API
-endif
-
-ifndef TCP_CFG_PASSIVE_OPEN
-	CDEFS := $(CDEFS) -DUNDEF_TCP_CFG_PASSIVE_OPEN
 endif
 
@@ -241,4 +354,8 @@
 endif
 
+ifeq ($(USE_LCD),true)
+	CDEFS := $(CDEFS) -DUSE_LCD
+endif
+
 #
 #  アプリケーションプログラムに関する定義への追加
@@ -247,5 +364,5 @@
 ifeq ($(TARGET_KERNEL),ASP)
 
-	APPLDIR := $(APPLDIR) $(NETAPP_DIR)
+	APPLDIR := $(APPLDIR) $(NETAPP_DIRS)
 	APPL_COBJS := $(APPL_COBJS) $(NETAPP_COBJS)
 	APPL_CFLAGS := $(APPL_CFLAGS) -fno-strict-aliasing
@@ -255,5 +372,5 @@
 ifeq ($(TARGET_KERNEL),JSP)
 
-	UTASK_DIR := $(UTASK_DIR):$(NETAPP_DIR)
+	UTASK_DIRS := $(UTASK_DIRS):$(NETAPP_DIRS)
 	UTASK_COBJS := $(UTASK_COBJS) $(NETAPP_COBJS)
 	UTASK_CFLAGS := $(UTASK_CFLAGS) -fno-strict-aliasing
@@ -261,4 +378,20 @@
 endif
 
+ifeq ($(USE_LCD),true)
+
+ifeq ($(TARGET_KERNEL),ASP)
+
+	APPLDIR := $(APPLDIR) $(SRCDIR)/pdic/sc1602
+
+endif
+
+ifeq ($(TARGET_KERNEL),JSP)
+
+	UTASK_DIRS := $(UTASK_DIRS):$(SRCDIR)/pdic/sc1602
+
+endif
+
+endif
+
 #
 #  TINET コンフィギュレーションファイルの定義への追加
