Replace host/build.sh with a Makefile

This commit is contained in:
John Lorentzson 2025-07-25 12:54:39 +02:00
parent 981b989ad1
commit 69b29fc77c
4 changed files with 22 additions and 8 deletions

20
host/Makefile Normal file
View file

@ -0,0 +1,20 @@
BINARY := host.prg
BUILD_DIR := ./build
SRC_DIR := ./src
SRCS := $(shell find $(SRC_DIR) -name '*.s' -or -name '*.inc')
TOPLEVEL := source.s
CL := cl65
CLFLAGS := -u __EXEHDR__ -t c64 -C c64-asm.cfg -l $(BUILD_DIR)/host.lst -Ln $(BUILD_DIR)/host.lbl
$(BUILD_DIR)/$(BINARY): $(SRCS)
mkdir -p $(BUILD_DIR)
$(CL) -o $@ $(CLFLAGS) $(SRC_DIR)/$(TOPLEVEL)
all: $(BUILD_DIR)/$(BINARY)
preview: userprog.bin $(SRCS)
$(CL) -o $@ -D EMULATOR_PREVIEW $(CLFLAGS) $(SRC_DIR)/$(TOPLEVEL)

View file

@ -1,6 +0,0 @@
# !/bin/bash
#Note that program start at $080D
cl65 -o build/host.prg -u __EXEHDR__ -t c64 -C c64-asm.cfg -l build/program.lst source.s -Ln build/program.lbl \
#VICE do not like -
sed -i 's/-/m/g' program.lbl

View file

@ -1,5 +1,5 @@
# !/bin/bash
killall x64sc
./build.sh \
make \
&& nohup flatpak run net.sf.VICE -windowypos 0 -windowxpos 960 -windowwidth 945 -windowheight 720 -moncommands program.lbl build/file.prg </dev/null &>/dev/null &

View file

@ -1,4 +1,4 @@
# !/bin/bash
./build.sh &&
make &&
./retrodebugger_label_build_tool/rdb_build_label.sh \
&& nohup retrodebugger -b retrodebugger_label_build_tool/new.labels.labels -c64 ./build/file.prg </dev/null &>/dev/null &