statx: make include conditional, fixes non-csky arch buildroot builds
[uclibc-ng.git] / libutil / Makefile.in
blobdd4df05698ba95eb3f4ae518864d6adb4409baab
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 libutil_DIR := $(top_srcdir)libutil
13 libutil_OUT := $(top_builddir)libutil
15 libutil_SRC := $(wildcard $(libutil_DIR)/*.c)
16 ifneq ($(ARCH_USE_MMU),y)
17 libutil_SRC := $(filter-out $(libutil_DIR)/forkpty.c,$(libutil_SRC))
18 endif
19 ifneq ($(UCLIBC_HAS_PTY),y)
20 libutil_SRC := $(filter-out $(libutil_DIR)/openpty.c $(libutil_DIR)/forkpty.c \
21 ,$(libutil_SRC))
22 endif
23 ifeq ($(UCLIBC_HAS_UTMP)$(UCLIBC_HAS_UTMPX),)
24 libutil_SRC := $(filter-out \
25 $(libutil_DIR)/logwtmp.c \
26 $(libutil_DIR)/login.c \
27 $(libutil_DIR)/logout.c \
28 ,$(libutil_SRC))
29 endif
31 libutil_OBJ := $(patsubst $(libutil_DIR)/%.c,$(libutil_OUT)/%.o,$(libutil_SRC))
33 ifeq ($(DOPIC),y)
34 libutil-a-y := $(libutil_OBJ:.o=.os)
35 else
36 libutil-a-y := $(libutil_OBJ)
37 endif
38 libutil-so-y := $(libutil_OBJ:.o=.os)
40 objclean-y += CLEAN_libutil
42 $(libutil_OUT)/libutil.oS: $(libutil_SRC)
43 $(Q)$(RM) $@
44 $(compile-m)
46 CLEAN_libutil:
47 $(do_rm) $(addprefix $(libutil_OUT)/*., o os oS a)