aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: b2c2eed5093e5eb87324742af6486df3f39d20a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
CL65=cl65
AXE=axe

all: reloc.atr reloc25.atr native.atr

reloc25.atr: reloc.atr
	cp dos25_sd.atr reloc25.atr
	$(AXE) -w autorun.sys reloc25.atr

reloc.atr: reloc.xex lo.xex hi.xex autorun.sys
	cp dos_20s.atr reloc.atr
	$(AXE) -w autorun.sys reloc.atr

native.atr: mkreloc.xex reloc.xex autorun.sys
	cp dos_20s.atr native.atr
	$(AXE) -D autorun.sys native.atr
	$(AXE) -w lo.xex native.atr
	$(AXE) -w hi.xex native.atr
	$(AXE) -w reloc.xex native.atr
	$(AXE) -w mkreloc.xex native.atr

autorun.sys: reloc.xex lo.xex hi.xex mkreloc
	./mkreloc

reloc.xex: reloc.s mkreloc
	$(CL65) -t none -o reloc.xex reloc.s

mkreloc.xex: mkreloc.c
	$(CL65) -t atari -o mkreloc.xex -Wl -D__SYSTEM_CHECK__=1 mkreloc.c

mkreloc: mkreloc.c
	$(CC) $(CFLAGS) -Wall -o mkreloc mkreloc.c

lo.xex: hello.s
	$(CL65) -t none -o lo.xex --asm-define start_addr=0x4000 hello.s

hi.xex: hello.s
	$(CL65) -t none -o hi.xex --asm-define start_addr=0x4100 hello.s

clean:
	rm -f reloc.atr lo.xex hi.xex reloc.xex mkreloc mkreloc.xex native.atr reloc25.atr *.o