Makerules 872 B

12345678910111213141516171819202122232425262728293031323334
  1. #
  2. # Licensed under LGPL v2.1, see the file COPYING.LIB in this tarball for details.
  3. #
  4. .SUFFIXES: .c .S .o .os .so .a .s .i
  5. ifndef top_srcdir
  6. top_srcdir=$(CURDIR)
  7. endif
  8. ifndef top_builddir
  9. top_builddir=$(CURDIR)
  10. endif
  11. top_srcdir:=$(shell echo "$(top_srcdir)/" | sed -e 's://:/:')
  12. top_builddir:=$(shell echo "$(top_builddir)/" | sed -e 's://:/:')
  13. ifeq ($(HAVE_SHARED),y)
  14. .LIBPATTERNS: "lib%.so"
  15. libs: libso-y liba-y
  16. else
  17. .LIBPATTERNS: "lib%.a"
  18. libs: liba-y
  19. endif
  20. libso-y: $(libso-y)
  21. liba-y: $(liba-y)
  22. libclean-y: $(libclean-y)
  23. compile.c=$(CC) -c $< -o $@ $(CPPFLAGS) $(CFLAGS) $(ARCH_CFLAGS) $(CFLAGS-$(suffix $@)) $(CFLAGS-$@) $(CFLAGS-$<)
  24. compile.S=$(compile.c) $(S_CPPFLAGS) $(ASFLAGS) $(ARCH_ASFLAGS) $(ASFLAGS-$(suffix $@)) $(ASFLAGS-$@) $(ASFLAGS-$<)
  25. compile.m=$(compile.c) -DL_$(patsubst %$(suffix $(notdir $@)),%,$(notdir $@))
  26. .PHONY: clean
  27. clean: libclean-y