Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
all: Make netutils.h available to all ports by default.
Generally, ports should inherit INC from py.mk, append to it, not overwrite it. TODO: Likely should do the same for other vars too.
- Loading branch information
Paul Sokolovsky
committed
Oct 19, 2015
1 parent
8ee153f
commit e0f5df5
Showing
10 changed files
with
11 additions
and
9 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 |
---|---|---|
|
@@ -8,7 +8,7 @@ include ../py/py.mk | |
|
||
CROSS_COMPILE = arm-none-eabi- | ||
|
||
INC = -I. | ||
INC += -I. | ||
INC += -I.. | ||
INC += -I$(BUILD) | ||
|
||
|
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
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
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
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
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
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
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
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
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
e0f5df5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dpgeorge , @dhylands : FYI, came out as prerequisite for generalizing #1517
This keeps current
#include <netutils.h>
working, but maybe we want to have-I../lib
to cover any lib module, or maybe even-I..
to have#include <lib/netutils/netutils.h>
, kinda for consistency with#include <py/...>
. (But note that we still will need custom includes in some cases, e.g. libffi, libaxtls - which have their own structure and build system).e0f5df5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally, I kind of like
<lib/netutils/netutils.h>
I think it makes it much clearer about where the header file is actually located, and as you suggested it is conistent with py/....
It also looks like we're already doing that in stmhal for things like "lib/fatfs/ff.h"
I agree that we may still need to add -I statements for libraries since they may well have their own include hierarchy needs. Files that we provide should still use the "lib/netutils/netutils.h" syntax and files that come from the external module will use whatever convention they've decided.
e0f5df5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, definitely we should move to
#include "lib/netutils/netutils.h"
etc. Much better that way, and facilitates pasting uPy into another code base.