forked from RIOT-OS/RIOT
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
146 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
include ../Makefile.build_system_common | ||
|
||
# Add subfolders as modules | ||
DIRS += module_testing | ||
USEMODULE += my_module | ||
|
||
# Add fmt to read blob | ||
USEMODULE += fmt | ||
|
||
# Add blobs | ||
BLOBS += blob/blob_subdir/blobtest_subdir.txt | ||
|
||
SRC += main.c | ||
SRC += folder/a.c blob/blob_test.c folder/subfolder/b.c | ||
# # Alternative method to add files in subfolders using wildcards | ||
# # SRC += $(wildcard *.c blob/*.c folder/*.c folder/**/*.c) | ||
|
||
include $(RIOTBASE)/Makefile.include |
1 change: 1 addition & 0 deletions
1
tests/build_system/src_folders/blob/blob_subdir/blobtest_subdir.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Hello blob_subdir! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* Copyright (C) 2024 Orange | ||
* | ||
* This file is subject to the terms and conditions of the GNU Lesser | ||
* General Public License v2.1. See the file LICENSE in the top level | ||
* directory for more details. | ||
*/ | ||
|
||
#include "fmt.h" | ||
|
||
#include "blob/blob/blob_subdir/blobtest_subdir.txt.h" | ||
|
||
void blob_print(void) | ||
{ | ||
print((char *)blobtest_subdir_txt, blobtest_subdir_txt_len); | ||
print("\n", 1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
* Copyright (C) 2023 TU Dresden | ||
* Copyright (C) 2024 Orange | ||
* | ||
* This file is subject to the terms and conditions of the GNU Lesser | ||
* General Public License v2.1. See the file LICENSE in the top level | ||
* directory for more details. | ||
*/ | ||
|
||
#include <stdio.h> | ||
|
||
void folder_a(void) | ||
{ | ||
puts("./folder/a.c"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
* Copyright (C) 2023 TU Dresden | ||
* Copyright (C) 2024 Orange | ||
* | ||
* This file is subject to the terms and conditions of the GNU Lesser | ||
* General Public License v2.1. See the file LICENSE in the top level | ||
* directory for more details. | ||
*/ | ||
|
||
#include <stdio.h> | ||
|
||
void folder_b(void) | ||
{ | ||
puts("./folder/subfolder/b.c"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Copyright (C) 2024 Orange | ||
* | ||
* This file is subject to the terms and conditions of the GNU Lesser | ||
* General Public License v2.1. See the file LICENSE in the top level | ||
* directory for more details. | ||
*/ | ||
|
||
|
||
/** | ||
* @ingroup tests | ||
* @{ | ||
* | ||
* @file | ||
* @brief Test proving SRC subfolders compatibility with RIOT. | ||
* | ||
* @author Pierre Le Meur <pierre1.lemeur@orange.com> | ||
* | ||
* | ||
* @} | ||
*/ | ||
|
||
#include <stdio.h> | ||
|
||
void module_a(void); | ||
void module_b(void); | ||
void folder_a(void); | ||
void folder_b(void); | ||
void blob_print(void); | ||
|
||
int main(void) | ||
{ | ||
puts("./main.c"); | ||
|
||
/* call functions from RIOT module */ | ||
module_a(); | ||
module_b(); | ||
/* call functions from subfolder */ | ||
folder_a(); | ||
folder_b(); | ||
|
||
/* blob test */ | ||
blob_print(); | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
MODULE := my_module | ||
|
||
include $(RIOTBASE)/Makefile.base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* | ||
* Copyright (C) 2023 TU Dresden | ||
* Copyright (C) 2024 Orange | ||
* | ||
* This file is subject to the terms and conditions of the GNU Lesser | ||
* General Public License v2.1. See the file LICENSE in the top level | ||
* directory for more details. | ||
*/ | ||
|
||
|
||
#include <stdio.h> | ||
|
||
void module_a(void) | ||
{ | ||
puts("./module_testing/a.c"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* | ||
* Copyright (C) 2023 TU Dresden | ||
* Copyright (C) 2024 Orange | ||
* | ||
* This file is subject to the terms and conditions of the GNU Lesser | ||
* General Public License v2.1. See the file LICENSE in the top level | ||
* directory for more details. | ||
*/ | ||
|
||
#include <stdio.h> | ||
|
||
void module_b(void) | ||
{ | ||
puts("./module_testing/b.c"); | ||
} |