Skip to content

Commit ebf5d3a

Browse files
committed
Put artifacts into r2r/<platform>
1 parent 3beaf3d commit ebf5d3a

File tree

7 files changed

+96
-36
lines changed

7 files changed

+96
-36
lines changed

.github/workflows/ci.yml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,29 @@ on:
99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
12+
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
platform:
17+
- adam
18+
- apple2
19+
- atari
20+
- c64
21+
- coco
22+
- msdos
23+
24+
container:
25+
image: fozztexx/defoogi:1.4.1
26+
1227
steps:
1328
- uses: actions/checkout@v4
1429

15-
- id: compile
16-
uses: ./.github/actions/build-matrix
30+
- name: Build
31+
run: make -f Makefile.${{ matrix.platform }} r2r
32+
33+
- name: Upload artifact for ${{ matrix.platform }}
34+
uses: actions/upload-artifact@v4
1735
with:
18-
platforms: "atari,apple2,adam,coco,c64,msdos"
19-
target: "disk"
36+
name: ${{ matrix.platform }}
37+
path: r2r/${{ matrix.platform }}/**

Makefile.adam

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ TARGET_EXEC ?= autorun.ddp
22

33
BUILD_DIR ?= ./build
44
SRC_DIRS ?= ./src
5+
R2R_DIR ?= ./r2r/adam
6+
R2R_BIN := $(R2R_DIR)/$(TARGET_EXEC)
57

68
ADDL_DIR1 := ../eoslib/src
79
ADDL_DIR2 := ../smartkeyslib/src
@@ -17,22 +19,22 @@ OBJS := $(SRCS:%=$(BUILD_DIR)/%.o)
1719
DEPS := $(OBJS:.o=.d)
1820

1921
CFLAGS=+coleco -subtype=adam -DBUILD_ADAM -I$(ADDL_DIR1) -I$(ADDL_DIR2)
20-
LDFLAGS=+coleco -subtype=adam -create-app -o$(TARGET_EXEC) -lndos -l$(ADDL_LIB1) -l$(ADDL_LIB2)
22+
LDFLAGS=+coleco -subtype=adam -create-app -lndos -l$(ADDL_LIB1) -l$(ADDL_LIB2)
2123
ASFLAGS=+coleco -subtype=adam
2224

2325
INC_DIRS := $(shell find $(SRC_DIRS) -type d)
2426
INC_FLAGS := $(addprefix -I,$(INC_DIRS))
2527

26-
$(BUILD_DIR)/$(TARGET_EXEC): $(OBJS)
27-
$(CC) $(LDFLAGS) $(OBJS)
28+
$(R2R_BIN): $(OBJS) | $(R2R_DIR)
29+
$(CC) -o$@ $(LDFLAGS) $(OBJS)
2830

29-
.PHONY: dist autorun clean
31+
.PHONY: dist autorun clean r2r
3032

31-
dist: $(TARGET_EXEC)
33+
dist: $(R2R_BIN)
3234
cp $< ../fujinet-platformio/data/webui/device_specific/BUILD_ADAM/
3335

34-
# Just here so all platforms can have a `make autorun`
35-
autorun: $(TARGET_EXEC)
36+
# Create the "Ready 2 Run" executable/disk
37+
r2r: $(R2R_BIN)
3638

3739
# c source
3840
$(BUILD_DIR)/%.c.o: %.c
@@ -44,8 +46,11 @@ $(BUILD_DIR)/%.asm.o: %.asm
4446
$(MKDIR_P) $(dir $@)
4547
$(AS) $(ASFLAGS) -c $< -o $@
4648

49+
$(R2R_DIR):
50+
$(MKDIR_P) $@
51+
4752
clean:
48-
$(RM) -r autorun* $(BUILD_DIR)
53+
$(RM) -r autorun* $(BUILD_DIR) $(R2R_DIR)
4954

5055
-include $(DEPS)
5156

Makefile.apple2

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ FUJINET_LIB_VERSION_DIR = $(FUJINET_LIB)/$(FUJINET_LIB_VERSION)-$(TARGETS)
1717
# Name of the final, single-file executable.
1818
# Default: name of the current dir with target name appended
1919
PROGRAM := config
20-
DISK := dist.apple2/autorun.po
20+
R2R_DIR := r2r/$(TARGETS)
21+
DISK := $(R2R_DIR)/autorun.po
2122

2223
# Path(s) to additional libraries required for linking the program
2324
# Use only if you don't want to place copies of the libraries in SRCDIR
@@ -257,7 +258,7 @@ ASFLAGS += --asm-include-dir src/$(TARGETLIST)/asminc --asm-include-dir $(FUJINE
257258
CFLAGS += --include-dir $(FUJINET_LIB_VERSION_DIR) -DUSING_FUJINET_LIB
258259

259260
.SUFFIXES:
260-
.PHONY: all test clean get_fujinet_lib zap love dist autorun
261+
.PHONY: all test clean get_fujinet_lib zap love dist r2r
261262

262263
all: get_fujinet_lib $(PROGRAM)
263264

@@ -317,6 +318,9 @@ get_fujinet_lib:
317318
$(TARGETOBJDIR):
318319
$(call MKDIR,$@)
319320

321+
$(R2R_DIR):
322+
$(call MKDIR,$@)
323+
320324
vpath %.c $(SRCDIR)/$(TARGETLIST) $(SRCDIR)
321325

322326
$(TARGETOBJDIR)/%.o: %.c | $(TARGETOBJDIR)
@@ -345,7 +349,7 @@ test: $(PROGRAM)
345349
$(EMUCMD) $<
346350
$(POSTEMUCMD)
347351

348-
$(DISK): $(PROGRAM)
352+
$(DISK): $(PROGRAM) | $(R2R_DIR)
349353
cp dist.apple2/bootable.po $@
350354
./dist.apple2/add-file.sh $@ config config.system
351355

@@ -365,8 +369,8 @@ dist: $(DISK)
365369
fi ; \
366370
)
367371

368-
# Just here so all platforms can have a `make autorun`
369-
autorun: $(DISK)
372+
# Create the "Ready 2 Run" executable/disk
373+
r2r: $(DISK)
370374

371375
gendebug: $(PROGRAM)
372376
@echo "Generating debug.scr script for AppleWin"

Makefile.atari

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ FUJINET_LIB_VERSION_DIR = $(FUJINET_LIB)/$(FUJINET_LIB_VERSION)-$(TARGETS)
1818
# Name of the final, single-file executable.
1919
# Default: name of the current dir with target name appended
2020
PROGRAM := config
21+
R2R_DIR := r2r/$(TARGETS)
22+
R2R_BIN := $(R2R_DIR)/autorun.atr
2123

2224
# Path(s) to additional libraries required for linking the program
2325
# Use only if you don't want to place copies of the libraries in SRCDIR
@@ -284,7 +286,7 @@ ASFLAGS += --asm-include-dir src/$(TARGETLIST)/asminc --asm-include-dir $(FUJINE
284286
CFLAGS += --include-dir $(FUJINET_LIB_VERSION_DIR) -DUSING_FUJINET_LIB
285287

286288
.SUFFIXES:
287-
.PHONY: all test clean get_fujinet_lib zap
289+
.PHONY: all test clean get_fujinet_lib zap r2r
288290

289291
all: get_fujinet_lib $(PROGRAM)
290292

@@ -344,6 +346,9 @@ get_fujinet_lib:
344346
$(TARGETOBJDIR):
345347
$(call MKDIR,$@)
346348

349+
$(R2R_DIR):
350+
$(call MKDIR,$@)
351+
347352
vpath %.c $(SRCDIR)/$(TARGETLIST) $(SRCDIR)
348353

349354
$(TARGETOBJDIR)/%.o: %.c | $(TARGETOBJDIR)
@@ -357,33 +362,38 @@ $(TARGETOBJDIR)/%.o: %.s | $(TARGETOBJDIR)
357362
$(PROGRAM): $(CONFIG) $(OBJECTS) $(LIBS)
358363
$(CC) -t $(CC65TARGET) $(LDFLAGS) -o $@ $(patsubst %.cfg,-C %.cfg,$^)
359364

365+
# Create the "Ready 2 Run" executable/disk
366+
r2r: $(R2R_BIN)
367+
360368
test: $(PROGRAM)
361369
$(PREEMUCMD)
362370
$(EMUCMD) $<
363371
$(POSTEMUCMD)
364372

365373
test-atr: $(PROGRAM) dist
366374
$(PREEMUCMD) \
367-
$(EMUCMD) //disk autorun.atr \
375+
$(EMUCMD) //disk $(R2R_BIN) \
368376
$(POSTEMUCMD)
369377

370-
dist: $(PROGRAM)
378+
$(R2R_BIN): $(PROGRAM)
371379
mkdir -p dist
372380
cp ../fujinet-tools/atari/dist/*.COM dist/ || true
373381
cp ../fujinet-tools/atari/dist/*.com dist/ || true
374382
cp $(PROGRAM) dist/
375-
dir2atr -m -S -B picoboot.bin autorun.atr dist/
383+
dir2atr -m -S -B picoboot.bin $@ dist/
384+
385+
dist: $(R2R_BIN)
376386

377387
dist-z: $(PROGRAM)
378388
@if [ -d "../fujinet-config-loader" ] ; then \
379-
echo "Found fujinet-config-loader, creating compressed autorun.atr"; \
389+
echo "Found fujinet-config-loader, creating compressed $(R2R_BIN)"; \
380390
$(MAKE) -C ../fujinet-config-loader clean dist > /dev/null 2>&1 ; \
381391
if [ $$? -ne 0 ] ; then \
382392
echo "ERROR running compressor"; \
383393
exit 1; \
384394
fi; \
385-
cp ../fujinet-config-loader/autorun-zx0.atr ./autorun.atr; \
386-
echo "Compressed file saved as autorun.atr"; \
395+
cp ../fujinet-config-loader/autorun-zx0.atr ./$(R2R_BIN); \
396+
echo "Compressed file saved as $(R2R_BIN)"; \
387397
else \
388398
echo "ERROR: Could not find fujinet-config-loader in sibling directory to current."; \
389399
exit 1; \

Makefile.c64

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ FUJINET_LIB_VERSION_DIR = $(FUJINET_LIB)/$(FUJINET_LIB_VERSION)-$(TARGETS)
1818
# Name of the final, single-file executable.
1919
# Default: name of the current dir with target name appended
2020
PROGRAM := config
21+
R2R_DIR := r2r/$(TARGETS)
22+
R2R_BIN := $(R2R_DIR)/$(PROGRAM).prg
2123

2224
# Path(s) to additional libraries required for linking the program
2325
# Use only if you don't want to place copies of the libraries in SRCDIR
@@ -260,7 +262,7 @@ ASFLAGS += --asm-include-dir src/$(TARGETLIST)/asminc --asm-include-dir $(FUJINE
260262
CFLAGS += --include-dir $(FUJINET_LIB_VERSION_DIR) -DUSING_FUJINET_LIB
261263

262264
.SUFFIXES:
263-
.PHONY: all test clean get_fujinet_lib zap
265+
.PHONY: all test clean get_fujinet_lib zap r2r
264266

265267
all: get_fujinet_lib $(PROGRAM)
266268

@@ -320,6 +322,9 @@ get_fujinet_lib:
320322
$(TARGETOBJDIR):
321323
$(call MKDIR,$@)
322324

325+
$(R2R_DIR):
326+
$(call MKDIR,$@)
327+
323328
vpath %.c $(SRCDIR)/$(TARGETLIST) $(SRCDIR)
324329

325330
$(TARGETOBJDIR)/%.o: %.c | $(TARGETOBJDIR)
@@ -330,9 +335,12 @@ vpath %.s $(SRCDIR)/$(TARGETLIST) $(SRCDIR)
330335
$(TARGETOBJDIR)/%.o: %.s | $(TARGETOBJDIR)
331336
$(CC) -t $(CC65TARGET) -c --create-dep $(@:.o=.d) $(ASFLAGS) -o $@ $<
332337

333-
$(PROGRAM): $(CONFIG) $(OBJECTS) $(LIBS)
338+
$(R2R_BIN): $(CONFIG) $(OBJECTS) $(LIBS) | $(R2R_DIR)
334339
$(CC) -t $(CC65TARGET) $(LDFLAGS) -o $@ $(patsubst %.cfg,-C %.cfg,$^)
335340

341+
# Create the "Ready 2 Run" executable/disk
342+
r2r: $(R2R_BIN)
343+
336344
test: $(PROGRAM)
337345
$(PREEMUCMD)
338346
$(EMUCMD) $<

Makefile.coco

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,29 @@ ECHO=echo
77
FIRMWARE_DIR="../fujinet-firmware"
88
TARGET_EXEC=config.bin
99
DISK=autorun.dsk
10+
R2R_DIR=r2r/coco
11+
R2R_BIN=$(R2R_DIR)/$(DISK)
1012

1113
$(TARGET_EXEC): check_wifi.o connect_wifi.o destination_host_slot.o hosts_and_devices.o main.o perform_copy.o select_file.o select_slot.o set_wifi.o show_info.o bar.o die.o input.o io.o mount_and_boot.o screen.o strrchr.o pause.o
1214
$(CC) -o $@ check_wifi.o connect_wifi.o destination_host_slot.o hosts_and_devices.o main.o perform_copy.o select_file.o select_slot.o set_wifi.o show_info.o bar.o die.o input.o io.o mount_and_boot.o screen.o strrchr.o pause.o
1315

14-
$(DISK): $(TARGET_EXEC)
15-
$(RM) $(DISK)
16-
decb dskini $(DISK)
17-
decb copy -t -0 dist.coco/autoexec.bas $(DISK),AUTOEXEC.BAS
18-
writecocofile $(DISK) $<
16+
$(R2R_BIN): $(TARGET_EXEC) | $(R2R_DIR)
17+
$(RM) $@
18+
decb dskini $@
19+
decb copy -t -0 dist.coco/autoexec.bas $@,AUTOEXEC.BAS
20+
writecocofile $@ $<
1921

20-
dist: $(DISK)
22+
dist: $(R2R_BIN)
2123
$(CP) $< $(FIRMWARE_DIR)/data/webui/device_specific/BUILD_COCO/
2224
$(ECHO) Now, Do a Upload Filesystem task.
2325

24-
.PHONY: autorun
25-
# Just here so all platforms can have a `make autorun`
26-
autorun: $(DISK)
26+
.PHONY: r2r
27+
28+
# Create the "Ready 2 Run" executable/disk
29+
r2r: $(R2R_BIN)
30+
31+
$(R2R_DIR):
32+
mkdir -p $@
2733

2834
pause.o: src/coco/pause.c
2935
$(CC) -c src/coco/pause.c

Makefile.msdos

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
TARGET = config.com
2+
R2R_DIR = r2r/msdos
3+
R2R_BIN = $(R2R_DIR)/$(TARGET)
4+
25
CC = wcc
36
CFLAGS = -q -0 -bt=dos -ms -osh $(CPPFLAGS) -i=src -i=src/msdos
47

@@ -10,9 +13,15 @@ SOURCE = src/check_wifi.c src/connect_wifi.c src/destination_host_slot.c src/hos
1013

1114
all: $(TARGET)
1215

13-
$(TARGET): $(OBJS)
16+
# Create the "Ready 2 Run" executable/disk
17+
r2r: $(R2R_BIN)
18+
19+
$(R2R_BIN): $(OBJS) | $(R2R_DIR)
1420
$(LD) $(LDFLAGS) NAME $@
1521

22+
$(R2R_DIR):
23+
mkdir -p $@
24+
1625
src/check_wifi.obj: src/check_wifi.c
1726
$(CC) $(CFLAGS) src/check_wifi.c
1827

0 commit comments

Comments
 (0)