diff Makefile @ 74:e74d00ac6b79

Split some code into separate files for easier management (2) Because the source for lwbasic is so large, split it into several different files to make it easier to navigate and modify. This is part two of the split. Also includes fix for dependency tracking related to the split in the make file.
author William Astle <lost@l-w.ca>
date Sun, 06 Aug 2023 00:36:48 -0600
parents 9c2e66ef5fa1
children 5f8f0b0781e8
line wrap: on
line diff
--- a/Makefile	Sun Aug 06 00:12:29 2023 -0600
+++ b/Makefile	Sun Aug 06 00:36:48 2023 -0600
@@ -1,11 +1,14 @@
 .PHONY: all
 all: bin/lwbasic.rom bin/lwbasic-coco2b.rom bin/lwbasic-coco3.rom bin/coco2.zip bin/coco2b.zip bin/coco3.zip
 
-bin/lwbasic.rom: src/lwbasic.s
+lwb_srcs := consscr.s defs.s genio.s init.s interp.s irq.s keyb.s miscdata.s print.s progctrl.s vars.s
+lwb_srcs := $(addprefix src/,$(lwb_srcs))
+
+bin/lwbasic.rom: src/lwbasic.s $(lwb_srcs)
 	lwasm --tabs=16 --raw --list=src/lwbasic-coco2.list --symbols --output=bin/lwbasic.rom src/lwbasic.s
-bin/lwbasic-coco2b.rom: src/lwbasic.s
+bin/lwbasic-coco2b.rom: src/lwbasic.s $(lwb_srcs)
 	lwasm --tabs=16 --raw --list=src/lwbasic-coco2b.list --symbols --output=bin/lwbasic-coco2b.rom -DCOCO2B=1 src/lwbasic.s
-bin/lwbasic-coco3.rom: src/lwbasic.s
+bin/lwbasic-coco3.rom: src/lwbasic.s $(lwb_srcs)
 	lwasm --tabs=16 --raw --list=src/lwbasic-coco3.list --symbols --output=bin/lwbasic-coco3.rom -DCOCO3=1 src/lwbasic.s
 
 .PHONY: clean