-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (21 loc) · 872 Bytes
/
Makefile
File metadata and controls
27 lines (21 loc) · 872 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Simple Makefile — alternative to CMake
# Usage: make (needs raylib installed)
# make clean
CXX = g++
CXXFLAGS = -std=c++17 -O2 -Wall -Iinclude
SRCS = src/main.cpp src/ui.cpp src/screens.cpp src/logic.cpp
TARGET = library
# ── Platform detection ────────────────────────────────────────────────────────
UNAME := $(shell uname)
ifeq ($(UNAME), Darwin)
# macOS — installed via: brew install raylib
LDFLAGS = -lraylib -framework IOKit -framework Cocoa -framework OpenGL
else
# Linux — installed via: sudo apt install libraylib-dev
LDFLAGS = -lraylib -lGL -lm -lpthread -ldl -lrt -lX11
endif
all: $(TARGET)
$(TARGET): $(SRCS)
$(CXX) $(CXXFLAGS) $(SRCS) -o $(TARGET) $(LDFLAGS)
clean:
rm -f $(TARGET)