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-libnsl
:= -DNOT_IN_libc
-DIS_IN_libnsl
$(SSP_ALL_CFLAGS
)
12 LDFLAGS-
$(UCLIBC_FORMAT_DSBT_ELF
)-libnsl.so
:= -Wl
,--dsbt-index
=6
13 LDFLAGS-libnsl.so
:= $(LDFLAGS
) $(call link.asneeded
,-lc
)
15 LIBS-libnsl.so
:= $(LIBS
)
17 libnsl_FULL_NAME
:= libnsl-
$(VERSION
).so
19 libnsl_DIR
:= $(top_srcdir
)libnsl
20 libnsl_OUT
:= $(top_builddir
)libnsl
22 libnsl_SRC
:= $(libnsl_DIR
)/nsl.c
23 libnsl_OBJ
:= $(patsubst $(libnsl_DIR
)/%.c
,$(libnsl_OUT
)/%.o
,$(libnsl_SRC
))
26 libnsl-a-y
:= $(libnsl_OBJ
:.o
=.os
)
28 libnsl-a-y
:= $(libnsl_OBJ
)
30 libnsl-so-y
:= $(libnsl_OBJ
:.o
=.os
)
32 lib-a-
$(UCLIBC_HAS_LIBNSL_STUB
) += $(top_builddir
)lib
/libnsl.a
33 lib-so-
$(UCLIBC_HAS_LIBNSL_STUB
) += $(top_builddir
)lib
/libnsl.so
34 objclean-y
+= CLEAN_libnsl
37 $(top_builddir
)lib
/libnsl.so
: $(top_builddir
)lib
/libnsl.a
$(libc.depend
)
39 $(top_builddir
)lib
/libnsl.so
: $(libnsl_OUT
)/libnsl_so.a
$(libc.depend
)
41 $(call link.so
,$(libnsl_FULL_NAME
),$(ABI_VERSION
))
43 $(libnsl_OUT
)/libnsl_so.a
: $(libnsl-so-y
)
47 $(top_builddir
)lib
/libnsl.a
: $(libnsl-a-y
)
48 $(Q
)$(INSTALL
) -d
$(dir $@
)
53 $(do_rm
) $(addprefix $(libnsl_OUT
)/*.
, o os a
)