; RConfig Test Script #2

if not exists rlib:
    echo "RConfig Library Source Not Found"
    quit
endif

; Generate Replacement Library
cc RLIB:rlib.c -oT:rlib.o -m0d -pl -sa -s0b -sf -sm -ss -sp -sn -r04 -r06 -sr
as RLIB:crt0.a68 -o T:crt0.o -e__RESSTART_MAIN
cc RLIB:_exit.c -oT:_exit.o -d__RESSTART_MAIN -m0d -pl -sa -s0b -sf -sm -ss -sp -sn -r04 -r06 -sr
lb rlib.lib T:crt0.o T:_exit.o T:rlib.o

; Make Test Program
cc test2.c
ln test2.o rlib.lib -lc

; Set-up Test Environment
copy test2 test.exe
resident test.exe pure
delete test.exe
run test.exe
test.exe
