Subversion Repositories Krakow BASIC

Rev

Rev 35 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 nishi 1
# $Id: Makefile 39 2024-09-06 12:56:29Z nishi $
2
 
3
include $(PWD)/Platform/$(PLATFORM).mk
4
 
5
TARGET ?= krakow$(EXEC)
6
 
7
.PHONY: all clean
8
 
9
all: $(TARGET)
10
 
39 nishi 11
krakow$(EXEC): krakow$(OBJ) $(EXTOBJ)
12
	$(LD) $(LDFLAGS) $@ krakow$(OBJ) $(EXTOBJ) $(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
 
39 nishi 37
x11$(OBJ): x11.c
38
	$(CC) $(CFLAGS) -o $@ x11.c
39
 
2 nishi 40
clean:
35 nishi 41
	rm -f *.hex *.exe krakow *.o *.elf krakow.s *.80 *.rom *.dsk *.prg *.sym *.lst *.rel *.ihx *.asm *.bin