-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
57 lines (45 loc) · 1.02 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
BUILD_SCRIPTS_ROOT = build_scripts
WIN_BUILD_SCRIPTS_LOC = $(BUILD_SCRIPTS_ROOT)\\build_scripts_windows\\
LINUX_BUILD_SCRIPTS_LOC = $(BUILD_SCRIPTS_ROOT)/build_scripts_linux/
BUILD_LOC = $(WIN_BUILD_SCRIPTS_LOC) #defaults to windows
EXTENSION = .bat
PRE_BUILD =
POST_BUILD =
ifeq ($(OS),Windows_NT)
BUILD_LOC = $(WIN_BUILD_SCRIPTS_LOC)
EXTENSION = .bat
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
BUILD_LOC = $(LINUX_BUILD_SCRIPTS_LOC)
EXTENSION = .sh
PRE_BUILD = chmod -R 777 build_scripts/* ;
POST_BUILD = chmod -R 777 build ;
endif
endif
all: main
main:
$(PRE_BUILD)
$(BUILD_LOC)build$(EXTENSION)
$(POST_BUILD)
run:
$(PRE_BUILD)
$(POST_BUILD)
$(BUILD_LOC)run$(EXTENSION)
run_vulkan:
$(PRE_BUILD)
$(POST_BUILD)
$(BUILD_LOC)run_vulkan$(EXTENSION)
run_opengl:
$(PRE_BUILD)
$(POST_BUILD)
$(BUILD_LOC)run_opengl$(EXTENSION)
clean:
$(PRE_BUILD)
$(POST_BUILD)
$(BUILD_LOC)clean$(EXTENSION)
launch:
$(PRE_BUILD)
$(BUILD_LOC)build$(EXTENSION)
$(POST_BUILD)
$(BUILD_LOC)run$(EXTENSION)