Add floppy generation to makefile

This commit is contained in:
hkz 2025-07-28 18:35:48 +02:00
commit b33253bcb1
4 changed files with 215 additions and 207 deletions

View file

@ -1,5 +1,9 @@
VPATH = src
# Apple Commander tool JAR
ACMD=/d/Users/hkzla/software/applecommander/AppleCommander-ac-1.9.0.jar
JAVA=/c/Program\ Files/Microsoft/jdk-21.0.8.9-hotspot/bin/java.exe
# Program output
PRG=output
@ -17,7 +21,7 @@ C_SRCS = main.c monitor_subroutines.c utility.c \
# Object files
OBJS = $(ASM_SRCS:%.s=%.o) $(C_SRCS:%.c=%.o)
all: $(PRG).wav
all: $(PRG).wav $(PRG).dsk
%.o: %.s
as6502 --core=6502 --list-file=$(@:%.o=obj/%.lst) -o obj/$@ $<
@ -33,10 +37,14 @@ $(PRG).bin: $(PRG).hex
$(PRG).wav: $(PRG).bin
(cd out ; c2t -3 $(PRG).bin,801 $(PRG).wav)
$(PRG).dsk: $(PRG).bin
(cd out ; cp ../dsk/TK2048_AUTO_BRUN.dsk ./$(PRG).dsk; cat $(PRG).bin | $(JAVA) -jar $(ACMD) -p $(PRG).dsk HELLO B 0x801)
clean:
-(cd obj ; rm $(OBJS) $(OBJS:%.o=%.lst))
-rm obj/*.lst
-rm out/*.hex
-rm out/*.bin
-rm out/*.wav
-rm out/*.wav
-rm out/*.dsk