forked from shiryel/rayex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (29 loc) · 828 Bytes
/
Makefile
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
RAYLIB_SRC = ./src/raylib/src
C_SRC = ./c_src/rayex
.PHONY: all
all: ensure_raylib ensure_lib ensure_include raylib_make raylib_move
.PHONY: ensure_raylib
.SILENT: ensure_raylib
ensure_raylib:
if [ ! -d $(RAYLIB_SRC) ]; then\
echo "Git submodule Raylib has not been pulled. Raylib is expected to exist under: (ProjectRoot)/src/raylib" ;\
fi
.PHONY: ensure_lib
.SILENT: ensure_lib
ensure_lib:
if [ ! -d $(C_SRC)/lib ]; then\
mkdir $(C_SRC)/lib ;\
fi
.PHONY: ensure_include
.SILENT: ensure_include
ensure_include:
if [ ! -d $(C_SRC)/include ]; then\
mkdir $(C_SRC)/include ;\
fi
.PHONEY: raylib_make
raylib_make:
make PLATFORM=PLATFORM_DESKTOP --directory $(RAYLIB_SRC)
.PHONEY: raylib_move
raylib_move:
cp $(RAYLIB_SRC)/libraylib.a $(C_SRC)/lib/libraylib.a
cp $(RAYLIB_SRC)/raylib.h $(C_SRC)/include/raylib.h