21 lines
372 B
Makefile
21 lines
372 B
Makefile
|
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
|
||
|
|