Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ jobs:
# - msdos # MSDOS doesn't seem to build yet

container:
image: fozztexx/defoogi:1.4.1
image: fozztexx/defoogi:1.4.2

steps:
- uses: actions/checkout@v4

- name: Build
run: make -f Makefile.${{ matrix.platform }} r2r
run: make ${{ matrix.platform }}/r2r

- name: Upload artifact for ${{ matrix.platform }}
uses: actions/upload-artifact@v4
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,5 @@ fujinet-lib/*
# IDE files
.vscode/*
*.o
*.orig
*.rej
104 changes: 104 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
PRODUCT = config
PLATFORMS = coco apple2 atari c64 adam pmd85

# Not currently in buildable state
#PLATFORMS += dragon
#PLATFORMS += msdos
#PLATFORMS += pc6001
#PLATFORMS += pc8801
#PLATFORMS += rc2014

# Require special toolchains
#PLATFORMS += apple2cda
#PLATFORMS += apple2gs

# You can run 'make <platform>' to build for a specific platform,
# or 'make <platform>/<target>' for a platform-specific target.
# Example shortcuts:
# make coco → build for coco
# make apple2/disk → build the 'disk' target for apple2

# SRC_DIRS may use the literal %PLATFORM% token.
# It expands to the chosen PLATFORM plus any of its combos.
SRC_DIRS = src src/%PLATFORM%

# FUJINET_LIB can be
# - a version number such as 4.7.6
# - a directory which contains the libs for each platform
# - a zip file with an archived fujinet-lib
# - a URL to a git repo
# - empty which will use whatever is the latest
# - undefined, no fujinet-lib will be used
FUJINET_LIB =

# Some platforms don’t use FUJINET_LIB; set this to allow builds to continue
# even if the library isn’t present.
FUJINET_LIB_OPTIONAL = 1

# Define extra dirs ("combos") that expand with a platform.
# Format: platform+=combo1,combo2
PLATFORM_COMBOS = \
c64+=commodore \
atarixe+=atari \
msxrom+=msx \
msxdos+=msx \
dragon+=coco

include makefiles/toplevel-rules.mk

########################################
# Common things

CFLAGS = -DBUILD_$(PLATFORM_UC)
CFLAGS_EXTRA_CC65 = -Os
CFLAGS_EXTRA_Z88DK = -Os

########################################
# CoCo customization

AUTOEXEC_COCO = dist.coco/autoexec.bas
CFGLOAD_COCO = src/coco/cfgload/cfgload.asm
CFGLOAD_BIN = r2r/coco/cfgload.bin
DISK_EXTRA_DEPS_COCO := $(AUTOEXEC_COCO) $(CFGLOAD_BIN)

$(CFGLOAD_BIN):: $(CFGLOAD_COCO) | $(R2R_PD)
lwasm -b -9 -o $@ $<

# $1 == decb flags
# $2 == source file
# $3 == disk image
define coco-copy
DEST="$$(basename $2 | tr '[:lower:]' '[:upper:]')" ; \
decb copy $1 $2 $3,$${DEST}
endef

coco/disk-post::
$(call coco-copy,-t -0,$(AUTOEXEC_COCO),$(DISK))
$(call coco-copy,-b -2,$(CFGLOAD_BIN),$(DISK))

########################################
# Apple II customization

A2_LINKER_CFG = src/apple2/config.cfg
EXECUTABLE_EXTRA_DEPS_APPLE2 = $(A2_LINKER_CFG)
LDFLAGS_EXTRA_APPLE2 = -C $(A2_LINKER_CFG)

########################################
# Atari customization

EXTRA_INCLUDE_ATARI = src/atari/asminc

########################################
# Commodore 64 customization

CFLAGS_EXTRA_C64 = -DUSE_EDITSTRING

########################################
# CoCo customization

CFLAGS_EXTRA_COCO = -Wno-assign-in-condition

########################################
# Adam customization

LDFLAGS_EXTRA_ADAM = -lndos
57 changes: 0 additions & 57 deletions Makefile.adam

This file was deleted.

Loading