diff --git a/TPs/TP02/c/.clang-format b/TPs/TP02/c/.clang-format new file mode 100644 index 0000000..3f48b3f --- /dev/null +++ b/TPs/TP02/c/.clang-format @@ -0,0 +1,10 @@ +BasedOnStyle: LLVM +IndentWidth: 4 +TabWidth: 4 +UseTab: Always +BreakBeforeBraces: Attach +ColumnLimit: 100 +PenaltyReturnTypeOnItsOwnLine: 1000000 +AlwaysBreakAfterDefinitionReturnType: None +AlwaysBreakAfterDefinitionReturnType: None +SeparateDefinitionBlocks: Always diff --git a/TPs/TP02/c/.gitignore b/TPs/TP02/c/.gitignore new file mode 100644 index 0000000..a5caf6d --- /dev/null +++ b/TPs/TP02/c/.gitignore @@ -0,0 +1 @@ +bin/*.out diff --git a/TPs/TP02/c/Makefile b/TPs/TP02/c/Makefile new file mode 100644 index 0000000..133dd38 --- /dev/null +++ b/TPs/TP02/c/Makefile @@ -0,0 +1,20 @@ +CC=gcc +CFLAGS=-Wall -Wextra -O2 +LDFLAGS=-lssl -lcrypto +ARCH=$(shell uname -m) + +ifeq ($(ARCH), arm64) + # Mac ARM installation + CFLAGS+= -I/opt/homebrew/opt/openssl@3.2/include + LDFLAGS+= -L/opt/homebrew/opt/openssl@3.2/lib +endif + +all: main + +main: main.c + $(info Detected $(ARCH) arquitecture.) + $(CC) $(CFLAGS) $(LDFLAGS) main.c -o bin/main.out + +clean: + rm -f main.out + diff --git a/TPs/TP02/c/main.c b/TPs/TP02/c/main.c new file mode 100644 index 0000000..b153104 --- /dev/null +++ b/TPs/TP02/c/main.c @@ -0,0 +1,7 @@ +#include + +int main(){ + + return 0; +} +