-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
41 lines (36 loc) · 815 Bytes
/
makefile
File metadata and controls
41 lines (36 loc) · 815 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
37
38
39
40
41
RAYLIB ?= ./vendor/raylib/src/
FILES = preztool.c
LIBRARIES = -lraylib
FLAGS = -Wall -Wextra -Wpedantic
ifeq ($(OS),Windows_NT)
LIBRARIES += -lgdi32 -lwinmm
FILES += preztool_win32.c
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
LIBRARIES += -lm -lX11
FILES += preztool_x11.c
endif
ifeq ($(UNAME_S),Darwin)
ERROR := $(error no support for darwin machines)
endif
endif
ifneq ($(STATIC_LINK_RAYLIB),)
LIBRARIES += -I $(RAYLIB) -L $(RAYLIB)
endif
ifneq ($(DEBUG),)
FLAGS += -march=native -Og -g
else
FLAGS += -march=native -O3
endif
all:
ifneq ($(PLATFORM),)
cd vendor/raylib/src && \
make PLATFORM=$(PLATFORM) RAYLIB_BUILD_MODE=$(BUILD_MODE)
endif
gcc $(FILES) \
$(LIBRARIES) \
$(FLAGS) \
-o preztool
static:
make PLATFORM=PLATFORM_DESKTOP STATIC_LINK_RAYLIB=t