fix non-thread compile for xtensa
[uclibc-ng.git] / libutil / Makefile.in
blobf904fc7e1c70e2bfbe8485a58a384eac5aae5fa4
1 # Makefile for uClibc
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.
8 subdirs += libutil
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))
25 endif
26 ifneq ($(UCLIBC_HAS_PTY),y)
27 libutil_SRC := $(filter-out $(libutil_DIR)/openpty.c $(libutil_DIR)/forkpty.c \
28 ,$(libutil_SRC))
29 endif
30 libutil_OBJ := $(patsubst $(libutil_DIR)/%.c,$(libutil_OUT)/%.o,$(libutil_SRC))
32 ifeq ($(DOPIC),y)
33 libutil-a-y := $(libutil_OBJ:.o=.os)
34 else
35 libutil-a-y := $(libutil_OBJ)
36 endif
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
43 ifeq ($(DOMULTI),n)
44 ifeq ($(DOPIC),y)
45 $(top_builddir)lib/libutil.so: $(top_builddir)lib/libutil.a $(libc.depend)
46 else
47 $(top_builddir)lib/libutil.so: $(libutil_OUT)/libutil_so.a $(libc.depend)
48 endif
49 $(call link.so,$(libutil_FULL_NAME),$(ABI_VERSION))
50 else
51 $(top_builddir)lib/libutil.so: $(libutil_OUT)/libutil.oS | $(libc.depend)
52 $(call linkm.so,$(libutil_FULL_NAME),$(ABI_VERSION))
53 endif
55 $(libutil_OUT)/libutil_so.a: $(libutil-so-y)
56 $(Q)$(RM) $@
57 $(do_ar)
59 $(libutil_OUT)/libutil.oS: $(libutil_SRC)
60 $(Q)$(RM) $@
61 $(compile-m)
63 $(top_builddir)lib/libutil.a: $(libutil-a-y)
64 $(Q)$(INSTALL) -d $(dir $@)
65 $(Q)$(RM) $@
66 $(do_ar)
68 CLEAN_libutil:
69 $(do_rm) $(addprefix $(libutil_OUT)/*., o os oS a)