Skip to content

Commit 76f6953

Browse files
authored
Upgrade makefiles to use MekkoGX and single top level Makefile (#142)
1 parent 81213f7 commit 76f6953

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1573
-2546
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ jobs:
2222
# - msdos # MSDOS doesn't seem to build yet
2323

2424
container:
25-
image: fozztexx/defoogi:1.4.1
25+
image: fozztexx/defoogi:1.4.2
2626

2727
steps:
2828
- uses: actions/checkout@v4
2929

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

3333
- name: Upload artifact for ${{ matrix.platform }}
3434
uses: actions/upload-artifact@v4

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,5 @@ fujinet-lib/*
6868
# IDE files
6969
.vscode/*
7070
*.o
71+
*.orig
72+
*.rej

Makefile

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
PRODUCT = config
2+
PLATFORMS = coco apple2 atari c64 adam pmd85
3+
4+
# Not currently in buildable state
5+
#PLATFORMS += dragon
6+
#PLATFORMS += msdos
7+
#PLATFORMS += pc6001
8+
#PLATFORMS += pc8801
9+
#PLATFORMS += rc2014
10+
11+
# Require special toolchains
12+
#PLATFORMS += apple2cda
13+
#PLATFORMS += apple2gs
14+
15+
# You can run 'make <platform>' to build for a specific platform,
16+
# or 'make <platform>/<target>' for a platform-specific target.
17+
# Example shortcuts:
18+
# make coco → build for coco
19+
# make apple2/disk → build the 'disk' target for apple2
20+
21+
# SRC_DIRS may use the literal %PLATFORM% token.
22+
# It expands to the chosen PLATFORM plus any of its combos.
23+
SRC_DIRS = src src/%PLATFORM%
24+
25+
# FUJINET_LIB can be
26+
# - a version number such as 4.7.6
27+
# - a directory which contains the libs for each platform
28+
# - a zip file with an archived fujinet-lib
29+
# - a URL to a git repo
30+
# - empty which will use whatever is the latest
31+
# - undefined, no fujinet-lib will be used
32+
FUJINET_LIB =
33+
34+
# Some platforms don’t use FUJINET_LIB; set this to allow builds to continue
35+
# even if the library isn’t present.
36+
FUJINET_LIB_OPTIONAL = 1
37+
38+
# Define extra dirs ("combos") that expand with a platform.
39+
# Format: platform+=combo1,combo2
40+
PLATFORM_COMBOS = \
41+
c64+=commodore \
42+
atarixe+=atari \
43+
msxrom+=msx \
44+
msxdos+=msx \
45+
dragon+=coco
46+
47+
include makefiles/toplevel-rules.mk
48+
49+
########################################
50+
# Common things
51+
52+
CFLAGS = -DBUILD_$(PLATFORM_UC)
53+
CFLAGS_EXTRA_CC65 = -Os
54+
CFLAGS_EXTRA_Z88DK = -Os
55+
56+
########################################
57+
# CoCo customization
58+
59+
AUTOEXEC_COCO = dist.coco/autoexec.bas
60+
CFGLOAD_COCO = src/coco/cfgload/cfgload.asm
61+
CFGLOAD_BIN = r2r/coco/cfgload.bin
62+
DISK_EXTRA_DEPS_COCO := $(AUTOEXEC_COCO) $(CFGLOAD_BIN)
63+
64+
$(CFGLOAD_BIN):: $(CFGLOAD_COCO) | $(R2R_PD)
65+
lwasm -b -9 -o $@ $<
66+
67+
# $1 == decb flags
68+
# $2 == source file
69+
# $3 == disk image
70+
define coco-copy
71+
DEST="$$(basename $2 | tr '[:lower:]' '[:upper:]')" ; \
72+
decb copy $1 $2 $3,$${DEST}
73+
endef
74+
75+
coco/disk-post::
76+
$(call coco-copy,-t -0,$(AUTOEXEC_COCO),$(DISK))
77+
$(call coco-copy,-b -2,$(CFGLOAD_BIN),$(DISK))
78+
79+
########################################
80+
# Apple II customization
81+
82+
A2_LINKER_CFG = src/apple2/config.cfg
83+
EXECUTABLE_EXTRA_DEPS_APPLE2 = $(A2_LINKER_CFG)
84+
LDFLAGS_EXTRA_APPLE2 = -C $(A2_LINKER_CFG)
85+
86+
########################################
87+
# Atari customization
88+
89+
EXTRA_INCLUDE_ATARI = src/atari/asminc
90+
91+
########################################
92+
# Commodore 64 customization
93+
94+
CFLAGS_EXTRA_C64 = -DUSE_EDITSTRING
95+
96+
########################################
97+
# CoCo customization
98+
99+
CFLAGS_EXTRA_COCO = -Wno-assign-in-condition
100+
101+
########################################
102+
# Adam customization
103+
104+
LDFLAGS_EXTRA_ADAM = -lndos

Makefile.adam

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)