-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
131 lines (103 loc) · 3.22 KB
/
Makefile
File metadata and controls
131 lines (103 loc) · 3.22 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# Alternative GNU Make workspace makefile autogenerated by Premake
ifndef config
config=debug_x64
endif
ifndef verbose
SILENT = @
endif
ifeq ($(config),debug_x64)
chinese_chess_config = debug_x64
raylib_config = debug_x64
else ifeq ($(config),debug_x86)
chinese_chess_config = debug_x86
raylib_config = debug_x86
else ifeq ($(config),debug_arm64)
chinese_chess_config = debug_arm64
raylib_config = debug_arm64
else ifeq ($(config),release_x64)
chinese_chess_config = release_x64
raylib_config = release_x64
else ifeq ($(config),release_x86)
chinese_chess_config = release_x86
raylib_config = release_x86
else ifeq ($(config),release_arm64)
chinese_chess_config = release_arm64
raylib_config = release_arm64
else ifeq ($(config),debug_rgfw_x64)
chinese_chess_config = debug_rgfw_x64
raylib_config = debug_rgfw_x64
else ifeq ($(config),debug_rgfw_x86)
chinese_chess_config = debug_rgfw_x86
raylib_config = debug_rgfw_x86
else ifeq ($(config),debug_rgfw_arm64)
chinese_chess_config = debug_rgfw_arm64
raylib_config = debug_rgfw_arm64
else ifeq ($(config),release_rgfw_x64)
chinese_chess_config = release_rgfw_x64
raylib_config = release_rgfw_x64
else ifeq ($(config),release_rgfw_x86)
chinese_chess_config = release_rgfw_x86
raylib_config = release_rgfw_x86
else ifeq ($(config),release_rgfw_arm64)
chinese_chess_config = release_rgfw_arm64
raylib_config = release_rgfw_arm64
else
$(error "invalid configuration $(config)")
endif
PROJECTS := chinese-chess raylib
CPPFLAGS := -Wall -Wextra -Wno-unused-variable
ifdef MYDEBUG
CPPFLAGS += -DMYDEBUG
endif
ifdef SUPERCAP
CPPFLAGS += -DSUPERCAP
endif
ifdef SHOW_EVAL
CPPFLAGS += -DSHOW_EVAL
endif
.PHONY: all clean help $(PROJECTS) run img_index
all: $(PROJECTS)
chinese-chess: raylib
ifneq (,$(chinese_chess_config))
@echo "==== Building chinese-chess ($(chinese_chess_config)) ===="
@${MAKE} --no-print-directory -C build/build_files -f chinese-chess.make config=$(chinese_chess_config) CPPFLAGS="$(CPPFLAGS)"
endif
raylib:
ifneq (,$(raylib_config))
@echo "==== Building raylib ($(raylib_config)) ===="
@${MAKE} --no-print-directory -C build/build_files -f raylib.make config=$(raylib_config)
endif
clean:
@${MAKE} --no-print-directory -C build/build_files -f chinese-chess.make clean
@${MAKE} --no-print-directory -C build/build_files -f raylib.make clean
img_index: ./src/resource_index.cpp
g++ ./src/resource_index.cpp -o ./bin/Debug/resource_index.exe && ./bin/Debug/resource_index.exe
run_debug:
./bin/Debug/chinese-chess.exe
test:
g++ ./src/test.cpp -o ./bin/Debug/test.exe -I./build/external/raylib-master/src \
./bin/Debug/raylib.lib -lwinmm -lgdi32 -lopengl32
help:
@echo "Usage: make [config=name] [target]"
@echo ""
@echo "CONFIGURATIONS:"
@echo " debug_x64"
@echo " debug_x86"
@echo " debug_arm64"
@echo " release_x64"
@echo " release_x86"
@echo " release_arm64"
@echo " debug_rgfw_x64"
@echo " debug_rgfw_x86"
@echo " debug_rgfw_arm64"
@echo " release_rgfw_x64"
@echo " release_rgfw_x86"
@echo " release_rgfw_arm64"
@echo ""
@echo "TARGETS:"
@echo " all (default)"
@echo " clean"
@echo " chinese-chess"
@echo " raylib"
@echo ""
@echo "For more information, see https://github.com/premake/premake-core/wiki"