-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathMakefile
55 lines (46 loc) · 1.41 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
QMAKE = qmake
# Detect the operating system
ifeq ($(OS),Windows_NT)
OS := Win
MAKE_CMD := mingw32-make
else
UNAME := $(shell uname -s)
ifeq ($(UNAME),Linux)
OS := Linux
else ifeq ($(UNAME),Darwin)
OS := OSX
endif
MAKE_CMD := make
endif
CONFIG ?= release
all: debug
libXboxInternals: XboxInternals
$(QMAKE) XboxInternals/XboxInternals.pro -o XboxInternals/Makefile CONFIG+=$(CONFIG)
$(MAKE_CMD) -C XboxInternals
ifeq ($(OS),Win)
@if not exist XboxInternals-$(OS)\$(CONFIG) mkdir XboxInternals-$(OS)\$(CONFIG)
xcopy XboxInternals\$(CONFIG)\libXBoxInternals.* XboxInternals-$(OS)\$(CONFIG) /Y
else
mkdir -p XboxInternals-$(OS)/$(CONFIG)
cp XboxInternals/$(CONFIG)/libXBoxInternals.* XboxInternals-$(OS)/$(CONFIG)
endif
velocity_target: Velocity
$(QMAKE) Velocity/Velocity.pro -o Velocity/Makefile CONFIG+=$(CONFIG)
$(MAKE_CMD) -C Velocity
modules: libXboxInternals velocity_target
debug: CONFIG = debug
debug: modules
release: CONFIG = release
release: modules
clean:
$(MAKE_CMD) clean -C XboxInternals
$(MAKE_CMD) clean -C Velocity
ifeq ($(OS),Win)
@if exist XboxInternals\$(CONFIG)\libXBoxInternals.* del /Q XboxInternals\$(CONFIG)\libXBoxInternals.*
@if exist Velocity\Velocity del /Q Velocity\Velocity
@for /D %%d in (XboxInternals-*) do if exist "%%d" rmdir /S /Q "%%d"
else
rm -f XboxInternals/$(CONFIG)/libXBoxInternals.*
rm -f Velocity/Velocity
rm -rf XboxInternals-*
endif