# Makefile for uClibc
#
# Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
#
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
#

EXTRA_CFLAGS := -fno-strict-aliasing

ifneq ($(UCLIBC_HAS_FULL_RPC),y)
# For now, only compile the stuff needed to do an NFS mount...
klib-y += authunix_prot.c auth_none.c auth_unix.c bindresvport.c \
        clnt_perror.c clnt_simple.c clnt_tcp.c clnt_udp.c \
        create_xid.c getrpcent.c \
        pmap_clnt.c pm_getmaps.c pm_getport.c pmap_prot.c pmap_prot2.c \
        rcmd.c rexec.c rpc_cmsg.c rpc_commondata.c rpc_dtablesize.c \
        rpc_prot.c rpc_thread.c rtime.c ruserpass.c sa_len.c \
        svc.c svc_auth.c svc_authux.c \
        xdr.c xdr_array.c xdr_mem.c xdr_rec.c xdr_reference.c
else
klib-y += $(notdir $(wildcard $(obj)/*.c))
endif

# Using klib-y += rpc_thread.c will not make rpc_thread.oS
klib-y := $(filter-out rpc_thread.c,$(klib-y))
# libc.a gets "normal" object:
klib-nonshared-y += rpc_thread.o
# libc_so.a gets object built with -DSHARED:
# rpc_thread.oS is better, because the header adds unneeded references to __pthread_internal_tsd*
klib-shared-y += rpc_thread.oS
