C言語の最低限の処理
This commit is contained in:
parent
906cc65b3d
commit
2e84f898eb
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
dist/
|
||||
# ---> C++
|
||||
# Prerequisites
|
||||
*.d
|
||||
|
||||
11
Makefile
Normal file
11
Makefile
Normal file
@ -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)
|
||||
1
readme/c.md
Normal file
1
readme/c.md
Normal file
@ -0,0 +1 @@
|
||||
# C言語について
|
||||
10
src/hello.c
Normal file
10
src/hello.c
Normal file
@ -0,0 +1,10 @@
|
||||
/** Hello world program in C
|
||||
* command: gcc src/hello.c -o dist/hello
|
||||
* run: ./dist/hello
|
||||
*/
|
||||
#include <stdio.h>
|
||||
|
||||
int main(void) {
|
||||
printf("Hello, world!\n");
|
||||
return 0;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user