diff options
Diffstat (limited to 'tests/projects')
| -rw-r--r-- | tests/projects/mdk/hello/src/foo/foo.c | 4 | ||||
| -rw-r--r-- | tests/projects/mdk/hello/src/main.c | 4 | ||||
| -rw-r--r-- | tests/projects/mdk/hello/xmake.lua | 6 |
3 files changed, 13 insertions, 1 deletions
diff --git a/tests/projects/mdk/hello/src/foo/foo.c b/tests/projects/mdk/hello/src/foo/foo.c new file mode 100644 index 000000000..e51afb553 --- /dev/null +++ b/tests/projects/mdk/hello/src/foo/foo.c @@ -0,0 +1,4 @@ +int foo(int x)
+{
+ return x;
+}
diff --git a/tests/projects/mdk/hello/src/main.c b/tests/projects/mdk/hello/src/main.c index a6e46accc..28d909a18 100644 --- a/tests/projects/mdk/hello/src/main.c +++ b/tests/projects/mdk/hello/src/main.c @@ -1,4 +1,6 @@ +int foo(int x);
+
int main()
{
- return 0;
+ return foo(1);
}
diff --git a/tests/projects/mdk/hello/xmake.lua b/tests/projects/mdk/hello/xmake.lua index 710e29bcf..97d640297 100644 --- a/tests/projects/mdk/hello/xmake.lua +++ b/tests/projects/mdk/hello/xmake.lua @@ -1,5 +1,11 @@ add_rules("mode.debug", "mode.release") + +target("foo") + add_rules("mdk.static") + add_files("src/foo/*.c") + target("hello") + add_deps("foo") add_rules("mdk.console") add_files("src/*.c", "src/*.s") add_defines("__EVAL", "__MICROLIB") |
