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-libutil
:= -DNOT_IN_libc
-DIS_IN_libutil
$(SSP_ALL_CFLAGS
)
12 LDFLAGS-
$(UCLIBC_FORMAT_DSBT_ELF
)-libutil.so
:= -Wl
,--dsbt-index
=8
13 LDFLAGS-libutil.so
:= $(LDFLAGS
)
15 LIBS-libutil.so
:= $(LIBS
)
17 libutil_FULL_NAME
:= libutil-
$(VERSION
).so
19 libutil_DIR
:= $(top_srcdir
)libutil
20 libutil_OUT
:= $(top_builddir
)libutil
22 libutil_SRC
:= $(wildcard $(libutil_DIR
)/*.c
)
23 ifneq ($(ARCH_USE_MMU
),y
)
24 libutil_SRC
:= $(filter-out $(libutil_DIR
)/forkpty.c
,$(libutil_SRC
))
26 ifneq ($(UCLIBC_HAS_PTY
),y
)
27 libutil_SRC
:= $(filter-out $(libutil_DIR
)/openpty.c
$(libutil_DIR
)/forkpty.c \
30 libutil_OBJ
:= $(patsubst $(libutil_DIR
)/%.c
,$(libutil_OUT
)/%.o
,$(libutil_SRC
))
33 libutil-a-y
:= $(libutil_OBJ
:.o
=.os
)
35 libutil-a-y
:= $(libutil_OBJ
)
37 libutil-so-y
:= $(libutil_OBJ
:.o
=.os
)
39 lib-a-
$(UCLIBC_HAS_LIBUTIL
) += $(top_builddir
)lib
/libutil.a
40 lib-so-
$(UCLIBC_HAS_LIBUTIL
) += $(top_builddir
)lib
/libutil.so
41 objclean-y
+= CLEAN_libutil
45 $(top_builddir
)lib
/libutil.so
: $(top_builddir
)lib
/libutil.a
$(libc.depend
)
47 $(top_builddir
)lib
/libutil.so
: $(libutil_OUT
)/libutil_so.a
$(libc.depend
)
49 $(call link.so
,$(libutil_FULL_NAME
),$(ABI_VERSION
))
51 $(top_builddir
)lib
/libutil.so
: $(libutil_OUT
)/libutil.oS |
$(libc.depend
)
52 $(call linkm.so
,$(libutil_FULL_NAME
),$(ABI_VERSION
))
55 $(libutil_OUT
)/libutil_so.a
: $(libutil-so-y
)
59 $(libutil_OUT
)/libutil.oS
: $(libutil_SRC
)
63 $(top_builddir
)lib
/libutil.a
: $(libutil-a-y
)
64 $(Q
)$(INSTALL
) -d
$(dir $@
)
69 $(do_rm
) $(addprefix $(libutil_OUT
)/*.
, o os oS a
)