Subversion Repositories Krakow BASIC

Rev

Rev 34 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 nishi 1
# $Id: Makefile 35 2024-09-05 05:30:52Z nishi $
2
 
3
include $(PWD)/Platform/$(PLATFORM).mk
4
 
5
TARGET ?= krakow$(EXEC)
6
 
7
.PHONY: all clean
8
 
9
all: $(TARGET)
10
 
4 nishi 11
krakow$(EXEC): krakow$(OBJ)
29 nishi 12
	$(LD) $(LDFLAGS) $@ krakow$(OBJ) $(LIBS) || ( rm -f krakow$(EXEC) ; exit 1 )
2 nishi 13
 
29 nishi 14
krakow.msx.rom: krakow.msx.bin krakow.msx.ihx
15
	hex2bin -e rom krakow.msx.ihx
34 nishi 16
	dd if=krakow.msx.bin of=krakow.msx.rom obs=1 seek=256 conv=notrunc
29 nishi 17
 
18
krakow.msx.bin: krakow$(EXEC)
19
	hex2bin -e msx.bin krakow$(EXEC)
20
 
21
krakow.msx.ihx: msx.rel
22
	sdldz80 -i $@ msx.rel
23
 
24
msx.rel: msx.s
25
	sdasz80 -o $@ msx.s
26
 
2 nishi 27
krakow.hex: krakow.elf
28
	objcopy -O ihex -R $(SECTION) krakow.elf $@
29
 
7 nishi 30
krakow.dsk: krakow$(EXEC) $(PWD)/master.dsk $(PWD)/ac.jar
25 nishi 31
	cp $(PWD)/master.dsk krakow.dsk
32
	java -jar $(PWD)/ac.jar -as krakow.dsk krakow < krakow$(EXEC)
7 nishi 33
 
4 nishi 34
krakow$(OBJ): basic.c
35
	$(CC) $(CFLAGS) -o $@ basic.c
2 nishi 36
 
37
clean:
35 nishi 38
	rm -f *.hex *.exe krakow *.o *.elf krakow.s *.80 *.rom *.dsk *.prg *.sym *.lst *.rel *.ihx *.asm *.bin