# 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.
#

CSRC := hsearch.c

# multi source _tsearch.c
CSRC += tsearch.c tfind.c tdelete.c twalk.c tdestroy.c

# multi source _lsearch.c
CSRC += lfind.c lsearch.c

# multi source insremque.c
CSRC += insque.c remque.c

# multi source _hsearch_r.c
CSRC += hcreate_r.c hdestroy_r.c hsearch_r.c

MISC_SEARCH_DIR := $(top_srcdir)libc/misc/search
MISC_SEARCH_OUT := $(top_builddir)libc/misc/search

MISC_SEARCH_SRC := $(patsubst %.c,$(MISC_SEARCH_DIR)/%.c,$(CSRC))
MISC_SEARCH_OBJ := $(patsubst %.c,$(MISC_SEARCH_OUT)/%.o,$(CSRC))

libc-y += $(MISC_SEARCH_OBJ)

objclean-y += misc_search_objclean

misc_search_objclean:
	$(RM) $(MISC_SEARCH_OUT)/*.{o,os}
