3 # Copyright (C) 2000-2008 Erik Andersen <andersen@uclibc.org>
5 # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
10 CFLAGS-libresolv
:= -DNOT_IN_libc
-DIS_IN_libresolv
$(SSP_ALL_CFLAGS
)
12 LDFLAGS-
$(UCLIBC_FORMAT_DSBT_ELF
)-libresolv.so
:= -Wl
,--dsbt-index
=7
13 LDFLAGS-libresolv.so
:= $(LDFLAGS
) $(call link.asneeded
,-lc
)
15 LIBS-libresolv.so
:= $(LIBS
)
17 libresolv_FULL_NAME
:= libresolv-
$(VERSION
).so
19 libresolv_DIR
:= $(top_srcdir
)libresolv
20 libresolv_OUT
:= $(top_builddir
)libresolv
22 libresolv_SRC
:= $(libresolv_DIR
)/resolv.c
23 libresolv_OBJ
:= $(patsubst $(libresolv_DIR
)/%.c
,$(libresolv_OUT
)/%.o
,$(libresolv_SRC
))
26 libresolv-a-y
:= $(libresolv_OBJ
:.o
=.os
)
28 libresolv-a-y
:= $(libresolv_OBJ
)
30 libresolv-so-y
:= $(libresolv_OBJ
:.o
=.os
)
32 lib-a-
$(UCLIBC_HAS_LIBRESOLV_STUB
) += $(top_builddir
)lib
/libresolv.a
33 lib-so-
$(UCLIBC_HAS_LIBRESOLV_STUB
) += $(top_builddir
)lib
/libresolv.so
34 objclean-y
+= CLEAN_libresolv
37 $(top_builddir
)lib
/libresolv.so
: $(top_builddir
)lib
/libresolv.a
$(libc.depend
)
39 $(top_builddir
)lib
/libresolv.so
: $(libresolv_OUT
)/libresolv_so.a
$(libc.depend
)
41 $(call link.so
,$(libresolv_FULL_NAME
),$(ABI_VERSION
))
43 $(libresolv_OUT
)/libresolv_so.a
: $(libresolv-so-y
)
47 $(top_builddir
)lib
/libresolv.a
: $(libresolv-a-y
)
48 $(Q
)$(INSTALL
) -d
$(dir $@
)
53 $(do_rm
) $(addprefix $(libresolv_OUT
)/*.
, o os a
)