|
| 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 |
0 commit comments