mirror of
https://github.com/Mercantec-GHC/h5-projekt-mst.git
synced 2026-08-26 21:27:38 +02:00
add backend
This commit is contained in:
parent
08d89e0103
commit
c1f4f75fec
15
backend/.clang-format
Normal file
15
backend/.clang-format
Normal file
@ -0,0 +1,15 @@
|
||||
BasedOnStyle: WebKit
|
||||
IndentWidth: 4
|
||||
ColumnLimit: 80
|
||||
|
||||
IndentCaseLabels: true
|
||||
InsertNewlineAtEOF: true
|
||||
AllowShortFunctionsOnASingleLine: None
|
||||
|
||||
BinPackArguments: false
|
||||
BinPackLongBracedList: false
|
||||
BinPackParameters: OnePerLine
|
||||
|
||||
AllowAllArgumentsOnNextLine: true
|
||||
AllowAllParametersOfDeclarationOnNextLine: true
|
||||
|
||||
1
backend/.gitignore
vendored
Normal file
1
backend/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
build/
|
||||
36
backend/Makefile
Normal file
36
backend/Makefile
Normal file
@ -0,0 +1,36 @@
|
||||
|
||||
MAKEFLAGS += -j16
|
||||
|
||||
CC=gcc
|
||||
LD=gcc
|
||||
|
||||
CFLAGS=-std=c23 -pedantic-errors -Wall -Wextra -Wconversion
|
||||
LDFLAGS=
|
||||
|
||||
CFLAGS+=-g
|
||||
|
||||
# CFLAGS+=-ggdb
|
||||
CFLAGS+=-fsanitize=address
|
||||
|
||||
build_dir = build
|
||||
obj_dir = $(build_dir)/obj
|
||||
|
||||
sources = \
|
||||
src/main.c
|
||||
|
||||
target=$(build_dir)/backend
|
||||
|
||||
all: $(target)
|
||||
|
||||
$(target): $(sources:%.c=$(obj_dir)/%.o)
|
||||
$(LD) -o $@ $(CFLAGS) $(LDFLAGS) $^
|
||||
|
||||
$(obj_dir)/%.o: %.c
|
||||
@mkdir -p $(dir $@)
|
||||
$(CC) $< -c -o $@ -MMD -MP $(CFLAGS)
|
||||
|
||||
clean:
|
||||
rm -rf $(build_dir)
|
||||
|
||||
-include $(sources:%.c=$(obj_dir)/%.d)
|
||||
|
||||
7
backend/compile_flags.txt
Normal file
7
backend/compile_flags.txt
Normal file
@ -0,0 +1,7 @@
|
||||
-xc
|
||||
-std=c23
|
||||
-pedantic-errors
|
||||
-Wall
|
||||
-Wextra
|
||||
-Wconversion
|
||||
|
||||
7
backend/src/main.c
Normal file
7
backend/src/main.c
Normal file
@ -0,0 +1,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
printf("hello\n");
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user