From 8214495cea78abcaa35fac48f5a157baf359b97e Mon Sep 17 00:00:00 2001 From: Mosder Date: Mon, 14 Sep 2026 15:57:42 +0200 Subject: feat: added MacOS conditional, so I don't have to change Makefile everytime I'm on fucking piece of shit MacOS --- Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 7ca5cd9..9474fc8 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,14 @@ CC=gcc -CFLAGS=-std=c99 -Wall -Wextra -Wpedantic -fPIC -I./include -O2 -s +CFLAGS=-std=c99 -Wall -Wextra -Wpedantic -fPIC -I./include -O2 CFLAGS_TEST=-std=c99 -Wall -Wextra -Wpedantic -Og -ggdb AR=ar rcs +RUN_TESTS=./run_tests + +ifneq ($(shell uname -s),Darwin) + CFLAGS+= -s +else + RUN_TESTS=DYLD_FALLBACK_LIBRARY_PATH="/usr/local/lib:$DYLD_FALLBACK_LIBRARY_PATH" ./run_tests; rm -rf run_tests.dSYM/ +endif both: shared static clean @@ -31,7 +38,7 @@ test: $(CC) $(CFLAGS_TEST) -c tests/string_tests.c $(CC) $(CFLAGS_TEST) -c tests/ds/hashmap_tests.c $(CC) $(CFLAGS_TEST) -lmoslib *.o tests/tests.c -o run_tests - ./run_tests + $(RUN_TESTS) rm run_tests *.o .PHONY: clean -- cgit v1.2.3