Cleaned up some stuff before beginning

This commit is contained in:
Afonso Franco 2024-02-22 01:01:22 +00:00
parent 578edffc73
commit 2495981b72
Signed by: afonso
SSH key fingerprint: SHA256:JiuxZNdA5bRWXPMUJChI0AQ75yC+cXY4xM0IaVwEVys
5 changed files with 13 additions and 15 deletions

3
TPs/TP02/.gitignore vendored
View file

@ -1,3 +1,6 @@
#c
c/bin/*
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

View file

@ -1,10 +1,9 @@
BasedOnStyle: LLVM
UseTab: Always
IndentWidth: 4
TabWidth: 4
UseTab: Always
BreakBeforeBraces: Attach
ColumnLimit: 100
PenaltyReturnTypeOnItsOwnLine: 1000000
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterDefinitionReturnType: None
SeparateDefinitionBlocks: Always

View file

@ -1 +0,0 @@
bin/*.out

View file

@ -2,6 +2,8 @@ CC=gcc
CFLAGS=-Wall -Wextra -O2
LDFLAGS=-lssl -lcrypto
ARCH=$(shell uname -m)
BIN=bin
SRC=src
ifeq ($(ARCH), arm64)
# Mac ARM installation
@ -9,12 +11,14 @@ ifeq ($(ARCH), arm64)
LDFLAGS+= -L/opt/homebrew/opt/openssl@3.2/lib
endif
all: main
SRCS=$(wildcard $(SRC)/*.c)
BINS=$(SRCS:$(SRC)/%.c=%)
main: main.c
all: $(BINS)
%: $(SRC)/%.c
$(info Detected $(ARCH) arquitecture.)
$(CC) $(CFLAGS) $(LDFLAGS) main.c -o bin/main.out
$(CC) $(CFLAGS) $(LDFLAGS) -o $(BIN)/$@ $<
clean:
rm -f main.out
rm $(BIN)/*

View file

@ -1,7 +0,0 @@
#include <openssl/ssl.h>
int main(){
return 0;
}