Skip to content

Commit

Permalink
[iQue] setup CI & use ique_v1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
piecelinux committed Feb 26, 2024
1 parent 8181279 commit 971e4a7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# CI file for EGCS builds
# TODO: rename to `ci_egcs.yml` when the repo has EGCS / iQue support

name: Build EGCS libultra

Expand Down Expand Up @@ -33,7 +32,7 @@ jobs:
token: ${{ secrets.SECRETTOKEN }}
path: deps_repo
- name: Get the dependency
run: cp deps_repo/libultra/${{ matrix.version }}/* .
run: cp deps_repo/libultra/${{ matrix.version }}/* base/${{ matrix.version }}

- name: Setup
run: make setup -j $(nproc) TARGET=libultra${{ matrix.suffix }} VERSION=${{ matrix.version }}
Expand Down
23 changes: 14 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ endif
# One of:
# libgultra_rom, libgultra_d, libgultra
# libultra_rom, libultra_d, libultra
# libultra_rom_iQue
TARGET ?= libultra_rom_iQue
VERSION ?= L
TARGET ?= libultra_rom
VERSION ?= ique_v1.5
CROSS ?= mips-linux-gnu-

BASE_DIR := extracted/$(VERSION)/$(TARGET)
Expand All @@ -33,21 +32,27 @@ VERSION_I := 6
VERSION_J := 7
VERSION_K := 8
VERSION_L := 9
VERSION_IQUE_V15 := 15

VERSION_DEFINE := -DBUILD_VERSION=$(VERSION_$(VERSION)) -DBUILD_VERSION_STRING=\"2.0$(VERSION)\"
BUILD_VERSION_ID := $(VERSION_$(shell echo '$(VERSION)' | tr '[:lower:]' '[:upper:]' | tr -d '.'))
VERSION_DEFINE := -DBUILD_VERSION=$(BUILD_VERSION_ID) -DBUILD_VERSION_STRING=\"2.0$(VERSION)\"

ifeq ($(findstring _d,$(TARGET)),_d)
DEBUGFLAG := -D_DEBUG
else
DEBUGFLAG := -DNDEBUG
endif

ifeq ($(findstring _iQue,$(TARGET)),_iQue)
-include Makefile.egcs
else ifeq ($(findstring libgultra,$(TARGET)),libgultra)
ifeq ($(findstring libgultra,$(TARGET)),libgultra)
-include Makefile.gcc
else ifeq ($(findstring libultra,$(TARGET)),libultra)

ifeq ($(findstring ique_,$(VERSION)),ique_)
-include Makefile.egcs
else
-include Makefile.ido
endif

else
$(error Invalid Target)
endif
Expand All @@ -56,7 +61,7 @@ ifeq ($(findstring _rom,$(TARGET)),_rom)
CPPFLAGS += -D_FINALROM
endif

ifeq ($(findstring _iQue,$(TARGET)),_iQue)
ifeq ($(findstring ique_,$(VERSION)),ique_)
CPPFLAGS += -DBBPLAYER
SRC_DIRS := $(shell find src -type d)
else
Expand All @@ -75,7 +80,7 @@ C_FILES := $(filter-out $(addprefix src/gu/,$(MGU_MATRIX_FILES:=.c)),$(C_FILES))
endif

# Exclude src/reg/_%.c from non-iQue
ifneq ($(findstring _iQue,$(TARGET)),_iQue)
ifneq ($(findstring ique_,$(VERSION)),ique_)
C_FILES := $(filter-out src/reg/_%.c,$(C_FILES))
endif

Expand Down
1 change: 1 addition & 0 deletions include/PR/os_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#define VERSION_J 7
#define VERSION_K 8
#define VERSION_L 9
#define VERSION_IQUE_V15 15

#define OS_MAJOR_VERSION BUILD_VERSION_STRING /* major version */
#define OS_MINOR_VERSION 0 /* patch level */
Expand Down

0 comments on commit 971e4a7

Please sign in to comment.