From 938de3acc4a0972cff01d12a9549222c23c1a656 Mon Sep 17 00:00:00 2001 From: Alejandro Sior Date: Wed, 3 Aug 2022 16:10:58 +0200 Subject: cook: add C compiler, manage header dependencies --- test/.build | 2 -- test/hai.h | 3 +++ test/main.c | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 test/hai.h (limited to 'test') diff --git a/test/.build b/test/.build index 74fa78d..06f704a 100644 --- a/test/.build +++ b/test/.build @@ -1,4 +1,2 @@ -linker_sc = CWD / "linker.sc" - obj = cc("main.c", "test.S") aout = ld("a.out", obj) \ No newline at end of file diff --git a/test/hai.h b/test/hai.h new file mode 100644 index 0000000..12e75bc --- /dev/null +++ b/test/hai.h @@ -0,0 +1,3 @@ +int varchanged = 4; + +// header changed! \ No newline at end of file diff --git a/test/main.c b/test/main.c index 9298b76..fd0dc26 100644 --- a/test/main.c +++ b/test/main.c @@ -1,9 +1,10 @@ #include +#include "hai.h" + int test(); int main() { - printf("test returned: %d\n", test()); return 0; } \ No newline at end of file -- cgit v1.2.3