diff options
| author | ruki <[email protected]> | 2022-12-29 23:25:47 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-12-29 23:25:47 +0800 |
| commit | d3f6a5c7ef552ca2ef4e35ba2eee7bd55f592a32 (patch) | |
| tree | a8315f39cf1a459fe1a3b244fca517e20799137b /xmake | |
| parent | 6a8bfb31c92db3e50e6bd21dbe2c6051b87d00fb (diff) | |
add includedir for c51 #3215
Diffstat (limited to 'xmake')
| -rw-r--r-- | xmake/modules/core/tools/c51.lua | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/xmake/modules/core/tools/c51.lua b/xmake/modules/core/tools/c51.lua index 1c87bbb28..c172d0bb6 100644 --- a/xmake/modules/core/tools/c51.lua +++ b/xmake/modules/core/tools/c51.lua @@ -28,6 +28,24 @@ import("utils.progress") function init(self) end +-- make the includedir flag +function nf_includedirs(self, dirs) + local paths = {} + for _, dir in ipairs(dirs) do + table.insert(paths, path.translate(dir)) + end + if #paths > 0 then + return {"INCDIR(" .. table.concat(paths, ";") .. ")"} + end +end + +-- make the define flag +function nf_defines(self, defines) + if defines and #defines > 0 then + return {"DEFINE(" .. table.concat(defines, ",") .. ")"} + end +end + -- make the compile arguments list function compargv(self, sourcefile, objectfile, flags) return self:program(), table.join(sourcefile, flags) |
