Makefile.in 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # Makefile for uClibc
  2. #
  3. # Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
  4. #
  5. # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  6. #
  7. DIRS=$(shell if test -f $(top_builddir)lib/libc.so ; then echo "ldso libdl" ; else echo "ldso" ; fi)
  8. libs: subdirs
  9. LN_HEADERS := $(patsubst %, include/%, elf.h)
  10. LN_ARCH_HEADERS := $(patsubst %, include/%, dl-startup.h dl-syscalls.h dl-sysdep.h dl-debug.h)
  11. HEADERS := $(LN_HEADERS) $(LN_ARCH_HEADERS) include/dl-progname.h
  12. headers-y+=ldso_headers
  13. ldso_headers: $(HEADERS)
  14. $(LN_HEADERS):
  15. $(LN) -sf $(top_builddir)../$@ $@
  16. $(LN_ARCH_HEADERS):
  17. $(LN) -sf ../ldso/$(TARGET_ARCH)/$(patsubst include/%,%,$@) $@
  18. include/dl-progname.h:
  19. echo '#include "$(TARGET_ARCH)/elfinterp.c"' > $@
  20. headers_clean-y+=ldso_headers_clean
  21. ldso_headers_clean:
  22. $(RM) $(HEADERS)
  23. clean: subdirs_clean ldso_headers_clean
  24. subdirs: $(patsubst %, _dir_%, $(DIRS))
  25. subdirs_clean: $(patsubst %, _dirclean_%, $(DIRS))
  26. $(patsubst %, _dir_%, $(DIRS)): ldso_headers
  27. $(MAKE) -C $(patsubst _dir_%, %, $@)
  28. $(patsubst %, _dirclean_%, $(DIRS)): dummy
  29. $(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
  30. .PHONY: dummy