From e03a3015c611ca9c2847c5ca15c49d644b3ef1a8 Mon Sep 17 00:00:00 2001 From: aspiring_aurelian Date: Thu, 7 Dec 2023 20:31:56 -0600 Subject: Initial commit --- .gitignore | 1 + main.c | 14 ++++++++++++++ makefile | 2 ++ 3 files changed, 17 insertions(+) create mode 100644 .gitignore create mode 100644 main.c create mode 100644 makefile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ba077a4 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +bin diff --git a/main.c b/main.c new file mode 100644 index 0000000..7380acf --- /dev/null +++ b/main.c @@ -0,0 +1,14 @@ +#include +#include +#include + +int main() { + int fd = creat("makefile", S_IRWXU | S_IXGRP | S_IXOTH); + FILE *file = fdopen(fd, "w"); + fprintf(file, "debug: main.c\n\tgcc -Wall main.c -o ./bin/debug"); + fclose(file); + + mkdir("./bin", 0777); + + return 0; +} diff --git a/makefile b/makefile new file mode 100644 index 0000000..9e8eafd --- /dev/null +++ b/makefile @@ -0,0 +1,2 @@ +debug: main.c + gcc -Wall main.c -o ./bin/debug \ No newline at end of file -- cgit v1.2.3