Makefile 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #
  2. # Makefile
  3. #
  4. # (C) Copyright 2013 Siemens Schweiz AG
  5. # (C) Heiko Schocher, DENX Software Engineering, hs@denx.de.
  6. #
  7. # Based on:
  8. # u-boot:/board/ti/am335x/Makefile
  9. # Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/
  10. #
  11. # SPDX-License-Identifier: GPL-2.0+
  12. #
  13. include $(TOPDIR)/config.mk
  14. ifneq ($(OBJTREE),$(SRCTREE))
  15. $(shell mkdir -p $(obj)../common)
  16. endif
  17. LIB = $(obj)lib$(BOARD).o
  18. ifdef CONFIG_SPL_BUILD
  19. COBJS := mux.o
  20. endif
  21. COBJS += board.o
  22. ifndef CONFIG_SPL_BUILD
  23. COBJS += ../common/factoryset.o
  24. endif
  25. SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
  26. OBJS := $(addprefix $(obj),$(COBJS))
  27. SOBJS := $(addprefix $(obj),$(SOBJS))
  28. $(LIB): $(obj).depend $(OBJS) $(SOBJS)
  29. $(call cmd_link_o_target, $(OBJS) $(SOBJS))
  30. clean:
  31. rm -f $(SOBJS) $(OBJS)
  32. distclean: clean
  33. rm -f $(LIB) core *.bak $(obj).depend
  34. #########################################################################
  35. # defines $(obj).depend target
  36. include $(SRCTREE)/rules.mk
  37. sinclude $(obj).depend
  38. #########################################################################