diff options
| author | Mosder <git@mosder.eu> | 2026-09-14 15:57:42 +0200 |
|---|---|---|
| committer | Mosder <git@mosder.eu> | 2026-09-14 15:57:42 +0200 |
| commit | 8214495cea78abcaa35fac48f5a157baf359b97e (patch) | |
| tree | 23ac2216b497d59d766a5a1b0c3a971f5b5831c4 | |
| parent | 89d46669b4dd19fa7bb772dc05d457702959e043 (diff) | |
feat: added MacOS conditional, so I don't have to change Makefile everytime I'm on fucking piece of shit MacOS
| -rw-r--r-- | Makefile | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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 |
