diff --git a/Makefile b/Makefile index 01200a6..d32d5e0 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ # By: maldavid +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2022/10/04 16:43:41 by maldavid #+# #+# # -# Updated: 2023/12/12 13:00:48 by kbz_8 ### ########.fr # +# Updated: 2023/12/12 13:19:33 by kbz_8 ### ########.fr # # # # **************************************************************************** # @@ -46,6 +46,7 @@ endif ifeq ($(OS), Darwin) LDLIBS += -L /opt/homebrew/lib -lSDL2 CXXFLAGS += -I /opt/homebrew/include + NAME = libmlx.dylib endif ifeq ($(DEBUG), true) diff --git a/test/run.sh b/test/run.sh index f3c908d..3b240b9 100755 --- a/test/run.sh +++ b/test/run.sh @@ -1 +1,7 @@ -clang main.c ../libmlx.so -lSDL2 -g && ./a.out +#!/bin/bash + +if [ $(uname -s) = 'Darwin' ]; then + clang main.c ../libmlx.dylib -L /opt/homebrew/lib -lSDL2 -g && ./a.out; +else + clang main.c ../libmlx.so -lSDL2 -g && ./a.out; +fi