-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMakefile.nxdk
106 lines (96 loc) · 3.5 KB
/
Makefile.nxdk
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
XBE_TITLE = LithiumX
GEN_XISO = $(XBE_TITLE).iso
NXDK_SDL = y
NXDK_NET = y
GIT_COMMIT_HASH := "$(shell git describe --abbrev=7 --always)"
LVGL_DIR = src/libs/lvgl
LV_CONF_PATH = "lv_conf.h"
# Include my files
SRCS += \
$(CURDIR)/src/dash_database.c \
$(CURDIR)/src/dash_eeprom.c \
$(CURDIR)/src/dash_main.c \
$(CURDIR)/src/dash_mainmenu.c \
$(CURDIR)/src/dash_scroller.c \
$(CURDIR)/src/dash_settings.c \
$(CURDIR)/src/dash_styles.c \
$(CURDIR)/src/dash_synop.c \
$(CURDIR)/src/dash_browser.c \
$(CURDIR)/src/dash_launcher.c \
$(CURDIR)/src/dash_debug.c \
$(CURDIR)/src/main.c \
$(CURDIR)/src/lvgl_widgets/confirmbox.c \
$(CURDIR)/src/lvgl_widgets/generic_container.c \
$(CURDIR)/src/lvgl_widgets/menu.c \
$(CURDIR)/src/lvgl_widgets/helpers.c \
$(CURDIR)/src/platform/xbox/platform.c \
$(CURDIR)/src/platform/xbox/xbox_launch.c \
$(CURDIR)/src/lvgl_drivers/video/xgu/lv_xgu_disp.c \
$(CURDIR)/src/lvgl_drivers/video/xgu/lv_xgu_draw.c \
$(CURDIR)/src/lvgl_drivers/video/xgu/lv_xgu_rect.c \
$(CURDIR)/src/lvgl_drivers/video/xgu/lv_xgu_texture.c \
$(CURDIR)/src/lvgl_drivers/input/sdl/lv_sdl_indev.c \
$(CURDIR)/src/libs/jpg_decoder/jpg_decoder.c \
$(CURDIR)/src/libs/sxml/sxml.c \
$(CURDIR)/src/libs/toml/toml.c \
$(CURDIR)/src/libs/tlsf/tlsf.c \
$(CURDIR)/src/libs/ftpd/ftp_file.c src/libs/ftpd/ftp_server.c src/libs/ftpd/ftp.c \
$(NXDK_DIR)/lib/net/lwip/src/apps/sntp/sntp.c
CFLAGS += \
-I$(CURDIR)/src \
-I$(CURDIR)/src/libs \
-DLV_LVGL_H_INCLUDE_SIMPLE -DLV_CONF_PATH=$(LV_CONF_PATH) \
-DWIN32 \
-DBUILD_VERSION=\"$(GIT_COMMIT_HASH)\" \
-DSDL_DISABLE_JOYSTICK_INIT_DELAY \
-DLVGL_USE_CUSTOM_CONTROLLER_MAP \
-DLVGL_USE_CUSTOM_KEYBOARD_MAP \
-DFTP_CUSTOM_ROOT_PATH \
-DSNTP_SET_SYSTEM_TIME=xbox_sntp_set_time \
-DSNTP_SERVER_DNS=1 \
-Wno-implicit-function-declaration \
-DMEMP_NUM_NETBUF=6 -DMEMP_NUM_NETCONN=6 \
-DDEBUG_CONSOLE \
-DNDEBUG \
-O2
# Include SQLITE
SRCS += $(CURDIR)/src/libs/sqlite3/sqlite3.c $(CURDIR)/src/platform/win32/sqlite_win32.c
CFLAGS += \
-DSQLITE_WITHOUT_MSIZE=1 \
-DSQLITE_OS_OTHER=1 \
-DSQLITE_DEFAULT_MEMSTATUS=0 \
-DSQLITE_OMIT_DEPRECATED \
-DSQLITE_OMIT_PROGRESS_CALLBACK \
-DSQLITE_OMIT_SHARED_CACHE \
-DSQLITE_OMIT_AUTOINIT \
-DSQLITE_DISABLE_INTRINSIC \
-DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1
# Include XGU
XGU_DIR = $(CURDIR)/src/libs/xgu
XGU_LVGL_DRV_DIR = $(CURDIR)/src/lvgl_drivers/video/xgu
XGU_FLAGS = -I$(XGU_DIR)
XGU_DRV = \
$(XGU_LVGL_DRV_DIR)/lv_xgu_disp.c \
$(XGU_LVGL_DRV_DIR)/lv_xgu_draw.c \
$(XGU_LVGL_DRV_DIR)/lv_xgu_rect.c \
$(XGU_LVGL_DRV_DIR)/lv_xgu_texture.c
CFLAGS += $(XGU_FLAGS)
SRCS += $(XGU_DRV)
SHADER_OBJS = $(XGU_LVGL_DRV_DIR)/texture.inl $(XGU_LVGL_DRV_DIR)/notexture.inl
# Include shaders
%.inl: %.ps | fp20compiler
@echo "[ FP20 ] $@"
$(FP20COMPILER) $< > $@
# Include lvgl library
CFLAGS += -I$(LVGL_DIR)/
SRCS += $(shell find -L $(LVGL_DIR)/src/core -name \*.c)
SRCS += $(shell find -L $(LVGL_DIR)/src/draw -name \*.c)
SRCS += $(shell find -L $(LVGL_DIR)/src/extra -name \*.c)
SRCS += $(shell find -L $(LVGL_DIR)/src/font -name \*.c)
SRCS += $(shell find -L $(LVGL_DIR)/src/hal -name \*.c)
SRCS += $(shell find -L $(LVGL_DIR)/src/misc -name \*.c)
SRCS += $(shell find -L $(LVGL_DIR)/src/widgets -name \*.c)
include $(NXDK_DIR)/Makefile
clean_local:
find . -name '*.obj' ! -path './libs/nxdk/*' -type f -delete
find . -name '*.d' ! -path './libs/nxdk/*' -type f -delete