foxygit / fake-08-xbox360 Log in
main xbox360 commits tags

/platform/xex/Makefile · 1.76 KB

raw
#---------------------------------------------------------------------------------
# FAKE-08 for Xbox 360 as a native XEX (runs under the dashboard, started
# from Aurora/FSD), built WITHOUT the Microsoft XDK, with xexkit
# (platform/xex/xexkit, a git submodule: GCC + newlib + libstdc++ from the
# free60/libxenon image, xex-link from xenon-forge).
#
# From the repository root, inside the free60/libxenon docker image:
#   make xex                    -> platform/xex/build/fake08/default.xex
# xex-link must be built once with xexkit/tools/build-xex-link.sh (README.md).
#---------------------------------------------------------------------------------
XEXKIT      := $(CURDIR)/xexkit
APP_VERSION ?= dev
BUILD_ID    := $(shell git -C $(CURDIR) rev-parse --short HEAD 2>/dev/null || echo unknown)$(shell git -C $(CURDIR) diff --quiet 2>/dev/null || echo -modified)

# the emulator core and this platform's host
CORE_DIRS   := ../../source ../../libs/z8lua ../../libs/utf8-util ../../libs/lodepng \
               ../../libs/simpleini ../../libs/miniz

TITLE       := fake08
TITLE_SRC   := $(foreach d,$(CORE_DIRS),$(wildcard $(d)/*.c) $(wildcard $(d)/*.cpp)) source/XexHost.cpp
TITLE_TOML  := fake08.toml
# z8lua's .c files are C++ (fix32 math, throw/catch for Lua errors).
TITLE_C_AS_CXX := 1
# libxenon's headers come last, for the console font only.
TITLE_FLAGS := -Wno-sign-compare $(foreach d,$(CORE_DIRS),-I$(d)) -idirafter $(DEVKITXENON)/usr/include \
               -D__XEX__ -DMINIZ_NO_TIME -DVER_STR=\"$(APP_VERSION)\" -DBUILD_ID=\"$(BUILD_ID)\"

.PHONY: all fake08 clean
all: fake08
fake08: title

# rebuilt every time, for the build id and time in the log
build/fake08/obj/source/XexHost.cpp.o: FORCE
.PHONY: FORCE
FORCE:

clean:
	rm -r -f $(CURDIR)/build

include $(XEXKIT)/mk/xexkit.mk