aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 88fd65df4fe57bf07f5fbc74a378ab2cd440c199 (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
PARTS=loading1.xex config/config.xex loading2.xex memsetup.xex font_dl.xex client.xex

TESTXEX=fnchat-$(shell date +%Y%m%d-%H%M).xex

VERSION:=$(shell git describe --dirty --long 2>/dev/null || echo NOGIT )+$(shell date +%Y%m%d-%H%M )@$(shell hostname -s 2>/dev/null || echo UNKNOWN )

# remove the -a if using older versions of atasm
ATASM=atasm -s -a

all: clean fnchat.xex
	[ -d /var/tnfs ] && cp fnchat.xex /var/tnfs/ || true

fnchat.xex: $(PARTS)
	cat $(PARTS) > fnchat.xex

client.xex: client

client:
	$(MAKE) -f Makefile.client VERSION=$(VERSION)

config/config.xex:
	$(MAKE) -C config VERSION=$(VERSION)

clean:
	rm -f $(PARTS) *.o src/*.o obj/atari/*.o config/*.o fnchat.xex
	$(MAKE) -f Makefile.client clean

%.xex: %.asm
	$(ATASM) -o$@ $<

memsetup.xex: memsetup.asm

loading1.xex: loading.asm
	$(ATASM) -o$@ $<

loading2.xex: loading.asm
	$(ATASM) -o$@ -DCLIENT=1 $<

font_dl.xex: font_dl.asm font.dat

test: memsetup.xex font_dl.xex
	cl65 -C src/atari.cfg -t atari -o testmain.xex src/addrs.c src/edbox.c src/screen.c src/keyclick.s uitest/test.c
	cat memsetup.xex font_dl.xex testmain.xex > test.xex

install: all
	cp fnchat.xex $(TESTXEX)
	sluk $(TESTXEX)
	scp $(TESTXEX) zapp:/var/tnfs/

atr: all
	cp atr/dos_20s.atr atr/fnchat-dos2.atr
	cp atr/dos25_sd.atr atr/fnchat-dos25.atr
	cp atr/mydos_sd.atr atr/fnchat-mydos.atr
	cp fnchat.xex atr/autorun.sys
	cp fnchat.xex atr/fnchat.ar0
	cd atr ; \
	axe -w autorun.sys fnchat-dos2.atr ; \
	axe -w autorun.sys fnchat-dos25.atr ; \
	axe -w fnchat.ar0 fnchat-mydos.atr ; \
	cp fnchat-dos2.atr fnchat-dos25.atr fnchat-mydos.atr /var/tnfs