diff options
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -0,0 +1,14 @@ +#include <stdio.h> +#include <fcntl.h> +#include <sys/stat.h> + +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; +} |