2013-12-29 22:39:35 +00:00
|
|
|
# Build for Cirrus Logic CS8900A based devices:
|
2015-07-07 17:43:32 +00:00
|
|
|
# make eth=cl
|
2013-12-29 22:39:35 +00:00
|
|
|
|
|
|
|
# Build for Standard Microsystems LAN91C96 based devices:
|
|
|
|
# make eth=sm
|
|
|
|
|
|
|
|
# Build for WIZnet W5100 based devices:
|
|
|
|
# make eth=wn
|
|
|
|
|
2015-07-07 17:43:32 +00:00
|
|
|
ifeq ($(eth),cl)
|
|
|
|
C64DRIVERLIB = ../drivers/c64rrnet.lib
|
|
|
|
A2DRIVERLIB = ../drivers/a2uther.lib
|
|
|
|
else ifeq ($(eth),sm)
|
2014-06-12 22:00:53 +00:00
|
|
|
C64DRIVERLIB = ../drivers/c64eth64.lib
|
2013-12-29 22:39:35 +00:00
|
|
|
A2DRIVERLIB = ../drivers/a2lancegs.lib
|
|
|
|
else ifeq ($(eth),wn)
|
2015-07-07 17:43:32 +00:00
|
|
|
C64DRIVERLIB = ../drivers/c64wiz811.lib
|
2014-06-12 22:00:53 +00:00
|
|
|
A2DRIVERLIB = ../drivers/a2uther2.lib
|
2013-12-29 22:39:35 +00:00
|
|
|
else
|
2015-07-07 17:43:32 +00:00
|
|
|
C64DRIVERLIB = ../drivers/c64combo.lib
|
|
|
|
A2DRIVERLIB = ../drivers/a2combo.lib
|
2013-12-29 22:39:35 +00:00
|
|
|
endif
|
2015-08-28 13:19:52 +00:00
|
|
|
ATRDRIVERLIB = ../drivers/atrdragon.lib
|
2015-07-07 17:43:32 +00:00
|
|
|
VICDRIVERLIB = ../drivers/vic20rrnet.lib
|
2013-12-29 22:39:35 +00:00
|
|
|
|
2014-06-12 22:00:53 +00:00
|
|
|
UDP =\
|
|
|
|
dns \
|
|
|
|
dottedquad \
|
|
|
|
parsequerystring \
|
|
|
|
sntp \
|
2017-05-18 22:17:38 +00:00
|
|
|
tftp \
|
2018-02-06 12:06:05 +00:00
|
|
|
timer \
|
2017-11-05 13:28:49 +00:00
|
|
|
udp \
|
2017-05-18 22:17:38 +00:00
|
|
|
vt100
|
2013-12-29 22:39:35 +00:00
|
|
|
|
2014-06-12 22:00:53 +00:00
|
|
|
TCP =\
|
|
|
|
geturl \
|
|
|
|
httpd \
|
2017-11-03 23:25:09 +00:00
|
|
|
math \
|
2014-06-12 22:00:53 +00:00
|
|
|
parser \
|
2017-11-06 22:36:44 +00:00
|
|
|
ping \
|
|
|
|
tcp
|
2010-12-28 03:59:36 +00:00
|
|
|
|
2017-11-27 22:22:47 +00:00
|
|
|
C_PGM := $(foreach pgm,$(UDP) $(TCP),$(basename $(wildcard $(pgm).c)))
|
|
|
|
|
2014-06-12 22:00:53 +00:00
|
|
|
all: $(UDP) $(TCP)
|
|
|
|
.PHONY: $(UDP) $(TCP)
|
|
|
|
|
|
|
|
$(addsuffix .prg,$(UDP)): IP65LIB = ../ip65/ip65.lib
|
|
|
|
$(addsuffix .prg,$(TCP)): IP65LIB = ../ip65/ip65_tcp.lib
|
|
|
|
|
|
|
|
$(addsuffix .bin,$(UDP)): IP65LIB = ../ip65/ip65.lib
|
|
|
|
$(addsuffix .bin,$(TCP)): IP65LIB = ../ip65/ip65_tcp.lib
|
|
|
|
|
2015-08-28 13:19:52 +00:00
|
|
|
$(addsuffix .com,$(UDP)): IP65LIB = ../ip65/ip65.lib
|
|
|
|
$(addsuffix .com,$(TCP)): IP65LIB = ../ip65/ip65_tcp.lib
|
|
|
|
|
2017-11-27 22:22:47 +00:00
|
|
|
$(addsuffix .xl.com,$(UDP)): IP65LIB = ../ip65/ip65.lib
|
|
|
|
$(addsuffix .xl.com,$(TCP)): IP65LIB = ../ip65/ip65_tcp.lib
|
|
|
|
|
2014-06-12 22:00:53 +00:00
|
|
|
$(addsuffix .vicprg,$(UDP)): IP65LIB = ../ip65/ip65.lib
|
|
|
|
$(addsuffix .vicprg,$(TCP)): IP65LIB = ../ip65/ip65_tcp.lib
|
|
|
|
|
2017-11-09 21:08:57 +00:00
|
|
|
$(foreach pgm,$(UDP) $(TCP),$(eval $(pgm): $(pgm).prg $(pgm).bin $(pgm).com))
|
2014-06-12 22:00:53 +00:00
|
|
|
|
2017-11-27 22:22:47 +00:00
|
|
|
$(foreach pgm,$(C_PGM),$(eval $(pgm): $(pgm).xl.com))
|
|
|
|
|
2017-11-03 23:40:35 +00:00
|
|
|
httpd-slotscan.bin: IP65LIB = ../ip65/ip65_tcp.lib
|
|
|
|
|
2014-06-12 22:00:53 +00:00
|
|
|
prg: $(addsuffix .prg,$(UDP) $(TCP))
|
|
|
|
|
2017-11-03 23:40:35 +00:00
|
|
|
bin: $(addsuffix .bin,$(UDP) $(TCP)) httpd-slotscan.bin
|
2014-06-12 22:00:53 +00:00
|
|
|
|
2015-08-28 13:19:52 +00:00
|
|
|
com: $(addsuffix .com,$(UDP) $(TCP))
|
|
|
|
|
2017-11-27 22:22:47 +00:00
|
|
|
xl.com: $(addsuffix .xl.com,$(C_PGM))
|
|
|
|
|
2014-06-12 22:00:53 +00:00
|
|
|
vicprg: $(addsuffix .vicprg,$(UDP) $(TCP))
|
2010-12-28 03:59:36 +00:00
|
|
|
|
2017-05-18 22:17:38 +00:00
|
|
|
d64: ip65test.d64
|
2010-12-10 13:12:18 +00:00
|
|
|
|
2017-05-18 22:17:38 +00:00
|
|
|
dsk: ip65test.dsk
|
2010-12-10 13:12:18 +00:00
|
|
|
|
2017-05-18 22:17:38 +00:00
|
|
|
atr: ip65test.atr
|
2015-08-28 13:19:52 +00:00
|
|
|
|
2014-06-12 22:00:53 +00:00
|
|
|
ip65:
|
|
|
|
make -C ../ip65
|
2013-12-29 22:39:35 +00:00
|
|
|
|
2014-06-12 22:00:53 +00:00
|
|
|
drivers:
|
|
|
|
make -C ../drivers
|
2013-12-29 22:39:35 +00:00
|
|
|
|
2017-10-02 06:05:39 +00:00
|
|
|
ATARI_CFG = atari.cfg
|
|
|
|
vt100.com: ATARI_CFG = ../apps/atrtelnet.cfg
|
|
|
|
|
2014-06-12 22:00:53 +00:00
|
|
|
%.o: %.s
|
|
|
|
ca65 $<
|
2010-12-10 13:12:18 +00:00
|
|
|
|
2017-11-03 23:40:35 +00:00
|
|
|
%-slotscan.o: %.s
|
|
|
|
ca65 -D A2_SLOT_SCAN -o $@ $<
|
|
|
|
|
2017-11-05 13:28:49 +00:00
|
|
|
%.o: %.c
|
|
|
|
|
2018-02-23 15:59:31 +00:00
|
|
|
%.prg: %.o ip65 drivers
|
2014-06-12 22:00:53 +00:00
|
|
|
ld65 -o $*.prg -C c64.cfg -m $*.c64.map -vm $< $(IP65LIB) $(C64DRIVERLIB) c64.lib
|
2010-12-10 13:12:18 +00:00
|
|
|
|
2018-02-23 15:59:31 +00:00
|
|
|
%.bin: %.o ip65 drivers
|
2014-06-12 22:00:53 +00:00
|
|
|
ld65 -o $*.bin -C apple2.cfg -m $*.a2.map -vm $< $(IP65LIB) $(A2DRIVERLIB) apple2.lib
|
2010-12-10 13:12:18 +00:00
|
|
|
|
2018-02-23 15:59:31 +00:00
|
|
|
%.com: %.o ip65 drivers
|
2017-10-02 06:05:39 +00:00
|
|
|
ld65 -o $*.com -C $(ATARI_CFG) -m $*.atr.map -vm $< $(IP65LIB) $(ATRDRIVERLIB) atari.lib
|
2015-08-28 13:19:52 +00:00
|
|
|
|
2018-02-23 15:59:31 +00:00
|
|
|
%.vicprg: %.o ip65 drivers
|
2014-06-12 22:00:53 +00:00
|
|
|
ld65 -o $*.vicprg -C vic20-32k.cfg -m $*.vic.map -vm $< $(IP65LIB) $(VICDRIVERLIB) vic20.lib
|
2013-04-10 08:37:05 +00:00
|
|
|
|
2018-02-23 15:59:31 +00:00
|
|
|
%.prg: %.c ip65 drivers
|
2018-02-06 12:06:05 +00:00
|
|
|
cl65 -o $*.prg -O -t c64 -m $*.c64.map -vm $< $(wildcard $**.s) $(IP65LIB) ../drivers/ip65_c64.lib
|
2017-11-05 13:28:49 +00:00
|
|
|
rm $*.o
|
|
|
|
|
2018-02-23 15:59:31 +00:00
|
|
|
%.bin: %.c ip65 drivers
|
2018-02-06 12:06:05 +00:00
|
|
|
cl65 -o $*.bin -O -t apple2 -m $*.a2.map -vm $< $(wildcard $**.s) $(IP65LIB) ../drivers/ip65_apple2.lib
|
2017-11-05 13:28:49 +00:00
|
|
|
rm $*.o
|
|
|
|
|
2018-02-23 15:59:31 +00:00
|
|
|
%.com: %.c ip65 drivers
|
2018-02-06 12:06:05 +00:00
|
|
|
cl65 -o $*.com -O -t atari -m $*.atr.map -vm $< $(wildcard $**.s) $(IP65LIB) ../drivers/ip65_atari.lib
|
2017-11-05 13:28:49 +00:00
|
|
|
rm $*.o
|
|
|
|
|
2018-02-23 15:59:31 +00:00
|
|
|
%.xl.com: %.c ip65 drivers
|
2018-02-06 12:06:05 +00:00
|
|
|
cl65 -o $*.xl.com -O -t atarixl -m $*.atrxl.map -vm $< $(wildcard $**.s) $(IP65LIB) ../drivers/ip65_atarixl.lib
|
2017-11-27 22:22:47 +00:00
|
|
|
rm $*.o
|
|
|
|
|
2017-05-18 22:17:38 +00:00
|
|
|
ip65test.d64: prg
|
2013-12-15 21:50:01 +00:00
|
|
|
$(C1541) -format ip65,00 d64 $@
|
|
|
|
$(C1541) -attach $@ -write dns.prg dns,p
|
|
|
|
$(C1541) -attach $@ -write dottedquad.prg dottedquad,p
|
|
|
|
$(C1541) -attach $@ -write geturl.prg geturl,p
|
2014-04-27 15:47:07 +00:00
|
|
|
$(C1541) -attach $@ -write httpd.prg httpd,p
|
2017-11-03 23:25:09 +00:00
|
|
|
$(C1541) -attach $@ -write math.prg math,p
|
2013-12-15 21:50:01 +00:00
|
|
|
$(C1541) -attach $@ -write parser.prg parser,p
|
|
|
|
$(C1541) -attach $@ -write ping.prg ping,p
|
|
|
|
$(C1541) -attach $@ -write sntp.prg sntp,p
|
2017-11-06 22:36:44 +00:00
|
|
|
$(C1541) -attach $@ -write tcp.prg tcp,p
|
2013-12-15 21:50:01 +00:00
|
|
|
$(C1541) -attach $@ -write tftp.prg tftp,p
|
2018-02-06 12:06:05 +00:00
|
|
|
$(C1541) -attach $@ -write timer.prg timer,p
|
2017-11-05 13:28:49 +00:00
|
|
|
$(C1541) -attach $@ -write udp.prg udp,p
|
2017-05-18 22:17:38 +00:00
|
|
|
$(C1541) -attach $@ -write vt100.prg vt100,p
|
2010-12-10 13:12:18 +00:00
|
|
|
|
2017-05-18 22:17:38 +00:00
|
|
|
ip65test.dsk: bin
|
2018-07-20 17:12:51 +00:00
|
|
|
cp ../build/prodos.dsk $@
|
2018-03-08 15:12:23 +00:00
|
|
|
java -jar $(AC) -as $@ dns < dns.bin
|
|
|
|
java -jar $(AC) -as $@ geturl < geturl.bin
|
|
|
|
java -jar $(AC) -as $@ httpd < httpd.bin
|
|
|
|
java -jar $(AC) -as $@ httpd.slotscan < httpd-slotscan.bin
|
|
|
|
java -jar $(AC) -as $@ math < math.bin
|
|
|
|
java -jar $(AC) -as $@ parser < parser.bin
|
|
|
|
java -jar $(AC) -as $@ ping < ping.bin
|
|
|
|
java -jar $(AC) -as $@ sntp < sntp.bin
|
|
|
|
java -jar $(AC) -as $@ tcp < tcp.bin
|
|
|
|
java -jar $(AC) -as $@ tftp < tftp.bin
|
|
|
|
java -jar $(AC) -as $@ udp < udp.bin
|
|
|
|
java -jar $(AC) -as $@ vt100 < vt100.bin
|
2009-12-06 06:24:18 +00:00
|
|
|
|
2017-11-27 22:22:47 +00:00
|
|
|
ip65test.atr: com xl.com
|
2015-08-28 13:19:52 +00:00
|
|
|
mkdir atr
|
2018-07-20 17:12:51 +00:00
|
|
|
cp ../build/dos.sys atr/dos.sys
|
|
|
|
cp ../build/dup.sys atr/dup.sys
|
|
|
|
cp dns.com atr/dns.com
|
|
|
|
cp geturl.com atr/geturl.com
|
|
|
|
cp httpd.com atr/httpd.com
|
|
|
|
cp math.com atr/math.com
|
|
|
|
cp parser.com atr/parser.com
|
|
|
|
cp ping.com atr/ping.com
|
|
|
|
cp sntp.com atr/sntp.com
|
|
|
|
cp tcp.com atr/tcp.com
|
|
|
|
cp tcp.xl.com atr/tcpxl.com
|
|
|
|
cp tftp.com atr/tftp.com
|
|
|
|
cp timer.com atr/timer.com
|
|
|
|
cp timer.xl.com atr/timerxl.com
|
|
|
|
cp udp.com atr/udp.com
|
|
|
|
cp udp.xl.com atr/udpxl.com
|
|
|
|
cp vt100.com atr/vt100.com
|
2015-08-28 13:19:52 +00:00
|
|
|
$(DIR2ATR) -b Dos25 1040 $@ atr
|
|
|
|
rm -r atr
|
|
|
|
|
2017-11-05 13:28:49 +00:00
|
|
|
%.exe: %.c
|
|
|
|
cl /Fe:$@ $^
|
|
|
|
|
2009-01-22 01:27:03 +00:00
|
|
|
clean:
|
2014-06-12 22:00:53 +00:00
|
|
|
make -C ../ip65 clean
|
|
|
|
make -C ../drivers clean
|
2017-11-05 13:28:49 +00:00
|
|
|
-rm -f *.o *.prg *.bin *.com *.vicprg *.map *.obj *.exe
|
2017-11-03 23:40:35 +00:00
|
|
|
-rm -f ip65test.d64 ip65test.dsk ip65test.atr
|