hello world
This commit is contained in:
commit
bc84bde277
4 changed files with 34 additions and 0 deletions
1
.clang-format
Normal file
1
.clang-format
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
BasedOnStyle: WebKit
|
||||||
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
build
|
||||||
7
main.c
Normal file
7
main.c
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
printf("Hello World\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
25
makefile
Normal file
25
makefile
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
# Compiler
|
||||||
|
CC = clang
|
||||||
|
CFLAGS = -Wall -Wextra -g
|
||||||
|
TARGET = file_sorting
|
||||||
|
BUILD_DIR = build
|
||||||
|
|
||||||
|
SRCS = main.c
|
||||||
|
OBJS = $(SRCS:%.c=$(BUILD_DIR)/%.o)
|
||||||
|
|
||||||
|
$(BUILD_DIR)/$(TARGET): $(OBJS)
|
||||||
|
$(CC) $(CFLAGS) $(OBJS) -o $(BUILD_DIR)/$(TARGET)
|
||||||
|
|
||||||
|
$(BUILD_DIR)/%.o: %.c | $(BUILD_DIR)
|
||||||
|
$(CC) $(CFLAGS) -c $< -o $@
|
||||||
|
|
||||||
|
$(BUILD_DIR):
|
||||||
|
mkdir -p $(BUILD_DIR)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf build
|
||||||
|
|
||||||
|
run: $(BUILD_DIR)/$(TARGET)
|
||||||
|
$(BUILD_DIR)/$(TARGET)
|
||||||
|
|
||||||
|
.PHONY: clean run
|
||||||
Loading…
Add table
Add a link
Reference in a new issue