diff --git a/sys/Makefile.include b/sys/Makefile.include index ca3bce1556e38cb1e12ed39df91a7ae7f1a602ef..ee40a88f82596db2e38ef50415f2eb50d27a0ffd 100644 --- a/sys/Makefile.include +++ b/sys/Makefile.include @@ -1,6 +1,3 @@ -ifneq (,$(filter auto_init,$(USEMODULE))) - include $(RIOTBASE)/sys/auto_init/Makefile.include -endif ifneq (,$(filter nomac,$(USEMODULE))) USEMODULE_INCLUDES += $(RIOTBASE)/sys/net/include endif diff --git a/sys/auto_init/Makefile b/sys/auto_init/Makefile index 68b09798d5553a18577e8eda0b38255ee493ebbf..f4594496decb632f1353608a47be8e1fad22d603 100644 --- a/sys/auto_init/Makefile +++ b/sys/auto_init/Makefile @@ -8,4 +8,8 @@ endif DIRS += $(AUTO_INIT_MODULES) +ifneq (,$(filter auto_init_ng_netif,$(USEMODULE))) +DIRS += netif +endif + include $(RIOTBASE)/Makefile.base diff --git a/sys/auto_init/Makefile.include b/sys/auto_init/Makefile.include deleted file mode 100644 index 6a868336669335fcb91301f3c1befad544608a6f..0000000000000000000000000000000000000000 --- a/sys/auto_init/Makefile.include +++ /dev/null @@ -1,13 +0,0 @@ -# try to find the ng_netif auto init implementation in the application or in -# the board, respectively. If it is not found, nothing is called. -ifneq (,$(filter ng_netif,$(USEMODULE))) - ifneq (,$(wildcard $(APPDIR)/auto_init_ng_netif/*)) - export AUTO_INIT_MODULES += $(APPDIR)/auto_init_ng_netif - export USEMODULE += auto_init_ng_netif - else - ifneq (,$(wildcard $(RIOTBOARD)/$(BOARD)/auto_init_ng_netif/*)) - export AUTO_INIT_MODULES += $(RIOTBOARD)/$(BOARD)/auto_init_ng_netif - export USEMODULE += auto_init_ng_netif - endif - endif -endif diff --git a/sys/auto_init/auto_init.c b/sys/auto_init/auto_init.c index b83f2bf23d4ee5c1b04e3fe20967a02870ac7988..a7ed09f13d560132dbf5130c3b0e7701e55bae04 100644 --- a/sys/auto_init/auto_init.c +++ b/sys/auto_init/auto_init.c @@ -306,8 +306,4 @@ void auto_init(void) DEBUG("Auto init UDP module.\n"); ng_udp_init(); #endif -#ifdef MODULE_AUTO_INIT_NG_NETIF - DEBUG("Auto init network interfaces.\n"); - auto_init_ng_netif(); -#endif } diff --git a/sys/auto_init/netif/Makefile b/sys/auto_init/netif/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..3003ef2f533adf29963c7b836eea0d167262ff86 --- /dev/null +++ b/sys/auto_init/netif/Makefile @@ -0,0 +1,3 @@ +MODULE = auto_init_ng_netif + +include $(RIOTBASE)/Makefile.base diff --git a/sys/include/auto_init.h b/sys/include/auto_init.h index d27e608b3a845374c2d2487b5d0d1f80c164a8ed..b957fe8d68a53beef45ebcb4b8e2753712ae5c1b 100644 --- a/sys/include/auto_init.h +++ b/sys/include/auto_init.h @@ -49,22 +49,6 @@ extern "C" { */ void auto_init(void); -/** - * @brief Initialize network interfaces and register them with ng_netif - * - * This function must be implemented in the board or in the application, - * in a subfolder that must be named auto_init_ng_netif - * This function is called under two conditions: - * 1. the ng_netif module is used (USEMODULE contains ng_netif) - * 2. the board or the application contains a subfolder called - * auto_init_ng_netif - * If the board and the application both contain the mentioned subfolder, - * the contents from the applications subfolder have a higher priority - * and will be compiled and linked, while the board's subfolder is then - * ignored. - */ -void auto_init_ng_netif(void); - #ifdef __cplusplus } #endif