From f8d5540ec8fd78d8aaf09550977ac04ee5a421ed Mon Sep 17 00:00:00 2001 From: Jay Vaughan Date: Sun, 5 May 2024 13:16:29 +0200 Subject: [PATCH] Makefile: check OS type, special case for MacOS (Darwin) to use -latomic_ops instead of just -latomic --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index 4c61c66..ba448d5 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,14 @@ CC = cc CFLAGS = -std=c11 -Wall -Wextra -O3 -mcx16 -pthread LDFLAGS = -pthread + +PLATFORM := $(shell uname) + +ifeq ($(PLATFORM),Darwin) +LDLIBS = -latomic_ops +else LDLIBS = -latomic +endif objects = main.o lstack.o sha1.o