2013-12-29 22:39:35 +00:00
|
|
|
# Build for Cirrus Logic CS8900A based devices:
|
|
|
|
# make
|
|
|
|
|
|
|
|
# Build for Standard Microsystems LAN91C96 based devices:
|
|
|
|
# make eth=sm
|
|
|
|
|
|
|
|
# Build for WIZnet W5100 based devices:
|
|
|
|
# make eth=wn
|
|
|
|
|
|
|
|
CC = cl65
|
|
|
|
AS = ca65
|
|
|
|
LD = ld65
|
|
|
|
CFLAGS = -Oirs -t $(TARGET)
|
|
|
|
AFLAGS =
|
|
|
|
|
|
|
|
ifeq ($(eth),sm)
|
|
|
|
A2DRIVERLIB = ../drivers/a2lancegs.lib
|
|
|
|
else ifeq ($(eth),wn)
|
|
|
|
else
|
|
|
|
C64DRIVERLIB = ../drivers/c64rrnet.lib
|
|
|
|
A2DRIVERLIB = ../drivers/a2uther.lib
|
|
|
|
VICDRIVERLIB = ../drivers/vic20rrnet.lib
|
|
|
|
endif
|
|
|
|
|
|
|
|
IP65LIB = ../ip65/ip65.lib
|
|
|
|
IP65TCPLIB = ../ip65/ip65_tcp.lib
|
|
|
|
|
|
|
|
INCFILES = \
|
2010-12-10 13:12:18 +00:00
|
|
|
../inc/common.i\
|
|
|
|
../inc/commonprint.i\
|
|
|
|
../inc/net.i\
|
|
|
|
|
2013-12-15 21:50:01 +00:00
|
|
|
all: prg bin
|
|
|
|
|
|
|
|
prg: \
|
2010-12-28 03:59:36 +00:00
|
|
|
ip65 \
|
|
|
|
drivers \
|
2013-12-15 21:50:01 +00:00
|
|
|
cifs_tcp.prg \
|
|
|
|
dns.prg \
|
|
|
|
dottedquad.prg \
|
|
|
|
geturl_tcp.prg \
|
|
|
|
parsequerystring.prg \
|
|
|
|
parser_tcp.prg \
|
|
|
|
ping_tcp.prg \
|
|
|
|
sntp.prg \
|
|
|
|
tcp_tcp.prg \
|
2013-12-29 22:39:35 +00:00
|
|
|
tftp.prg
|
2013-12-15 21:50:01 +00:00
|
|
|
|
|
|
|
bin: \
|
|
|
|
ip65 \
|
|
|
|
drivers \
|
2013-12-19 21:04:19 +00:00
|
|
|
cifs_tcp.bin \
|
2013-12-15 21:50:01 +00:00
|
|
|
dns.bin \
|
|
|
|
dottedquad.bin \
|
2013-12-19 21:04:19 +00:00
|
|
|
geturl_tcp.bin \
|
|
|
|
parsequerystring.bin \
|
|
|
|
parser_tcp.bin \
|
|
|
|
ping_tcp.bin \
|
|
|
|
sntp.bin \
|
2013-12-15 21:50:01 +00:00
|
|
|
tcp_tcp.bin \
|
2013-12-27 13:48:16 +00:00
|
|
|
tftp.bin
|
2009-08-21 13:21:14 +00:00
|
|
|
|
2013-12-29 22:39:35 +00:00
|
|
|
vicprg: \
|
|
|
|
ip65 \
|
|
|
|
drivers \
|
|
|
|
cifs_tcp.vicprg \
|
|
|
|
dns.vicprg \
|
|
|
|
dottedquad.vicprg \
|
|
|
|
geturl_tcp.vicprg \
|
|
|
|
parsequerystring.vicprg \
|
|
|
|
parser_tcp.vicprg \
|
|
|
|
ping_tcp.vicprg \
|
|
|
|
sntp.vicprg \
|
|
|
|
tcp_tcp.vicprg \
|
|
|
|
tftp.vicprg
|
|
|
|
|
2010-12-28 03:59:36 +00:00
|
|
|
ip65:
|
|
|
|
make -C ../ip65 all
|
|
|
|
|
|
|
|
drivers:
|
|
|
|
make -C ../drivers all
|
|
|
|
|
2013-12-15 21:50:01 +00:00
|
|
|
d64: ip65.d64
|
2010-12-10 13:12:18 +00:00
|
|
|
|
2013-12-15 21:50:01 +00:00
|
|
|
dsk: ip65.dsk
|
2010-12-10 13:12:18 +00:00
|
|
|
|
2013-12-15 21:50:01 +00:00
|
|
|
%.o: %.s
|
2010-12-10 13:12:18 +00:00
|
|
|
$(AS) $(AFLAGS) $<
|
|
|
|
|
2013-12-29 22:39:35 +00:00
|
|
|
%.prg: %.o $(IP65LIB) $(C64DRIVERLIB) $(INCFILES) ../cfg/c64prg.cfg
|
|
|
|
$(LD) -o $*.prg -C ../cfg/c64prg.cfg -m $*.c64.map -vm $< $(IP65LIB) $(C64DRIVERLIB) c64.lib
|
|
|
|
|
|
|
|
%_tcp.prg: %.o $(IP65TCPLIB) $(C64DRIVERLIB) $(INCFILES) ../cfg/c64prg.cfg
|
|
|
|
$(LD) -o $(subst _tcp,,$*).prg -C ../cfg/c64prg.cfg -m $(subst _tcp,,$*).c64.map -vm $< $(IP65TCPLIB) $(C64DRIVERLIB) c64.lib
|
|
|
|
|
|
|
|
%.bin: %.o $(IP65LIB) $(A2DRIVERLIB) $(INCFILES) ../cfg/a2bin.cfg
|
|
|
|
$(LD) -o $*.bin -C ../cfg/a2bin.cfg -m $*.a2.map -vm $< $(IP65LIB) $(A2DRIVERLIB) apple2.lib
|
2010-12-10 13:12:18 +00:00
|
|
|
|
2013-12-29 22:39:35 +00:00
|
|
|
%_tcp.bin: %.o $(IP65TCPLIB) $(A2DRIVERLIB) $(INCFILES) ../cfg/a2bin.cfg
|
|
|
|
$(LD) -o $(subst _tcp,,$*).bin -C ../cfg/a2bin.cfg -m $(subst _tcp,,$*).a2.map -vm $< $(IP65TCPLIB) $(A2DRIVERLIB) apple2.lib
|
2010-12-10 13:12:18 +00:00
|
|
|
|
2013-12-29 22:39:35 +00:00
|
|
|
%.vicprg: %.o $(IP65LIB) $(VICDRIVERLIB) $(INCFILES) ../cfg/vic20prg.cfg
|
|
|
|
$(LD) -o $*.vicprg -C ../cfg/vic20prg.cfg -m $*.vic.map -vm $< $(IP65LIB) $(VICDRIVERLIB) vic20.lib
|
2010-12-10 13:12:18 +00:00
|
|
|
|
2013-12-29 22:39:35 +00:00
|
|
|
%_tcp.vicprg: %.o $(IP65TCPLIB) $(VICDRIVERLIB) $(INCFILES) ../cfg/vic20prg.cfg
|
|
|
|
$(LD) -o $(subst _tcp,,$*).vicprg -C ../cfg/vic20prg.cfg -m $(subst _tcp,,$*).vic.map -vm $< $(IP65TCPLIB) $(VICDRIVERLIB) vic20.lib
|
2013-04-10 08:37:05 +00:00
|
|
|
|
2013-12-15 21:50:01 +00:00
|
|
|
ip65.d64: prg
|
|
|
|
$(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
|
|
|
|
$(C1541) -attach $@ -write parser.prg parser,p
|
|
|
|
$(C1541) -attach $@ -write ping.prg ping,p
|
|
|
|
$(C1541) -attach $@ -write sntp.prg sntp,p
|
|
|
|
$(C1541) -attach $@ -write tcp.prg tcp,p
|
|
|
|
$(C1541) -attach $@ -write tftp.prg tftp,p
|
2010-12-10 13:12:18 +00:00
|
|
|
|
2013-12-15 21:50:01 +00:00
|
|
|
ip65.dsk: bin
|
|
|
|
cp prodos.dsk $@
|
|
|
|
java -jar $(AC) -cc65 $@ dns bin 0 < dns.bin
|
|
|
|
java -jar $(AC) -cc65 $@ dottedquad bin 0 < dottedquad.bin
|
2013-12-19 21:04:19 +00:00
|
|
|
java -jar $(AC) -cc65 $@ geturl bin 0 < geturl.bin
|
|
|
|
java -jar $(AC) -cc65 $@ parser bin 0 < parser.bin
|
|
|
|
java -jar $(AC) -cc65 $@ ping bin 0 < ping.bin
|
|
|
|
java -jar $(AC) -cc65 $@ sntp bin 0 < sntp.bin
|
2013-12-15 21:50:01 +00:00
|
|
|
java -jar $(AC) -cc65 $@ tcp bin 0 < tcp.bin
|
|
|
|
java -jar $(AC) -cc65 $@ tftp bin 0 < tftp.bin
|
2009-12-06 06:24:18 +00:00
|
|
|
|
2009-01-22 01:27:03 +00:00
|
|
|
clean:
|
2013-12-29 22:39:35 +00:00
|
|
|
-rm -f *.o *.prg *.bin *.vicprg *.map
|
2013-12-27 13:48:16 +00:00
|
|
|
-rm -f ip65.d64 ip65.dsk
|
2010-12-10 13:12:18 +00:00
|
|
|
|
2009-01-22 01:27:03 +00:00
|
|
|
distclean: clean
|
2013-12-27 13:48:16 +00:00
|
|
|
-rm -f *~
|