Skip to content

How to use subdirectories in project workspace #13007

@ghost

Description

Description

Let say i have a workspace setup in VSCode like this:

├── lucidy
│   ├── drivers
│   │   └── rfm95w
│   │       ├── rfm95w.c
│   │       ├── rfm95w.h
│   │       ├── rfm95w_reg.h
│   │       └── rfm95w_settings.h
│   ├── test.c
│   └── test.h
├── main.c
├── Makefile
└── README.md

How do i setup my Makefile so i can use the code in the main.c like this?:

#include "lucidy/drivers/rfm95w/rfm95w.h"
#include "lucidy/test.h"

int main(void) {
...
};

I am building an "Second Layer" abstraction "Library" for RIOT OS as many of my clients like to work in this RTOS but they have some difficulties adjusting from a C++ background (so i am kind of hacking in OOP in C on top of RIOT OS). If it would be possible to use this current workspace structure this would be really great for them, as they can more easily port their existing drivers to RIOT OS.

Useful links

I have looked online at using make to recursively search for source and header files, but I have no idea where to use it. Do i have to make changes to ($RIOT_BASE)/Makefile.include or another file. Or can i just do something in my own workspace Makefile?

Thanks for the help anyway!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: build systemArea: Build systemType: questionThe issue poses a question regarding usage of RIOT

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions