Makefile.in 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # Makefile for uClibc
  2. #
  3. # Copyright (C) 2000-2008 Erik Andersen <andersen@uclibc.org>
  4. #
  5. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  6. #
  7. subdirs += libutil
  8. CFLAGS-libutil := -DNOT_IN_libc -DIS_IN_libutil $(SSP_ALL_CFLAGS)
  9. libutil_DIR := $(top_srcdir)libutil
  10. libutil_OUT := $(top_builddir)libutil
  11. libutil_SRC := $(wildcard $(libutil_DIR)/*.c)
  12. ifneq ($(ARCH_USE_MMU),y)
  13. libutil_SRC := $(filter-out $(libutil_DIR)/forkpty.c,$(libutil_SRC))
  14. endif
  15. ifneq ($(UCLIBC_HAS_PTY),y)
  16. libutil_SRC := $(filter-out $(libutil_DIR)/openpty.c $(libutil_DIR)/forkpty.c \
  17. ,$(libutil_SRC))
  18. endif
  19. ifeq ($(UCLIBC_HAS_UTMP)$(UCLIBC_HAS_UTMPX),)
  20. libutil_SRC := $(filter-out \
  21. $(libutil_DIR)/logwtmp.c \
  22. $(libutil_DIR)/login.c \
  23. $(libutil_DIR)/logout.c \
  24. ,$(libutil_SRC))
  25. endif
  26. libutil_OBJ := $(patsubst $(libutil_DIR)/%.c,$(libutil_OUT)/%.o,$(libutil_SRC))
  27. ifeq ($(DOPIC),y)
  28. libutil-a-y := $(libutil_OBJ:.o=.os)
  29. else
  30. libutil-a-y := $(libutil_OBJ)
  31. endif
  32. libutil-so-y := $(libutil_OBJ:.o=.os)
  33. objclean-y += CLEAN_libutil
  34. $(libutil_OUT)/libutil.oS: $(libutil_SRC)
  35. $(Q)$(RM) $@
  36. $(compile-m)
  37. CLEAN_libutil:
  38. $(do_rm) $(addprefix $(libutil_OUT)/*., o os oS a)