From 2e84f898eb3fcac29bc4d69507571f086819d1f8 Mon Sep 17 00:00:00 2001 From: "ry.yamafuji" Date: Sun, 7 Dec 2025 19:05:38 +0900 Subject: [PATCH] =?UTF-8?q?C=E8=A8=80=E8=AA=9E=E3=81=AE=E6=9C=80=E4=BD=8E?= =?UTF-8?q?=E9=99=90=E3=81=AE=E5=87=A6=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + Makefile | 11 +++++++++++ readme/c.md | 1 + src/hello.c | 10 ++++++++++ 4 files changed, 23 insertions(+) create mode 100644 Makefile create mode 100644 readme/c.md create mode 100644 src/hello.c diff --git a/.gitignore b/.gitignore index e257658..a5b2030 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +dist/ # ---> C++ # Prerequisites *.d diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d148c63 --- /dev/null +++ b/Makefile @@ -0,0 +1,11 @@ +CC = gcc +CFLAGS = -Wall -Wextra -O2 + +TARGET = dist/hello +SRC = src/hello.c + +$(TARGET): $(SRC) + $(CC) $(CFLAGS) $(SRC) -o $(TARGET) + +clean: + rm -f $(TARGET) \ No newline at end of file diff --git a/readme/c.md b/readme/c.md new file mode 100644 index 0000000..e560080 --- /dev/null +++ b/readme/c.md @@ -0,0 +1 @@ +# C言語について \ No newline at end of file diff --git a/src/hello.c b/src/hello.c new file mode 100644 index 0000000..52fe27f --- /dev/null +++ b/src/hello.c @@ -0,0 +1,10 @@ +/** Hello world program in C +* command: gcc src/hello.c -o dist/hello +* run: ./dist/hello +*/ +#include + +int main(void) { + printf("Hello, world!\n"); + return 0; +} \ No newline at end of file