From 3e078042a42fed15b4de1b8ff31834f952ef5d81 Mon Sep 17 00:00:00 2001 From: Kris Lamoureux Date: Wed, 3 Nov 2021 00:02:07 -0400 Subject: [PATCH] Compile simple stdout message I set a return type on the main function to clear a GCC warning in a slight deviation from the book. --- 01-hello-world.c | 6 ++++++ Makefile | 4 ++++ bin/.gitignore | 2 ++ 3 files changed, 12 insertions(+) create mode 100644 01-hello-world.c create mode 100644 Makefile create mode 100644 bin/.gitignore diff --git a/01-hello-world.c b/01-hello-world.c new file mode 100644 index 0000000..53f4080 --- /dev/null +++ b/01-hello-world.c @@ -0,0 +1,6 @@ +#include + +int main() +{ + printf("hello, world\n"); +} diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..268703a --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +all: hello + +hello: 01-hello-world.c + gcc -o ./bin/01-helloworld 01-hello-world.c diff --git a/bin/.gitignore b/bin/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/bin/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore