CSI-ES-2324/TPs/TP02/c/Makefile

21 lines
372 B
Makefile
Raw Normal View History

2024-02-20 11:48:56 +00:00
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