diff --git a/.github/workflows/build_dreamcast.yml b/.github/workflows/build_dreamcast.yml new file mode 100644 index 000000000..572731d16 --- /dev/null +++ b/.github/workflows/build_dreamcast.yml @@ -0,0 +1,32 @@ +name: Build latest (Dreamcast) +on: [push] + +concurrency: + group: ${{ github.ref }}-dreamcast + cancel-in-progress: true + +jobs: + build: + if: github.ref_name == github.event.repository.default_branch + runs-on: ubuntu-latest + container: + image: kazade/dreamcast-sdk + steps: + - uses: actions/checkout@v3 + - name: Compile Dreamcast build + id: compile + run: | + source /opt/toolchains/dc/kos/environ.sh + make dreamcast + + - uses: ./.github/actions/notify_failure + if: ${{ always() && steps.compile.outcome == 'failure' }} + with: + NOTIFY_MESSAGE: 'Failed to compile Dreamcast build' + WEBHOOK_URL: '${{ secrets.WEBHOOK_URL }}' + + - uses: ./.github/actions/upload_build + if: ${{ always() && steps.compile.outcome == 'success' }} + with: + SOURCE_FILE: 'ClassiCube-dc.cdi' + DEST_NAME: 'ClassiCube-dc.cdi' \ No newline at end of file diff --git a/.github/workflows/build_xbox.yml b/.github/workflows/build_xbox.yml index 99f27b85a..fc4ed6356 100644 --- a/.github/workflows/build_xbox.yml +++ b/.github/workflows/build_xbox.yml @@ -35,7 +35,7 @@ jobs: - uses: ./.github/actions/upload_build if: ${{ always() && steps.compile.outcome == 'success' }} with: - SOURCE_FILE: 'ClassiCube.xbe' + SOURCE_FILE: 'bin/default.xbe' DEST_NAME: 'ClassiCube-xbox.xbe' - uses: ./.github/actions/upload_build diff --git a/Makefile b/Makefile index c0b47ba3f..9fde8ebaa 100644 --- a/Makefile +++ b/Makefile @@ -148,7 +148,7 @@ psp: vita: $(MAKE) -f misc/vita/Makefile PLAT=vita ps3: - $(MAKE) -f src/Makefile_PS3 PLAT=ps3 + $(MAKE) -f misc/ps3/Makefile PLAT=ps3 3ds: $(MAKE) -f misc/3ds/Makefile PLAT=3ds wii: @@ -156,9 +156,9 @@ wii: gamecube: $(MAKE) -f misc/gc/Makefile PLAT=gamecube dreamcast: - $(MAKE) -f src/Makefile_dreamcast PLAT=dreamcast + $(MAKE) -f misc/dreamcast/Makefile PLAT=dreamcast xbox: - $(MAKE) -f src/Makefile_xbox PLAT=xbox + $(MAKE) -f misc/xbox/Makefile PLAT=xbox xbox360: $(MAKE) -f src/Makefile_xbox360 PLAT=xbox360 diff --git a/misc/dreamcast/Makefile b/misc/dreamcast/Makefile new file mode 100644 index 000000000..f8b71eeb4 --- /dev/null +++ b/misc/dreamcast/Makefile @@ -0,0 +1,16 @@ +BUILD_DIR := build-dreamcast +SOURCE_DIRS := src third_party/bearssl/src + +C_FILES := $(foreach dir,$(SOURCE_DIRS),$(wildcard $(dir)/*.c)) +OBJS := $(notdir $(C_FILES:%.c=%.o)) + +TARGET := ClassiCube-dc.elf + +ifeq ($(strip $(KOS_BASE)),) +$(error "Please set KOS variables in your environment.") +endif + +include $(KOS_BASE)/Makefile.rules + +$(TARGET): $(OBJS) + kos-cc -o $(TARGET) $(OBJS) \ No newline at end of file diff --git a/src/Makefile_PS3 b/misc/ps3/Makefile similarity index 96% rename from src/Makefile_PS3 rename to misc/ps3/Makefile index 73b58bc98..7240c94ee 100644 --- a/src/Makefile_PS3 +++ b/misc/ps3/Makefile @@ -100,7 +100,7 @@ export OUTPUT := $(CURDIR)/$(TARGET) #--------------------------------------------------------------------------------- $(BUILD): @[ -d $@ ] || mkdir -p $@ - @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/src/Makefile_PS3 + @$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/misc/ps3/Makefile #--------------------------------------------------------------------------------- clean: diff --git a/src/Makefile_xbox b/misc/xbox/Makefile similarity index 100% rename from src/Makefile_xbox rename to misc/xbox/Makefile diff --git a/src/Makefile_vita b/src/Makefile_vita deleted file mode 100644 index 48f67c759..000000000 --- a/src/Makefile_vita +++ /dev/null @@ -1,44 +0,0 @@ -PROJECT_TITLE := ClassiCube -PROJECT_TITLEID := CUBE00200 -TARGET := ClassiCube-vita - -BUILD_DIR := build-vita -SOURCE_DIR := src - -CFLAGS += -Wl,-q -I../common -C_FILES := $(wildcard $(SOURCE_DIR)/*.c) -OBJS := $(addprefix $(BUILD_DIR)/, $(C_FILES:$(SOURCE_DIR)/%.c=%.o)) - -# Needed by psvDebugScreenPrintf -LIBS += -lm -lSceDisplay_stub -lSceCtrl_stub -lSceTouch_stub -lSceGxm_stub - - -#--------------------------------------------------------------------------------- -# main targets -#--------------------------------------------------------------------------------- -default: $(BUILD_DIR) $(TARGET).vpk - -$(BUILD_DIR): - mkdir -p $(BUILD_DIR) - -$(TARGET).vpk: eboot.bin param.sfo - vita-pack-vpk -s param.sfo -b eboot.bin $(TARGET).vpk - -eboot.bin: $(TARGET).velf - vita-make-fself $(TARGET).velf eboot.bin - -param.sfo: - vita-mksfoex -s TITLE_ID="$(PROJECT_TITLEID)" "$(PROJECT_TITLE)" param.sfo - -$(TARGET).velf: $(TARGET).elf - arm-vita-eabi-strip -g $< - vita-elf-create $< $@ - -$(TARGET).elf: $(OBJS) - arm-vita-eabi-gcc $(CFLAGS) $^ $(LIBS) -o $@ - -$(BUILD_DIR)/%.o : src/%.c - arm-vita-eabi-gcc -c $(CFLAGS) -o $@ $< - -clean: - rm $(TARGET).velf $(TARGET).elf $(TARGET).vpk param.sfo eboot.bin $(OBJS)