2017-05-18 22:12:42 +00:00
|
|
|
# Build for Cirrus Logic CS8900A based devices:
|
|
|
|
# make eth=cl
|
|
|
|
|
|
|
|
# Build for Standard Microsystems LAN91C96 based devices:
|
|
|
|
# make eth=sm
|
|
|
|
|
|
|
|
# Build for WIZnet W5100 based devices:
|
|
|
|
# make eth=wn
|
|
|
|
|
|
|
|
ifeq ($(eth),cl)
|
|
|
|
C64DRIVERLIB = ../drivers/c64rrnet.lib
|
|
|
|
A2DRIVERLIB = ../drivers/a2uther.lib
|
2019-04-29 14:41:27 +00:00
|
|
|
ATRDRIVERLIB = ../drivers/atrdragon.lib
|
2017-05-18 22:12:42 +00:00
|
|
|
else ifeq ($(eth),sm)
|
|
|
|
C64DRIVERLIB = ../drivers/c64eth64.lib
|
|
|
|
A2DRIVERLIB = ../drivers/a2lancegs.lib
|
|
|
|
else ifeq ($(eth),wn)
|
|
|
|
A2DRIVERLIB = ../drivers/a2uther2.lib
|
2019-05-08 15:23:00 +00:00
|
|
|
ATRDRIVERLIB = ../drivers/atrdracarys.lib
|
2017-05-18 22:12:42 +00:00
|
|
|
else
|
|
|
|
C64DRIVERLIB = ../drivers/c64combo.lib
|
|
|
|
A2DRIVERLIB = ../drivers/a2combo.lib
|
2019-05-08 15:23:00 +00:00
|
|
|
ATRDRIVERLIB = ../drivers/atrcombo.lib
|
2017-05-18 22:12:42 +00:00
|
|
|
endif
|
|
|
|
|
2018-08-01 17:17:53 +00:00
|
|
|
C64_DRIVERLIB = ../drivers/ip65_c64.lib
|
|
|
|
A2_DRIVERLIB = ../drivers/ip65_apple2.lib
|
|
|
|
ATR_DRIVERLIB = ../drivers/ip65_atari.lib
|
|
|
|
|
2019-07-15 10:28:27 +00:00
|
|
|
# See http://vice-emu.sourceforge.net/
|
|
|
|
C1541 ?= c1541
|
|
|
|
|
|
|
|
# See https://applecommander.github.io/
|
|
|
|
AC ?= ac.jar
|
|
|
|
|
|
|
|
# See https://www.horus.com/~hias/atari/
|
|
|
|
DIR2ATR ?= dir2atr
|
|
|
|
|
2017-05-18 22:12:42 +00:00
|
|
|
UDP =\
|
2018-02-23 15:52:45 +00:00
|
|
|
date65
|
2017-05-18 22:12:42 +00:00
|
|
|
|
|
|
|
TCP =\
|
2018-02-19 23:18:48 +00:00
|
|
|
hfs65 \
|
2018-11-01 13:21:20 +00:00
|
|
|
telnet65 \
|
2020-06-22 02:21:26 +00:00
|
|
|
tweet65 \
|
2020-06-23 02:40:32 +00:00
|
|
|
pop65-slow
|
2017-05-18 22:12:42 +00:00
|
|
|
|
2020-07-28 21:14:43 +00:00
|
|
|
bin: wget65.bin pop65.bin smtp65.bin email.bin rebuild.bin edit.bin attacher.bin
|
2018-08-01 17:39:06 +00:00
|
|
|
|
2020-04-16 16:13:04 +00:00
|
|
|
wget65.bin: w5100.c w5100_http.c linenoise.c
|
2018-08-01 17:39:06 +00:00
|
|
|
wget65.bin: IP65LIB = ../ip65/ip65.lib
|
|
|
|
wget65.bin: A2_DRIVERLIB = ../drivers/ip65_apple2_uther2.lib
|
|
|
|
|
2020-06-23 02:40:32 +00:00
|
|
|
pop65.bin: w5100.c
|
|
|
|
pop65.bin: IP65LIB = ../ip65/ip65.lib
|
|
|
|
pop65.bin: A2_DRIVERLIB = ../drivers/ip65_apple2_uther2.lib
|
|
|
|
|
2020-06-28 17:14:29 +00:00
|
|
|
smtp65.bin: w5100.c
|
|
|
|
smtp65.bin: IP65LIB = ../ip65/ip65.lib
|
|
|
|
smtp65.bin: A2_DRIVERLIB = ../drivers/ip65_apple2_uther2.lib
|
|
|
|
|
2018-11-01 13:21:20 +00:00
|
|
|
date65.bin hfs65.bin tweet65.bin: CL65FLAGS = --start-addr 0x0C00 apple2enh-iobuf-0800.o
|
2018-08-01 17:24:12 +00:00
|
|
|
|
|
|
|
telnet65.com: ATARI_CFG = atrtelnet.cfg
|
|
|
|
|
2018-11-01 13:21:20 +00:00
|
|
|
tweet65.prg tweet65.bin tweet65.com: ifttt.c
|
|
|
|
|
2017-05-18 22:12:42 +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
|
|
|
|
|
|
|
|
$(addsuffix .com,$(UDP)): IP65LIB = ../ip65/ip65.lib
|
|
|
|
$(addsuffix .com,$(TCP)): IP65LIB = ../ip65/ip65_tcp.lib
|
|
|
|
|
2017-11-09 21:10:11 +00:00
|
|
|
$(foreach pgm,$(UDP) $(TCP),$(eval $(pgm): $(pgm).prg $(pgm).bin $(pgm).com))
|
2017-05-18 22:12:42 +00:00
|
|
|
|
|
|
|
prg: $(addsuffix .prg,$(UDP) $(TCP))
|
|
|
|
|
|
|
|
bin: $(addsuffix .bin,$(UDP) $(TCP))
|
|
|
|
|
|
|
|
com: $(addsuffix .com,$(UDP) $(TCP))
|
|
|
|
|
|
|
|
d64: ip65.d64
|
|
|
|
|
|
|
|
dsk: ip65.dsk
|
|
|
|
|
|
|
|
atr: ip65.atr
|
|
|
|
|
|
|
|
ip65:
|
|
|
|
make -C ../ip65
|
|
|
|
|
|
|
|
drivers:
|
|
|
|
make -C ../drivers
|
|
|
|
|
2018-08-01 17:14:52 +00:00
|
|
|
BUILDS = ip65 drivers
|
|
|
|
|
2018-07-22 14:08:21 +00:00
|
|
|
CC65 := $(shell cl65 --print-target-path)
|
|
|
|
|
2017-10-02 06:05:39 +00:00
|
|
|
ATARI_CFG = atari.cfg
|
|
|
|
|
2018-08-01 17:11:47 +00:00
|
|
|
%.s.o: %.s
|
|
|
|
ca65 -o $@ $<
|
2017-05-18 22:12:42 +00:00
|
|
|
|
2017-11-09 21:13:42 +00:00
|
|
|
%.o: %.c
|
|
|
|
|
2018-08-01 17:14:52 +00:00
|
|
|
%.prg: %.s.o $(BUILDS)
|
2017-05-18 22:12:42 +00:00
|
|
|
ld65 -o $*.prg -C c64.cfg -m $*.c64.map -vm $< $(IP65LIB) $(C64DRIVERLIB) c64.lib
|
|
|
|
|
2018-08-01 17:14:52 +00:00
|
|
|
%.bin: %.s.o $(BUILDS)
|
2017-05-18 22:12:42 +00:00
|
|
|
ld65 -o $*.bin -C apple2.cfg -m $*.a2.map -vm $< $(IP65LIB) $(A2DRIVERLIB) apple2.lib
|
|
|
|
|
2018-08-01 17:14:52 +00:00
|
|
|
%.com: %.s.o $(BUILDS)
|
2017-10-02 06:05:39 +00:00
|
|
|
ld65 -o $*.com -C $(ATARI_CFG) -m $*.atr.map -vm $< $(IP65LIB) $(ATRDRIVERLIB) atari.lib
|
2017-05-18 22:12:42 +00:00
|
|
|
|
2018-08-01 17:14:52 +00:00
|
|
|
%.prg: %.c $(BUILDS)
|
2018-08-01 17:27:08 +00:00
|
|
|
cl65 -o $*.prg -Or -t c64 $(CL65FLAGS) -m $*.c64.map -vm $(filter-out $(BUILDS),$^) $(IP65LIB) $(C64_DRIVERLIB)
|
2017-11-09 21:13:42 +00:00
|
|
|
|
2018-08-01 17:14:52 +00:00
|
|
|
%.bin: %.c $(BUILDS)
|
2018-08-01 17:27:08 +00:00
|
|
|
cl65 -o $*.bin -Or -t apple2enh $(CL65FLAGS) -m $*.a2.map -vm $(filter-out $(BUILDS),$^) $(IP65LIB) $(A2_DRIVERLIB)
|
2017-11-09 21:13:42 +00:00
|
|
|
|
2018-08-01 17:14:52 +00:00
|
|
|
%.com: %.c $(BUILDS)
|
2018-08-01 17:27:08 +00:00
|
|
|
cl65 -o $*.com -Or -t atari $(CL65FLAGS) -m $*.atr.map -vm $(filter-out $(BUILDS),$^) $(IP65LIB) $(ATR_DRIVERLIB)
|
2017-11-09 21:13:42 +00:00
|
|
|
|
2017-05-18 22:12:42 +00:00
|
|
|
ip65.d64: prg
|
|
|
|
$(C1541) -format ip65,00 d64 $@
|
2018-02-23 15:52:45 +00:00
|
|
|
$(C1541) -attach $@ -write date65.prg date65,p
|
2018-02-19 23:18:48 +00:00
|
|
|
$(C1541) -attach $@ -write hfs65.prg hfs65,p
|
2017-05-18 22:12:42 +00:00
|
|
|
$(C1541) -attach $@ -write telnet65.prg telnet65,p
|
2018-11-01 13:21:20 +00:00
|
|
|
$(C1541) -attach $@ -write tweet65.prg tweet65,p
|
2017-05-18 22:12:42 +00:00
|
|
|
|
|
|
|
ip65.dsk: bin
|
2020-07-15 21:20:13 +00:00
|
|
|
cp ../build/800k.po $@
|
2020-07-28 21:14:43 +00:00
|
|
|
java -jar $(AC) -as $@ attacher < attacher.bin
|
|
|
|
java -jar $(AC) -p $@ attacher.system sys < $(CC65)/apple2enh/util/loader.system
|
|
|
|
java -jar $(AC) -as $@ date65 < date65.bin
|
|
|
|
java -jar $(AC) -p $@ date65.system sys < $(CC65)/apple2enh/util/loader.system
|
|
|
|
java -jar $(AC) -as $@ edit < edit.bin
|
|
|
|
java -jar $(AC) -p $@ edit.system sys < $(CC65)/apple2enh/util/loader.system
|
|
|
|
java -jar $(AC) -as $@ email < email.bin
|
|
|
|
java -jar $(AC) -p $@ email.cfg txt < email.cfg
|
|
|
|
java -jar $(AC) -p $@ email.system sys < $(CC65)/apple2enh/util/loader.system
|
|
|
|
java -jar $(AC) -as $@ hfs65 < hfs65.bin
|
|
|
|
java -jar $(AC) -p $@ hfs65.system sys < $(CC65)/apple2enh/util/loader.system
|
|
|
|
java -jar $(AC) -as $@ pop65 < pop65.bin
|
|
|
|
java -jar $(AC) -p $@ pop65.system sys < $(CC65)/apple2enh/util/loader.system
|
|
|
|
java -jar $(AC) -as $@ rebuild < rebuild.bin
|
|
|
|
java -jar $(AC) -p $@ rebuild.system sys < $(CC65)/apple2enh/util/loader.system
|
|
|
|
java -jar $(AC) -as $@ smtp65 < smtp65.bin
|
|
|
|
java -jar $(AC) -p $@ smtp65.system sys < $(CC65)/apple2enh/util/loader.system
|
|
|
|
java -jar $(AC) -as $@ telnet65 < telnet65.bin
|
|
|
|
java -jar $(AC) -as $@ tweet65 < tweet65.bin
|
|
|
|
java -jar $(AC) -p $@ tweet65.system sys < $(CC65)/apple2enh/util/loader.system
|
|
|
|
java -jar $(AC) -p $@ tzone.txt txt < tzone.txt
|
|
|
|
java -jar $(AC) -as $@ wget65 < wget65.bin
|
|
|
|
java -jar $(AC) -p $@ wget65.system sys < $(CC65)/apple2enh/util/loader.system
|
2017-05-18 22:12:42 +00:00
|
|
|
|
|
|
|
ip65.atr: com
|
|
|
|
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 date65.com atr/date65.com
|
|
|
|
cp telnet65.com atr/telnet65.com
|
2018-11-01 13:21:20 +00:00
|
|
|
cp tweet65.com atr/tweet65.com
|
2017-05-18 22:12:42 +00:00
|
|
|
$(DIR2ATR) -b Dos25 1040 $@ atr
|
|
|
|
rm -r atr
|
|
|
|
|
|
|
|
clean:
|
|
|
|
make -C ../ip65 clean
|
|
|
|
make -C ../drivers clean
|
2017-11-09 21:10:11 +00:00
|
|
|
-rm -f *.o *.prg *.bin *.com *.map
|
2017-05-18 22:12:42 +00:00
|
|
|
-rm -f ip65.d64 ip65.dsk ip65.atr
|