2021-11-10 20:01:00 +00:00
|
|
|
XBE_TITLE = nxdk_pgraph_tests
|
2021-11-10 03:07:05 +00:00
|
|
|
GEN_XISO = $(XBE_TITLE).iso
|
2022-01-11 03:12:28 +00:00
|
|
|
NXDK_DIR ?= $(CURDIR)/third_party/nxdk
|
2021-11-10 03:07:05 +00:00
|
|
|
NXDK_SDL = y
|
|
|
|
NXDK_CXX = y
|
|
|
|
|
2021-11-20 07:09:06 +00:00
|
|
|
RESOURCEDIR = $(CURDIR)/resources
|
2022-01-11 06:35:11 +00:00
|
|
|
SRCDIR = $(CURDIR)/src
|
|
|
|
THIRDPARTYDIR = $(CURDIR)/third_party
|
2021-11-20 07:09:06 +00:00
|
|
|
|
2021-11-10 14:41:15 +00:00
|
|
|
SRCS = \
|
2022-01-11 06:35:11 +00:00
|
|
|
$(SRCDIR)/debug_output.cpp \
|
|
|
|
$(SRCDIR)/main.cpp \
|
|
|
|
$(SRCDIR)/math3d.c \
|
|
|
|
$(SRCDIR)/pbkit_ext.cpp \
|
|
|
|
$(SRCDIR)/menu_item.cpp \
|
|
|
|
$(SRCDIR)/shaders/orthographic_vertex_shader.cpp \
|
|
|
|
$(SRCDIR)/shaders/perspective_vertex_shader.cpp \
|
|
|
|
$(SRCDIR)/shaders/precalculated_vertex_shader.cpp \
|
|
|
|
$(SRCDIR)/shaders/projection_vertex_shader.cpp \
|
|
|
|
$(SRCDIR)/shaders/shader_program.cpp \
|
|
|
|
$(SRCDIR)/test_driver.cpp \
|
|
|
|
$(SRCDIR)/test_host.cpp \
|
2022-01-24 17:31:27 +00:00
|
|
|
$(SRCDIR)/tests/attribute_carryover_tests.cpp \
|
2022-01-24 23:56:30 +00:00
|
|
|
$(SRCDIR)/tests/attribute_explicit_setter_tests.cpp \
|
2022-01-11 06:35:11 +00:00
|
|
|
$(SRCDIR)/tests/depth_format_tests.cpp \
|
2022-01-14 21:14:17 +00:00
|
|
|
$(SRCDIR)/tests/fog_tests.cpp \
|
2022-01-11 06:35:11 +00:00
|
|
|
$(SRCDIR)/tests/front_face_tests.cpp \
|
|
|
|
$(SRCDIR)/tests/image_blit_tests.cpp \
|
|
|
|
$(SRCDIR)/tests/lighting_normal_tests.cpp \
|
|
|
|
$(SRCDIR)/tests/material_alpha_tests.cpp \
|
2022-01-11 21:41:54 +00:00
|
|
|
$(SRCDIR)/tests/material_color_tests.cpp \
|
2022-01-11 19:20:59 +00:00
|
|
|
$(SRCDIR)/tests/material_color_source_tests.cpp \
|
2022-01-11 06:35:11 +00:00
|
|
|
$(SRCDIR)/tests/set_vertex_data_tests.cpp \
|
|
|
|
$(SRCDIR)/tests/test_suite.cpp \
|
2022-02-02 03:09:06 +00:00
|
|
|
$(SRCDIR)/tests/texture_border_tests.cpp \
|
2022-01-11 06:35:11 +00:00
|
|
|
$(SRCDIR)/tests/texture_format_tests.cpp \
|
2022-01-13 00:31:10 +00:00
|
|
|
$(SRCDIR)/tests/three_d_primitive_tests.cpp \
|
|
|
|
$(SRCDIR)/tests/two_d_line_tests.cpp \
|
2022-01-27 23:10:57 +00:00
|
|
|
$(SRCDIR)/tests/volume_texture_tests.cpp \
|
|
|
|
$(SRCDIR)/tests/w_param_tests.cpp \
|
2022-01-30 07:33:32 +00:00
|
|
|
$(SRCDIR)/tests/zero_stride_tests.cpp \
|
2022-01-11 06:35:11 +00:00
|
|
|
$(SRCDIR)/texture_format.cpp \
|
2022-01-27 23:10:57 +00:00
|
|
|
$(SRCDIR)/texture_stage.cpp \
|
2022-01-11 06:35:11 +00:00
|
|
|
$(SRCDIR)/vertex_buffer.cpp \
|
|
|
|
$(THIRDPARTYDIR)/swizzle.c \
|
|
|
|
$(THIRDPARTYDIR)/printf/printf.c
|
2021-11-10 14:41:15 +00:00
|
|
|
|
2021-11-11 01:29:17 +00:00
|
|
|
SHADER_OBJS = \
|
2022-01-24 17:31:27 +00:00
|
|
|
$(SRCDIR)/shaders/attribute_carryover_test.inl \
|
2022-01-26 16:48:55 +00:00
|
|
|
$(SRCDIR)/shaders/attribute_explicit_setter_tests.inl \
|
2022-01-17 06:33:30 +00:00
|
|
|
$(SRCDIR)/shaders/fog_infinite_fogc_test.inl \
|
2022-01-25 23:35:40 +00:00
|
|
|
$(SRCDIR)/shaders/fog_vec4_unset.inl \
|
|
|
|
$(SRCDIR)/shaders/fog_vec4_x.inl \
|
|
|
|
$(SRCDIR)/shaders/fog_vec4_y.inl \
|
|
|
|
$(SRCDIR)/shaders/fog_vec4_z.inl \
|
|
|
|
$(SRCDIR)/shaders/fog_vec4_w.inl \
|
|
|
|
$(SRCDIR)/shaders/fog_vec4_wx.inl \
|
|
|
|
$(SRCDIR)/shaders/fog_vec4_wy.inl \
|
|
|
|
$(SRCDIR)/shaders/fog_vec4_wzyx.inl \
|
|
|
|
$(SRCDIR)/shaders/fog_vec4_xyzw.inl \
|
2022-01-11 06:35:11 +00:00
|
|
|
$(SRCDIR)/shaders/precalculated_vertex_shader.inl \
|
|
|
|
$(SRCDIR)/shaders/projection_vertex_shader.inl \
|
2022-01-15 18:01:18 +00:00
|
|
|
$(SRCDIR)/shaders/projection_vertex_shader_no_lighting.inl \
|
2022-01-11 06:35:11 +00:00
|
|
|
$(SRCDIR)/shaders/textured_pixelshader.inl \
|
|
|
|
$(SRCDIR)/shaders/untextured_pixelshader.inl
|
2021-11-11 01:29:17 +00:00
|
|
|
|
|
|
|
DEBUG := y
|
2022-01-11 06:35:11 +00:00
|
|
|
CFLAGS += -I$(SRCDIR) -I$(THIRDPARTYDIR)
|
|
|
|
CXXFLAGS += -I$(SRCDIR) -I$(THIRDPARTYDIR)
|
2021-11-10 14:41:15 +00:00
|
|
|
|
2021-11-10 19:30:31 +00:00
|
|
|
DEVKIT ?= y
|
|
|
|
ifeq ($(DEVKIT),y)
|
|
|
|
CXXFLAGS += -DDEVKIT
|
|
|
|
endif
|
|
|
|
|
2021-11-20 07:09:06 +00:00
|
|
|
DISABLE_AUTORUN ?= n
|
|
|
|
ifeq ($(DISABLE_AUTORUN),y)
|
|
|
|
CXXFLAGS += -DDISABLE_AUTORUN
|
|
|
|
endif
|
|
|
|
|
|
|
|
CLEANRULES = clean-resources
|
2021-11-10 03:07:05 +00:00
|
|
|
include $(NXDK_DIR)/Makefile
|
2021-11-15 21:38:51 +00:00
|
|
|
|
2021-11-29 21:09:27 +00:00
|
|
|
PBKIT_DEBUG ?= n
|
|
|
|
ifeq ($(PBKIT_DEBUG),y)
|
|
|
|
NXDK_CFLAGS += -DDBG
|
|
|
|
endif
|
|
|
|
|
2021-11-15 21:38:51 +00:00
|
|
|
XBDM_GDB_BRIDGE := xbdm
|
|
|
|
REMOTE_PATH := e:\\pgraph
|
|
|
|
XBOX ?=
|
|
|
|
.phony: deploy
|
|
|
|
deploy: $(OUTPUT_DIR)/default.xbe
|
|
|
|
$(XBDM_GDB_BRIDGE) $(XBOX) -- mkdir $(REMOTE_PATH)
|
2021-11-20 07:09:06 +00:00
|
|
|
# TODO: Support moving the actual changed files.
|
|
|
|
# This hack will only work if the default.xbe changes when any resource changes.
|
|
|
|
$(XBDM_GDB_BRIDGE) $(XBOX) -- putfile $(OUTPUT_DIR)/ $(REMOTE_PATH) -f
|
2021-11-15 23:49:22 +00:00
|
|
|
|
|
|
|
.phony: execute
|
|
|
|
execute: deploy
|
|
|
|
$(XBDM_GDB_BRIDGE) $(XBOX) -s -- /run $(REMOTE_PATH)
|
|
|
|
|
2021-11-20 07:09:06 +00:00
|
|
|
.phony: debug_bridge_no_deploy
|
|
|
|
debug_bridge_no_deploy:
|
|
|
|
$(XBDM_GDB_BRIDGE) $(XBOX) -s -- gdb :1999 '&&' /launch $(REMOTE_PATH)
|
|
|
|
|
|
|
|
.phony: debug_bridge
|
|
|
|
debug_bridge: deploy debug_bridge_no_deploy
|
|
|
|
|
|
|
|
RESOURCES = \
|
|
|
|
$(patsubst $(RESOURCEDIR)/%,$(OUTPUT_DIR)/%,$(wildcard $(RESOURCEDIR)/image_blit/*))
|
|
|
|
|
|
|
|
TARGET += $(RESOURCES)
|
|
|
|
$(GEN_XISO): $(RESOURCES)
|
2021-11-15 23:49:22 +00:00
|
|
|
|
2021-11-20 07:09:06 +00:00
|
|
|
$(OUTPUT_DIR)/%: $(RESOURCEDIR)/%
|
|
|
|
$(VE)mkdir -p '$(dir $@)'
|
|
|
|
$(VE)cp -r '$<' '$@'
|
2021-11-15 23:49:22 +00:00
|
|
|
|
2021-11-20 07:09:06 +00:00
|
|
|
.PHONY: clean-resources
|
|
|
|
clean-resources:
|
|
|
|
$(VE)rm -rf $(OUTPUT_DIR)/resources
|