forked from SDL-mirror/SDL
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile.xbox
60 lines (50 loc) · 2 KB
/
Makefile.xbox
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
SDL2_DIR = $(NXDK_DIR)/lib/sdl/SDL2
# Based on Makefile.minimal (some backends adapted for Xbox)
SDL2_SRCS := \
$(wildcard $(SDL2_DIR)/src/*.c) \
$(wildcard $(SDL2_DIR)/src/audio/*.c) \
$(wildcard $(SDL2_DIR)/src/audio/xbox/*.c) \
$(wildcard $(SDL2_DIR)/src/cpuinfo/*.c) \
$(wildcard $(SDL2_DIR)/src/events/*.c) \
$(wildcard $(SDL2_DIR)/src/file/*.c) \
$(wildcard $(SDL2_DIR)/src/haptic/*.c) \
$(wildcard $(SDL2_DIR)/src/haptic/dummy/*.c) \
$(wildcard $(SDL2_DIR)/src/joystick/*.c) \
$(wildcard $(SDL2_DIR)/src/joystick/xbox/*.c) \
$(wildcard $(SDL2_DIR)/src/loadso/dummy/*.c) \
$(wildcard $(SDL2_DIR)/src/power/*.c) \
$(wildcard $(SDL2_DIR)/src/filesystem/dummy/*.c) \
$(wildcard $(SDL2_DIR)/src/render/*.c) \
$(wildcard $(SDL2_DIR)/src/render/software/*.c) \
$(wildcard $(SDL2_DIR)/src/sensor/*.c) \
$(wildcard $(SDL2_DIR)/src/sensor/dummy/*.c) \
$(wildcard $(SDL2_DIR)/src/stdlib/*.c) \
$(wildcard $(SDL2_DIR)/src/thread/*.c) \
$(wildcard $(SDL2_DIR)/src/thread/generic/SDL_syscond.c) \
$(wildcard $(SDL2_DIR)/src/thread/windows/*.c) \
$(wildcard $(SDL2_DIR)/src/timer/*.c) \
$(wildcard $(SDL2_DIR)/src/timer/windows/*.c) \
$(wildcard $(SDL2_DIR)/src/video/*.c) \
$(wildcard $(SDL2_DIR)/src/video/xbox/*.c) \
$(wildcard $(SDL2_DIR)/src/video/yuv2rgb/*.c)
# Additions for Xbox
SDL2_SRCS += \
$(wildcard $(SDL2_DIR)/src/libm/*.c) \
$(wildcard $(SDL2_DIR)/src/atomic/*.c)
SDL2TEST_SRCS := \
$(wildcard $(SDL2_DIR)/src/test/*.c)
NXDK_CFLAGS += -I$(SDL2_DIR)/include \
-DXBOX
NXDK_CXXFLAGS += -I$(SDL2_DIR)/include \
-DXBOX
SDL2_OBJS = $(addsuffix .obj, $(basename $(SDL2_SRCS)))
SDL2TEST_OBJS = $(addsuffix .obj, $(basename $(SDL2TEST_SRCS)))
$(NXDK_DIR)/lib/libSDL2.lib: $(SDL2_OBJS)
$(NXDK_DIR)/lib/SDL2_test.lib: $(SDL2TEST_OBJS)
main.exe: $(NXDK_DIR)/lib/libSDL2.lib
main.exe: $(NXDK_DIR)/lib/SDL2_test.lib
CLEANRULES += clean-sdl2
.PHONY: clean-sdl2
clean-sdl2:
$(VE)rm -f $(SDL2_OBJS) $(NXDK_DIR)/lib/libSDL2.lib
$(VE)rm -f $(SDL2TEST_OBJS) $(NXDK_DIR)/lib/SDL2_test.lib