Add a C interface for atarixl target.

Just some Makefile tweaks were needed...
This commit is contained in:
Oliver Schmidt 2017-11-27 23:22:47 +01:00
parent 85b311ab27
commit cbb93d96fa
2 changed files with 30 additions and 4 deletions

View File

@ -13,9 +13,10 @@
# For C programs
# --------------
# ip65_c64.lib : C64 with RR-Net or ETH64 or WIZ811MJ (default base addr: $de0x)
# ip65_apple2.lib : Apple ][ with Uthernet or LANceGS or Uthernet II (default slot: #3)
# ip65_atari.lib : ATARI 8-bit with Dragon Cart (default base addr: $d500)
# ip65_c64.lib : C64 with RR-Net or ETH64 or WIZ811MJ (default base addr: $de0x)
# ip65_apple2.lib : Apple ][ with Uthernet or LANceGS or Uthernet II (default slot: #3)
# ip65_atari.lib : ATARI 8-bit with Dragon Cart (default base addr: $d500)
# ip65_atarixl.lib : ATARI XL with Dragon Cart (default base addr: $d500)
DRIVERS=\
c64rrnet.lib \
@ -30,6 +31,7 @@ DRIVERS=\
ip65_apple2.lib \
atrdragon.lib \
ip65_atari.lib \
ip65_atarixl.lib \
vic20rrnet.lib
all: $(DRIVERS)
@ -40,6 +42,9 @@ $(DRIVERS):
%.o: %.s
ca65 -D DYN_DRV=0 $<
%.xl.o: %.s
ca65 -o $*.xl.o -t atarixl $<
C64OBJS=\
c64print.o \
c64timer.o \
@ -80,6 +85,10 @@ ATR_OBJS=\
atr_timer.o \
atr_input.o
ATRXL_OBJS=\
atr_timer.xl.o \
atr_input.xl.o
VIC20OBJS=\
vic20print.o \
vic20timer.o \
@ -134,6 +143,8 @@ atrdragon.lib: atrinit.o dragoncart.o $(CS8900AOBJS) $(ATROBJS)
ip65_atari.lib: atrinit.o dragoncart.o $(CS8900AOBJS) $(ATR_OBJS)
ip65_atarixl.lib: atrinit.o dragoncart.o $(CS8900AOBJS) $(ATRXL_OBJS)
vic20rrnet.lib: vic20init.o vic20-rr-net.o $(CS8900AOBJS) $(VIC20OBJS)
clean:

View File

@ -40,6 +40,8 @@ TCP =\
ping \
tcp
C_PGM := $(foreach pgm,$(UDP) $(TCP),$(basename $(wildcard $(pgm).c)))
all: $(UDP) $(TCP)
.PHONY: $(UDP) $(TCP)
@ -52,11 +54,16 @@ $(addsuffix .bin,$(TCP)): IP65LIB = ../ip65/ip65_tcp.lib
$(addsuffix .com,$(UDP)): IP65LIB = ../ip65/ip65.lib
$(addsuffix .com,$(TCP)): IP65LIB = ../ip65/ip65_tcp.lib
$(addsuffix .xl.com,$(UDP)): IP65LIB = ../ip65/ip65.lib
$(addsuffix .xl.com,$(TCP)): IP65LIB = ../ip65/ip65_tcp.lib
$(addsuffix .vicprg,$(UDP)): IP65LIB = ../ip65/ip65.lib
$(addsuffix .vicprg,$(TCP)): IP65LIB = ../ip65/ip65_tcp.lib
$(foreach pgm,$(UDP) $(TCP),$(eval $(pgm): $(pgm).prg $(pgm).bin $(pgm).com))
$(foreach pgm,$(C_PGM),$(eval $(pgm): $(pgm).xl.com))
httpd-slotscan.bin: IP65LIB = ../ip65/ip65_tcp.lib
INCFILES =\
@ -70,6 +77,8 @@ bin: $(addsuffix .bin,$(UDP) $(TCP)) httpd-slotscan.bin
com: $(addsuffix .com,$(UDP) $(TCP))
xl.com: $(addsuffix .xl.com,$(C_PGM))
vicprg: $(addsuffix .vicprg,$(UDP) $(TCP))
d64: ip65test.d64
@ -119,6 +128,10 @@ vt100.com: ATARI_CFG = ../apps/atrtelnet.cfg
cl65 -o $*.com -O -t atari -m $*.atr.map -vm $< $(IP65LIB) ../drivers/ip65_atari.lib
rm $*.o
%.xl.com: %.c ip65 drivers $(INCFILES)
cl65 -o $*.xl.com -O -t atarixl -m $*.atrxl.map -vm $< $(IP65LIB) ../drivers/ip65_atarixl.lib
rm $*.o
ip65test.d64: prg
$(C1541) -format ip65,00 d64 $@
$(C1541) -attach $@ -write dns.prg dns,p
@ -149,7 +162,7 @@ ip65test.dsk: bin
java -jar $(AC) -cc65 $@ tftp bin < tftp.bin
java -jar $(AC) -cc65 $@ udp bin < udp.bin
ip65test.atr: com
ip65test.atr: com xl.com
mkdir atr
cp dos.sys atr/dos.sys
cp dup.sys atr/dup.sys
@ -162,8 +175,10 @@ ip65test.atr: com
cp ping.com atr/ping.com
cp sntp.com atr/sntp.com
cp tcp.com atr/tcp.com
cp tcp.xl.com atr/tcp.xl.com
cp tftp.com atr/tftp.com
cp udp.com atr/udp.com
cp udp.xl.com atr/udp.xl.com
cp vt100.com atr/vt100.com
$(DIR2ATR) -b Dos25 1040 $@ atr
rm -r atr