You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

65 regels
1.6 KiB

  1. # Makefile to build libopencm3 documentation
  2. # 14 September 2012
  3. # (C) Ken Sarkies <ksarkies@internode.on.net>
  4. # setup TARGETS if not set for legacy and ease of debug.
  5. TARGETS ?= stm32/f0 stm32/f1 stm32/f2 stm32/f3 stm32/f4 stm32/f7 stm32/h7 \
  6. stm32/l0 stm32/l1 stm32/l4 \
  7. stm32/g0 stm32/g4 \
  8. gd32/f1x0 \
  9. efm32/g efm32/gg efm32/hg efm32/lg efm32/tg \
  10. efm32/wg efm32/ezr32wg \
  11. lm3s lm4f \
  12. msp432/e4 \
  13. lpc13xx lpc17xx lpc43xx \
  14. sam/3a sam/3n sam/3s sam/3u sam/3x \
  15. sam/d sam/4l \
  16. vf6xx \
  17. swm050 \
  18. pac55xx
  19. TARGETS_DIRS = $(subst /,,$(TARGETS))
  20. doc: html
  21. DoxygenLayout.xml: templates/DoxygenLayout_Root.xml
  22. ../scripts/gendoxylayout.py --template $< --out $@ $(TARGETS_DIRS)
  23. define gen_DOC_TARGET
  24. DOC_TARGETS += doc_$(1)
  25. CLEAN_TARGETS += clean_$(1)
  26. $(1)/:
  27. @mkdir -p $$@
  28. $(1)/doxy.sourcelist: $(1)/
  29. @../scripts/gendoxylist ../lib/$(TARGET_SRC_DIR) $(1)
  30. $(1)/Doxyfile: templates/Doxyfile_Device | $(1)/
  31. @cat $$< | sed s/#device#/$(1)/g > $$@
  32. $(1)/DoxygenLayout_$(1).xml: templates/DoxygenLayout_Device.xml | $(1)/
  33. @../scripts/gendoxylayout.py --template $$< --out $$@ --target $(1) $$(TARGETS_DIRS)
  34. doc_$(1): $(1)/doxy.sourcelist $(1)/Doxyfile $(1)/DoxygenLayout_$(1).xml
  35. @(cd $(1); doxygen)
  36. clean_$(1):
  37. @$(RM) -rf $(1)/doxy.sourcelist $(1)/Doxyfile $(1)/DoxygenLayout_$1.xml $(1)/doxygen_$(1).log $(1)/html $(1)/$(1).tag
  38. endef
  39. $(foreach TARGET_SRC_DIR, $(TARGETS), $(eval $(call gen_DOC_TARGET,$(subst /,,$(TARGET_SRC_DIR)))))
  40. html: $(DOC_TARGETS) DoxygenLayout.xml
  41. doxygen
  42. clean: $(CLEAN_TARGETS)
  43. @rm -rf html/ DoxygenLayout.xml doxygen.log
  44. .PHONY: doc html $(DOC_TARGETS) $(CLEAN_TARGETS)