mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 03:51:18 +00:00
Add support from compiling c from c3c.
This commit is contained in:
4
resources/testproject/csource/test.c
Normal file
4
resources/testproject/csource/test.c
Normal file
@@ -0,0 +1,4 @@
|
||||
int test_doubler(int d)
|
||||
{
|
||||
return d * d;
|
||||
}
|
||||
@@ -1,11 +1,13 @@
|
||||
module hello_world;
|
||||
import bar;
|
||||
|
||||
extern fn void printf(char *hello);
|
||||
extern fn int test_doubler(int);
|
||||
extern fn void printf(char *, ...);
|
||||
|
||||
fn int main(int x)
|
||||
{
|
||||
printf("Hello World!\n");
|
||||
bar::test();
|
||||
printf("Hello double: %d\n", test_doubler(11));
|
||||
return 1;
|
||||
}
|
||||
@@ -8,3 +8,7 @@ warnings = ["no-unused"]
|
||||
sources = ["./**"]
|
||||
# libraries to use
|
||||
libs = []
|
||||
# c compiler
|
||||
cc = "cc"
|
||||
# c sources
|
||||
csources = ["./csource/**"]
|
||||
|
||||
Reference in New Issue
Block a user