-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (28 loc) · 801 Bytes
/
Makefile
File metadata and controls
36 lines (28 loc) · 801 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
28
29
30
31
32
33
34
35
36
# Makefile for compiling main.cpp
# Compiler
CC = g++
# Compiler flags
CFLAGS = -O1 -Wall -std=c++11 -Wno-missing-braces
# Include directories
INCLUDES = -I include/
# Library directories
LIBDIRS = -L lib/
# Libraries to link against
# Use different libraries based on the operating system
ifeq ($(OS),Windows_NT)
LIBS = -lraylib -lopengl32 -lgdi32 -lwinmm
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
LIBS = -lraylib -lGL -lm -lpthread -ldl -lrt
endif
ifeq ($(UNAME_S),Darwin)
LIBS = -lraylib -framework IOKit -framework Cocoa -framework OpenGL
endif
endif
# Source files
SRC = src/main.cpp
# Output executable
OUTPUT = game
all: $(SRC)
$(CC) $(CFLAGS) $(INCLUDES) -o $(OUTPUT) $(SRC) $(LIBDIRS) $(LIBS)