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 \
|
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
|
|
|
|
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
|
|
|
|
|
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-03 23:40:35 +00:00
|
|
|
httpd-slotscan.bin: IP65LIB = ../ip65/ip65_tcp.lib
|
|
|
|
|
2014-06-12 22:00:53 +00:00
|
|
|
INCFILES =\
|
|
|
|
../inc/common.i \
|
|
|
|
../inc/commonprint.i \
|
|
|
|
../inc/net.i
|
|
|
|
|
|
|
|
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))
|
|
|
|
|
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
|
|
|
|
|
2014-06-12 22:00:53 +00:00
|
|
|
%.prg: %.o ip65 drivers $(INCFILES)
|
|
|
|
ld65 -o $*.prg -C c64.cfg -m $*.c64.map -vm $< $(IP65LIB) $(C64DRIVERLIB) c64.lib
|
2010-12-10 13:12:18 +00:00
|
|
|
|
2014-06-12 22:00:53 +00:00
|
|
|
%.bin: %.o ip65 drivers $(INCFILES)
|
|
|
|
ld65 -o $*.bin -C apple2.cfg -m $*.a2.map -vm $< $(IP65LIB) $(A2DRIVERLIB) apple2.lib
|
2010-12-10 13:12:18 +00:00
|
|
|
|
2015-08-28 13:19:52 +00:00
|
|
|
%.com: %.o ip65 drivers $(INCFILES)
|
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
|
|
|
|
2014-06-12 22:00:53 +00:00
|
|
|
%.vicprg: %.o ip65 drivers $(INCFILES)
|
|
|
|
ld65 -o $*.vicprg -C vic20-32k.cfg -m $*.vic.map -vm $< $(IP65LIB) $(VICDRIVERLIB) vic20.lib
|
2013-04-10 08:37:05 +00:00
|
|
|
|
2017-11-05 13:28:49 +00:00
|
|
|
%.prg: %.c ip65 drivers $(INCFILES)
|
|
|
|
cl65 -o $*.prg -O -t c64 -m $*.c64.map -vm $< $(IP65LIB) ../drivers/ip65_c64.lib
|
|
|
|
rm $*.o
|
|
|
|
|
|
|
|
%.bin: %.c ip65 drivers $(INCFILES)
|
|
|
|
cl65 -o $*.bin -O -t apple2 -m $*.a2.map -vm $< $(IP65LIB) ../drivers/ip65_apple2.lib
|
|
|
|
rm $*.o
|
|
|
|
|
|
|
|
%.com: %.c ip65 drivers $(INCFILES)
|
|
|
|
cl65 -o $*.com -O -t atari -m $*.atr.map -vm $< $(IP65LIB) ../drivers/ip65_atari.lib
|
|
|
|
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
|
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
|
2013-12-15 21:50:01 +00:00
|
|
|
cp prodos.dsk $@
|
2017-11-03 23:40:35 +00:00
|
|
|
java -jar $(AC) -cc65 $@ dns bin < dns.bin
|
|
|
|
java -jar $(AC) -cc65 $@ dottedquad bin < dottedquad.bin
|
|
|
|
java -jar $(AC) -cc65 $@ geturl bin < geturl.bin
|
|
|
|
java -jar $(AC) -cc65 $@ httpd bin < httpd.bin
|
|
|
|
java -jar $(AC) -cc65 $@ httpd.slotscan bin < httpd-slotscan.bin
|
|
|
|
java -jar $(AC) -cc65 $@ math bin < math.bin
|
|
|
|
java -jar $(AC) -cc65 $@ parser bin < parser.bin
|
|
|
|
java -jar $(AC) -cc65 $@ ping bin < ping.bin
|
|
|
|
java -jar $(AC) -cc65 $@ sntp bin < sntp.bin
|
2017-11-06 22:36:44 +00:00
|
|
|
java -jar $(AC) -cc65 $@ tcp bin < tcp.bin
|
2017-11-03 23:40:35 +00:00
|
|
|
java -jar $(AC) -cc65 $@ tftp bin < tftp.bin
|
2017-11-05 13:28:49 +00:00
|
|
|
java -jar $(AC) -cc65 $@ udp bin < udp.bin
|
2009-12-06 06:24:18 +00:00
|
|
|
|
2017-05-18 22:17:38 +00:00
|
|
|
ip65test.atr: com
|
2015-08-28 13:19:52 +00:00
|
|
|
mkdir atr
|
|
|
|
cp dos.sys atr/dos.sys
|
|
|
|
cp dup.sys atr/dup.sys
|
|
|
|
cp dns.com atr/dns.com
|
|
|
|
cp dottedquad.com atr/dotquad.com
|
|
|
|
cp geturl.com atr/geturl.com
|
|
|
|
cp httpd.com atr/httpd.com
|
2017-11-03 23:25:09 +00:00
|
|
|
cp math.com atr/math.com
|
2015-08-28 13:19:52 +00:00
|
|
|
cp parser.com atr/parser.com
|
|
|
|
cp ping.com atr/ping.com
|
|
|
|
cp sntp.com atr/sntp.com
|
2017-11-06 22:36:44 +00:00
|
|
|
cp tcp.com atr/tcp.com
|
2015-08-28 13:19:52 +00:00
|
|
|
cp tftp.com atr/tftp.com
|
2017-11-05 13:28:49 +00:00
|
|
|
cp udp.com atr/udp.com
|
2017-05-18 22:17:38 +00:00
|
|
|
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
|