% Eventually everything in this file will apply to all platforms,
% but we will get to that point very gradually.

c_source ("UtimeC")
c_source ("UnixC")
c_source ("UnixLink")
Interface("Uexec")
c_source("Uexec")
Interface ("Unetdb")
c_source ("Unetdb")
c_source ("Umman")
Interface ("Ugrp")
c_source ("Ugrp")
c_source ("Uin")

c_source("Uugid")
c_source("Uuio")
c_source("Uutmp")
c_source("Usignal")
c_source("Upwd")
c_source("Uprocess")
c_source("Upthread")

if not (equal (TARGET, "SOLgnu") or equal (TARGET, "SOLsun")
        or equal (TARGET, "LINUXLIBC6") or equal (TARGET, "NetBSD2_i386")
        or equal (TARGET, "FreeBSD4"))
    % Eventually this should be all platforms.
    Interface("Usignal")
end

%
% This is meant to be all systems with user-thread support,
% when it is implemented using get/set/make/swapcontext instead of setjmp/longjmp.
%

if         equal (TARGET, "I386_OPENBSD")
        or equal (TARGET, "LINUXLIBC6")
    c_source("Uucontext")
end

h_source("Uucontext")
h_source("UerrorX")

include_dir("context")
c_source("Uconstants")
Interface("Uutmp")

Interface ("Umman")
c_source("UstatC")
Interface ("Uuio")
Interface ("Upwd")
Interface ("Uugid")
Interface ("Uprocess")

Module("Unix")
Interface("Utime")
Interface("Utypes")

Interface("Uerror")
c_source("Uconstants")
h_source("UerrorX")

Interface("Upthread")
Interface("Usched")

Interface("Usocket")
c_source("Usocket")

Interface ("Ustat")
Interface ("Udir")
c_source("UdirC")

%
% This is systems that don't provide user-thread support.
%

if equal (TARGET, "MIPS64_OPENBSD") or equal (TARGET, "I386_OPENBSD")
        or equal (TARGET, "PPC32_OPENBSD") or equal (TARGET, "SPARC64_OPENBSD")
        or equal (TARGET, "AMD64_LINUX") or equal (TARGET, "PPC_LINUX")
        or equal (TARGET, "SPARC32_LINUX") or equal (TARGET, "SPARC64_LINUX")
        or equal (TARGET, "PA32_HPUX") or equal (TARGET, "PA64_HPUX")
        or equal (TARGET, "NT386") or equal (TARGET, "AMD64_FREEBSD")
        or equal (TARGET, "AMD64_OPENBSD") or equal (TARGET, "AMD64_NETBSD")
        or equal (TARGET, "I386_INTERIX")

    Interface("Uucontext")

end

if equal (TARGET, "NT386")
    Interface ("Utermio")
end
