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:
parent
725a22ea36
commit
b583373e5e
@ -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)
|
||||
|
||||
14
examples/subfolders/folder/subfolder/c.c
Normal file
14
examples/subfolders/folder/subfolder/c.c
Normal 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");
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user