#!/usr/local/bin/bash

# usage: wantlink source dest
wantlink()
{
    dir=$1
    ext=$2
    file=$3

    source="../../$dir/$ext/$file";
    dest="$file.$ext";
    if [ ! -L $dest ];
    then
	echo ln -s $source $dest
	ln -s $source $dest
    fi
}

if [ ! -L VersionNum ];
then
    echo ln -s ../../VersionNum VersionNum
    ln -s ../../VersionNum VersionNum
fi

if [ ! -L oslib ];
then
    echo ln -s . oslib
    ln -s . oslib
fi

wantlink sources y defmod

wantlink sources h asmhelp
wantlink sources h cheader
wantlink sources h chelp
wantlink sources h cstrong
wantlink sources h def
wantlink sources h defmod_tb
wantlink sources h hdr
wantlink sources h main
wantlink sources h objasm

wantlink sources c asmhelp
wantlink sources c cheader
wantlink sources c chelp
wantlink sources c cstrong
wantlink sources c def
wantlink sources c hdr
wantlink sources c objasm

wantlink support h hostfs
wantlink support h lookup
wantlink support h trace
wantlink support h realloc
wantlink support h m
wantlink support h riscos
wantlink support h x

wantlink support c lookup
wantlink support c realloc
wantlink support c riscos
wantlink support c unix
wantlink support c x

wantlink oslib h os
wantlink oslib h fileswitch
wantlink oslib h osfind
wantlink oslib h osfile
wantlink oslib h macros
wantlink oslib h types
wantlink oslib h territory
wantlink oslib h messagetrans
