1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 06:23:53 +01:00

examples/subfolders: have two source files in subfolder

This commit is contained in:
Fabian Hüßler 2025-01-04 22:25:19 +01:00
parent 725a22ea36
commit b583373e5e
3 changed files with 17 additions and 1 deletions

View File

@ -13,7 +13,7 @@ USEMODULE += my_module # name as defined in module/Makefile
# Add source files in subfolders manually
SRC += main.c
SRC += folder/a.c folder/subfolder/b.c
SRC += folder/a.c folder/subfolder/b.c folder/subfolder/c.c
# Alternative method to add files in subfolders using wildcards
# SRC += $(wildcard *.c folder/*.c folder/**/*.c)

View File

@ -0,0 +1,14 @@
/*
* Copyright (C) 2025 ML!PA Consulting GmbH
*
* 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_c(void)
{
puts("./folder/subfolder/c.c");
}

View File

@ -24,6 +24,7 @@ void module_a(void);
void module_b(void);
void folder_a(void);
void folder_b(void);
void folder_c(void);
int main(void)
{
@ -34,6 +35,7 @@ int main(void)
// call functions from subfolder
folder_a();
folder_b();
folder_c();
return 0;
}