From eb86e15d965d70e9b866ffc83a1426b852636847 Mon Sep 17 00:00:00 2001 From: Seongil Hahm Date: Fri, 1 Sep 2017 01:04:53 -0700 Subject: [PATCH] Move slsi_wifi from apps/ to external/ External libraries have to be moved to external/ folder. slsi_wifi belongs to this category, especially maintained by S.LSI. --- apps/examples/artik_demo/artik_demo.c | 2 +- apps/examples/easysetup/wifi_api.c | 1 - apps/examples/easysetup/wifi_api.h | 2 +- apps/examples/slsiwifi/Makefile | 3 - apps/examples/slsiwifi/nettest_functions.c | 2 +- apps/examples/slsiwifi/slsiwifi_main.c | 3 +- apps/examples/slsiwifi/slsiwifi_main.h | 2 +- .../ta_tc/device_management/itc/itc_dm_main.c | 2 +- .../ta_tc/device_management/utc/utc_dm_main.c | 2 +- apps/examples/wakaama_client/wakaama_client.c | 2 +- apps/netutils/wifi/Makefile | 95 ---------------------- external/Makefile | 4 + .../include/slsi_wifi}/slsi_wifi_api.h | 0 .../include/slsi_wifi}/slsi_wifi_nvmap.h | 0 .../include/slsi_wifi}/slsi_wifi_utils.h | 0 .../build_common/tizenrt/SConscript | 3 +- .../src/ip_adapter/tizenrt/caipnwmonitor.c | 2 +- {apps/netutils/wifi => external/slsi_wifi}/Kconfig | 0 .../netutils/wifi => external/slsi_wifi}/Make.defs | 12 ++- .../wifi => external/slsi_wifi}/slsi_wifi_api.c | 4 +- .../wifi => external/slsi_wifi}/slsi_wifi_utils.c | 2 +- .../src/dm/arch/sidk_s5jt200/s5j_dm_connectivity.c | 4 +- os/fs/procfs/fs_procfscm.c | 2 +- 23 files changed, 32 insertions(+), 117 deletions(-) delete mode 100644 apps/netutils/wifi/Makefile rename {apps/include/netutils/wifi => external/include/slsi_wifi}/slsi_wifi_api.h (100%) rename {apps/include/netutils/wifi => external/include/slsi_wifi}/slsi_wifi_nvmap.h (100%) rename {apps/include/netutils/wifi => external/include/slsi_wifi}/slsi_wifi_utils.h (100%) rename {apps/netutils/wifi => external/slsi_wifi}/Kconfig (100%) rename {apps/netutils/wifi => external/slsi_wifi}/Make.defs (88%) rename {apps/netutils/wifi => external/slsi_wifi}/slsi_wifi_api.c (99%) rename {apps/netutils/wifi => external/slsi_wifi}/slsi_wifi_utils.c (99%) diff --git a/apps/examples/artik_demo/artik_demo.c b/apps/examples/artik_demo/artik_demo.c index 9c898cd..971cd24 100644 --- a/apps/examples/artik_demo/artik_demo.c +++ b/apps/examples/artik_demo/artik_demo.c @@ -39,7 +39,7 @@ #include #include -#include +#include /**************************************************************************** * Definitions diff --git a/apps/examples/easysetup/wifi_api.c b/apps/examples/easysetup/wifi_api.c index 46f1aa9..a1af7f5 100644 --- a/apps/examples/easysetup/wifi_api.c +++ b/apps/examples/easysetup/wifi_api.c @@ -12,7 +12,6 @@ #include #include #endif -#include "apps/netutils/wifi/slsi_wifi_api.h" #include "wifi_api.h" #ifndef BIT diff --git a/apps/examples/easysetup/wifi_api.h b/apps/examples/easysetup/wifi_api.h index 17709cb..649dad8 100644 --- a/apps/examples/easysetup/wifi_api.h +++ b/apps/examples/easysetup/wifi_api.h @@ -1,6 +1,6 @@ #ifndef _WIFI_API_H_ #define _WIFI_API_H_ -#include "apps/netutils/wifi/slsi_wifi_api.h" +#include enum wifi_state { WIFI_CONNECTED, diff --git a/apps/examples/slsiwifi/Makefile b/apps/examples/slsiwifi/Makefile index acc6c6c..1f1c290 100644 --- a/apps/examples/slsiwifi/Makefile +++ b/apps/examples/slsiwifi/Makefile @@ -36,7 +36,6 @@ MAINSRC = slsiwifi_main.c OBJS = $(CSRCS:.c=$(OBJEXT)) CFLAGS += -DCONFIG_CTRL_IFACE -DCONFIG_CTRL_IFACE_FIFO -CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(APPDIR)$(DELIM)include$(DELIM)netutils$(DELIM)wifi} CONFIG_EXAMPLES_SLSIWIFI_PROGNAME ?= slsiwifi$(EXEEXT) PROGNAME = $(CONFIG_EXAMPLES_SLSIWIFI_PROGNAME) @@ -49,8 +48,6 @@ SRCS = $(ASRCS) $(CSRCS) $(MAINSRC) OBJS = $(AOBJS) $(COBJS) CFLAGS += -DCONFIG_CTRL_IFACE -DCONFIG_CTRL_IFACE_FIFO -CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(APPDIR)$(DELIM)include$(DELIM)netutils$(DELIM)wifi} - ifneq ($(CONFIG_BUILD_KERNEL),y) OBJS += $(MAINOBJ) diff --git a/apps/examples/slsiwifi/nettest_functions.c b/apps/examples/slsiwifi/nettest_functions.c index 45f406f..3e881d9 100644 --- a/apps/examples/slsiwifi/nettest_functions.c +++ b/apps/examples/slsiwifi/nettest_functions.c @@ -26,7 +26,7 @@ #include #include -#include +#include #include "slsiwifi_main.h" #ifdef CONFIG_NET_LWIP diff --git a/apps/examples/slsiwifi/slsiwifi_main.c b/apps/examples/slsiwifi/slsiwifi_main.c index 2979ccf..885495b 100644 --- a/apps/examples/slsiwifi/slsiwifi_main.c +++ b/apps/examples/slsiwifi/slsiwifi_main.c @@ -26,8 +26,7 @@ #include #include #include -#include -#include +#include #include "output_functions.h" // the mm functions are badly guarded with CONFIG_DEBUG #ifndef CONFIG_DEBUG diff --git a/apps/examples/slsiwifi/slsiwifi_main.h b/apps/examples/slsiwifi/slsiwifi_main.h index 98ef44e..3fb5358 100644 --- a/apps/examples/slsiwifi/slsiwifi_main.h +++ b/apps/examples/slsiwifi/slsiwifi_main.h @@ -22,7 +22,7 @@ #include #include #include -#include "slsi_wifi_api.h" +#include #include "nettest_functions.h" void sw_linkUpHandler(slsi_reason_t *reason); diff --git a/apps/examples/testcase/ta_tc/device_management/itc/itc_dm_main.c b/apps/examples/testcase/ta_tc/device_management/itc/itc_dm_main.c index a33b998..5015e53 100644 --- a/apps/examples/testcase/ta_tc/device_management/itc/itc_dm_main.c +++ b/apps/examples/testcase/ta_tc/device_management/itc/itc_dm_main.c @@ -29,7 +29,7 @@ #include -#include +#include #define NET_DEVNAME "wl1" diff --git a/apps/examples/testcase/ta_tc/device_management/utc/utc_dm_main.c b/apps/examples/testcase/ta_tc/device_management/utc/utc_dm_main.c index 6c68c94..b020cfb 100644 --- a/apps/examples/testcase/ta_tc/device_management/utc/utc_dm_main.c +++ b/apps/examples/testcase/ta_tc/device_management/utc/utc_dm_main.c @@ -28,7 +28,7 @@ #include #include -#include +#include #define NET_DEVNAME "wl1" diff --git a/apps/examples/wakaama_client/wakaama_client.c b/apps/examples/wakaama_client/wakaama_client.c index 7ab6af8..03d2296 100644 --- a/apps/examples/wakaama_client/wakaama_client.c +++ b/apps/examples/wakaama_client/wakaama_client.c @@ -29,7 +29,7 @@ #include -#include +#include #define NET_DEVNAME "wl1" diff --git a/apps/netutils/wifi/Makefile b/apps/netutils/wifi/Makefile deleted file mode 100644 index 2cfe5e4..0000000 --- a/apps/netutils/wifi/Makefile +++ /dev/null @@ -1,95 +0,0 @@ -########################################################################### -# -# Copyright 2017 Samsung Electronics All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, -# either express or implied. See the License for the specific -# language governing permissions and limitations under the License. -# -########################################################################### --include $(TOPDIR)/.config --include $(TOPDIR)/Make.defs --include $(APPDIR)/Make.defs - -# WiFi Networking API - -ASRCS = -CSRCS = - -ifeq ($(CONFIG_NETUTILS_WIFI),y) -CSRCS += \ - slsi_wifi_api.c \ - slsi_wifi_utils.c -endif - -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) - -SRCS = $(ASRCS) $(CSRCS) -OBJS = $(AOBJS) $(COBJS) - -ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) -else -ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) -else - BIN = ../../libapps$(LIBEXT) -endif -endif - -CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(APPDIR)$(DELIM)wpa_supplicant$(DELIM)src \ - $(APPDIR)$(DELIM)wpa_supplicant$(DELIM)src$(DELIM)utils \ - $(APPDIR)$(DELIM)wpa_supplicant$(DELIM)src$(DELIM)common \ - $(APPDIR)$(DELIM)include$(DELIM)netutils$(DELIM)wifi} - -ROOTDEPPATH = --dep-path . - -# Common build - -VPATH = - -all: .built -.PHONY: context depend clean distclean - -$(AOBJS): %$(OBJEXT): %.S - $(call ASSEMBLE, $<, $@) - -$(COBJS): %$(OBJEXT): %.c - $(call COMPILE, $<, $@) - -.built: $(OBJS) - $(call ARCHIVE, $(BIN), $(OBJS)) - $(Q) touch .built - -install: - -context: - -.depend: Makefile $(SRCS) - $(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep - $(Q) touch $@ - -depend: .depend - -clean: - $(call DELFILE, .built) - $(call CLEAN) - -distclean: clean - $(call DELFILE, Make.dep) - $(call DELFILE, .depend) - -context: - --include Make.dep -.PHONY: preconfig -preconfig: diff --git a/external/Makefile b/external/Makefile index da9a480..df2f9b8 100644 --- a/external/Makefile +++ b/external/Makefile @@ -77,6 +77,10 @@ include aws/Make.defs include aws/src/Make.defs endif +ifeq ($(CONFIG_NETUTILS_WIFI),y) +include slsi_wifi/Make.defs +endif + AOBJS = $(ASRCS:.S=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT)) CXXOBJS = $(CXXSRCS:.cpp=$(OBJEXT)) diff --git a/apps/include/netutils/wifi/slsi_wifi_api.h b/external/include/slsi_wifi/slsi_wifi_api.h similarity index 100% rename from apps/include/netutils/wifi/slsi_wifi_api.h rename to external/include/slsi_wifi/slsi_wifi_api.h diff --git a/apps/include/netutils/wifi/slsi_wifi_nvmap.h b/external/include/slsi_wifi/slsi_wifi_nvmap.h similarity index 100% rename from apps/include/netutils/wifi/slsi_wifi_nvmap.h rename to external/include/slsi_wifi/slsi_wifi_nvmap.h diff --git a/apps/include/netutils/wifi/slsi_wifi_utils.h b/external/include/slsi_wifi/slsi_wifi_utils.h similarity index 100% rename from apps/include/netutils/wifi/slsi_wifi_utils.h rename to external/include/slsi_wifi/slsi_wifi_utils.h diff --git a/external/iotivity/iotivity_1.2-rel/build_common/tizenrt/SConscript b/external/iotivity/iotivity_1.2-rel/build_common/tizenrt/SConscript index 68aaf09..ba2c76e 100644 --- a/external/iotivity/iotivity_1.2-rel/build_common/tizenrt/SConscript +++ b/external/iotivity/iotivity_1.2-rel/build_common/tizenrt/SConscript @@ -78,11 +78,12 @@ if env.get('LOGGING'): dep_src_dir1 = os.path.join(tizenrt_os_dir, 'include') dep_src_dir2 = os.path.join(tizenrt_os_dir, 'include/tinyara') +dep_src_dir3 = os.path.join(tizenrt_os_dir, '../external/include') dep_lib_dir = '/usr/lib/arm-none-eabi/include' # Add directories to search for header files and external libraries -env.AppendUnique(CPPPATH = [ dep_src_dir1, dep_src_dir2 ]) +env.AppendUnique(CPPPATH = [ dep_src_dir1, dep_src_dir2, dep_src_dir3 ]) env.AppendUnique(LIBPATH = [ dep_lib_dir ]) print env.get('CPPPATH') diff --git a/external/iotivity/iotivity_1.2-rel/resource/csdk/connectivity/src/ip_adapter/tizenrt/caipnwmonitor.c b/external/iotivity/iotivity_1.2-rel/resource/csdk/connectivity/src/ip_adapter/tizenrt/caipnwmonitor.c index c36191b..c169a29 100644 --- a/external/iotivity/iotivity_1.2-rel/resource/csdk/connectivity/src/ip_adapter/tizenrt/caipnwmonitor.c +++ b/external/iotivity/iotivity_1.2-rel/resource/csdk/connectivity/src/ip_adapter/tizenrt/caipnwmonitor.c @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include "octhread.h" #include "caipnwmonitor.h" diff --git a/apps/netutils/wifi/Kconfig b/external/slsi_wifi/Kconfig similarity index 100% rename from apps/netutils/wifi/Kconfig rename to external/slsi_wifi/Kconfig diff --git a/apps/netutils/wifi/Make.defs b/external/slsi_wifi/Make.defs similarity index 88% rename from apps/netutils/wifi/Make.defs rename to external/slsi_wifi/Make.defs index 6ef5948..2b1c577 100644 --- a/apps/netutils/wifi/Make.defs +++ b/external/slsi_wifi/Make.defs @@ -51,5 +51,15 @@ ############################################################################ ifeq ($(CONFIG_NETUTILS_WIFI),y) -CONFIGURED_APPS += netutils/wifi + +CSRCS += slsi_wifi_api.c +CSRCS += slsi_wifi_utils.c + +CFLAGS += -I$(TOPDIR)$(DELIM)../apps$(DELIM)wpa_supplicant$(DELIM)src +CFLAGS += -I$(TOPDIR)$(DELIM)../apps$(DELIM)wpa_supplicant$(DELIM)src$(DELIM)utils +CFLAGS += -I$(TOPDIR)$(DELIM)../apps$(DELIM)wpa_supplicant$(DELIM)src$(DELIM)common + +DEPPATH += --dep-path slsi_wifi +VPATH += :slsi_wifi + endif diff --git a/apps/netutils/wifi/slsi_wifi_api.c b/external/slsi_wifi/slsi_wifi_api.c similarity index 99% rename from apps/netutils/wifi/slsi_wifi_api.c rename to external/slsi_wifi/slsi_wifi_api.c index b5de9a6..0062a64 100644 --- a/apps/netutils/wifi/slsi_wifi_api.c +++ b/external/slsi_wifi/slsi_wifi_api.c @@ -33,8 +33,8 @@ #include #include #include -#include -#include +#include +#include extern int wpa_supplicant_main(int argc, char *argv[]); /* Reuse SSID decoder from wpa_supplicant: mind requires buf to be len+1 long to avoid mem corruption*/ diff --git a/apps/netutils/wifi/slsi_wifi_utils.c b/external/slsi_wifi/slsi_wifi_utils.c similarity index 99% rename from apps/netutils/wifi/slsi_wifi_utils.c rename to external/slsi_wifi/slsi_wifi_utils.c index 315edad..8614bb5 100644 --- a/apps/netutils/wifi/slsi_wifi_utils.c +++ b/external/slsi_wifi/slsi_wifi_utils.c @@ -30,7 +30,7 @@ #include #include #include -#include "slsi_wifi_api.h" +#include /* Supported security modes as string */ #define SLSI_WIFI_SECURITY_OPEN "open" diff --git a/framework/src/dm/arch/sidk_s5jt200/s5j_dm_connectivity.c b/framework/src/dm/arch/sidk_s5jt200/s5j_dm_connectivity.c index 583d9f0..23224ce 100644 --- a/framework/src/dm/arch/sidk_s5jt200/s5j_dm_connectivity.c +++ b/framework/src/dm/arch/sidk_s5jt200/s5j_dm_connectivity.c @@ -41,8 +41,8 @@ #include #include -#include -#include +#include +#include #include #define DM_GET_INTERFACE_INFO 0 diff --git a/os/fs/procfs/fs_procfscm.c b/os/fs/procfs/fs_procfscm.c index 7812f50..270e015 100644 --- a/os/fs/procfs/fs_procfscm.c +++ b/os/fs/procfs/fs_procfscm.c @@ -48,7 +48,7 @@ #include #if defined(CONFIG_ARCH_BOARD_SIDK_S5JT200) -#include "slsi_wifi_api.h" +#include #endif #if !defined(CONFIG_DISABLE_MOUNTPOINT) && defined(CONFIG_FS_PROCFS) -- 2.7.4