Cleaned up some stuff before beginning
This commit is contained in:
parent
578edffc73
commit
2495981b72
5 changed files with 13 additions and 15 deletions
3
TPs/TP02/.gitignore
vendored
3
TPs/TP02/.gitignore
vendored
|
@ -1,3 +1,6 @@
|
|||
#c
|
||||
c/bin/*
|
||||
|
||||
# Byte-compiled / optimized / DLL files
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
|
|
|
@ -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
|
||||
|
|
1
TPs/TP02/c/.gitignore
vendored
1
TPs/TP02/c/.gitignore
vendored
|
@ -1 +0,0 @@
|
|||
bin/*.out
|
|
@ -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)/*
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
#include <openssl/ssl.h>
|
||||
|
||||
int main(){
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Add table
Reference in a new issue