File tree Expand file tree Collapse file tree 4 files changed +32
-7
lines changed Expand file tree Collapse file tree 4 files changed +32
-7
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,20 @@ CFLAGS = -Wall -std=c99
3
3
SRC = main.c
4
4
OUT = game
5
5
6
- LIBS = -lraylib -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo
6
+ UNAME_S := $(shell uname -s)
7
+
8
+ ifeq ($(UNAME_S ) ,Linux)
9
+ LIBS = -lraylib -lGL -lm -lpthread -ldl -lrt -lX11
10
+ endif
11
+
12
+ ifeq ($(UNAME_S ) ,Darwin)
13
+ LIBS = -lraylib -framework OpenGL -framework Cocoa -framework IOKit -framework CoreVideo
14
+ endif
15
+
16
+ ifeq ($(OS ) ,Windows_NT)
17
+ LIBS = -lraylib -lopengl32 -lgdi32 -lwinmm
18
+ OUT := game.exe
19
+ endif
7
20
8
21
$(OUT ) : $(SRC )
9
22
$(CC ) $(CFLAGS ) $(SRC ) -o $(OUT ) $(LIBS )
Original file line number Diff line number Diff line change 1
- # Pong Game in C
1
+ # My Raylib Game
2
2
3
- A simple Pong game written in C using Raylib.
3
+ A simple game built using [ Raylib] ( https://www.raylib.com/ ) and C .
4
4
5
- ## How to Build
5
+ ## Build Instructions (macOS/Linux)
6
6
7
- Make sure you have [ raylib] ( https://www.raylib.com/ ) installed, then:
7
+ Make sure you have Raylib installed.
8
+
9
+ ### macOS
10
+ Install Raylib via Homebrew:
8
11
9
12
``` bash
10
- make
11
- ./game
13
+ brew install raylib
14
+
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+
You can’t perform that action at this time.
0 commit comments