diff --git a/Makefile b/Makefile index abeee07..9338be8 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,18 @@ SRC = hellpaper.c TARGET = hellpaper CFLAGS = -Wall -O2 -LIBS = -lraylib -lm #-lGL -lpthread -ldl -lrt + +#- mac os need some different flags for raylib +#- see https://github.com/raysan5/raylib/wiki/Working-on-macOS#:~:text=If-,the,-build%20fails%2C%20you +UNAME_S := $(shell uname -s) + +ifeq ($(UNAME_S), Darwin) + CFLAGS += -I$(shell brew --prefix raylib)/include + LIBS = -lraylib -lm -L$(shell brew --prefix raylib)/lib -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo +else + LIBS = -lraylib -lm #-lGL -lpthread -ldl -lrt +endif + PREFIX ?= /usr/local BINDIR = $(PREFIX)/bin diff --git a/README.md b/README.md index db35904..946027d 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@
-
A wallpaper picker for Linux, built with Raylib.
+A wallpaper picker, built with Raylib.
## "Features" diff --git a/hellpaper.c b/hellpaper.c index 1043336..43885d9 100644 --- a/hellpaper.c +++ b/hellpaper.c @@ -19,7 +19,14 @@ #include