if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_OS})
  add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_OS})
endif()

add_entrypoint_object(
  socket
  ALIAS
  DEPENDS
    .${LIBC_TARGET_OS}.socket
)

add_entrypoint_object(
  accept
  ALIAS
  DEPENDS
    .${LIBC_TARGET_OS}.accept
)

add_entrypoint_object(
  accept4
  ALIAS
  DEPENDS
    .${LIBC_TARGET_OS}.accept4
)

add_entrypoint_object(
  bind
  ALIAS
  DEPENDS
    .${LIBC_TARGET_OS}.bind
)

add_entrypoint_object(
  connect
  ALIAS
  DEPENDS
    .${LIBC_TARGET_OS}.connect
)

add_entrypoint_object(
  getpeername
  ALIAS
  DEPENDS
    .${LIBC_TARGET_OS}.getpeername
)

add_entrypoint_object(
  getsockname
  ALIAS
  DEPENDS
    .${LIBC_TARGET_OS}.getsockname
)

add_entrypoint_object(
  getsockopt
  ALIAS
  DEPENDS
    .${LIBC_TARGET_OS}.getsockopt
)

add_entrypoint_object(
  listen
  ALIAS
  DEPENDS
    .${LIBC_TARGET_OS}.listen
)

add_entrypoint_object(
  socketpair
  ALIAS
  DEPENDS
    .${LIBC_TARGET_OS}.socketpair
)

add_entrypoint_object(
  send
  ALIAS
  DEPENDS
    .${LIBC_TARGET_OS}.send
)

add_entrypoint_object(
  sendto
  ALIAS
  DEPENDS
    .${LIBC_TARGET_OS}.sendto
)

add_entrypoint_object(
  setsockopt
  ALIAS
  DEPENDS
    .${LIBC_TARGET_OS}.setsockopt
)

add_entrypoint_object(
  sendmmsg
  ALIAS
  DEPENDS
    .${LIBC_TARGET_OS}.sendmmsg
)

add_entrypoint_object(
  sendmsg
  ALIAS
  DEPENDS
    .${LIBC_TARGET_OS}.sendmsg
)

add_entrypoint_object(
  recv
  ALIAS
  DEPENDS
    .${LIBC_TARGET_OS}.recv
)

add_entrypoint_object(
  recvfrom
  ALIAS
  DEPENDS
    .${LIBC_TARGET_OS}.recvfrom
)

add_entrypoint_object(
  recvmsg
  ALIAS
  DEPENDS
    .${LIBC_TARGET_OS}.recvmsg
)

add_entrypoint_object(
  recvmmsg
  ALIAS
  DEPENDS
    .${LIBC_TARGET_OS}.recvmmsg
)


add_entrypoint_object(
  shutdown
  ALIAS
  DEPENDS
    .${LIBC_TARGET_OS}.shutdown
)

add_entrypoint_object(
  sockatmark
  ALIAS
  DEPENDS
    .${LIBC_TARGET_OS}.sockatmark
)
