diff --git a/.github/workflows/c.yml b/.github/workflows/c.yml index 48572c4..ee6c628 100644 --- a/.github/workflows/c.yml +++ b/.github/workflows/c.yml @@ -19,11 +19,8 @@ jobs: sudo apt -y install build-essential git libasound2-dev libx11-dev libxrandr-dev libxi-dev libgl1-mesa-dev libglu1-mesa-dev libxcursor-dev libxinerama-dev git clone https://github.com/raysan5/raylib.git raylib cd raylib/src/ - make PLATFORM=PLATFORM_DESKTOP RAYLIB_LIBTYPE=SHARED - sudo make install RAYLIB_LIBTYPE=SHARED + make PLATFORM=PLATFORM_DESKTOP + sudo make install - name: make build run: make build - - #- name: make test - # run: make test diff --git a/Makefile b/Makefile index 2db5a88..c0a7662 100644 --- a/Makefile +++ b/Makefile @@ -7,8 +7,16 @@ CFLAGS += -pedantic CFLAGS += -Werror CFLAGS += -Wextra CFLAGS += -Wmissing-declarations + +ifeq ($(shell uname -s),Darwin) CFLAGS += $(shell pkg-config --cflags raylib) LDFLAGS = $(shell pkg-config --libs raylib) + +else +CFLAGS += -L/usr/local/lib +LDFLAGS = -I/usr/local/include -lraylib -lGL -lm -pthread -ldl +endif + SRC_FILES = ./src/*.c BIN_DIR = ./bin BIN = $(BIN_DIR)/life