Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Makefile « doc - github.com/thirdpin/libopencm3.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 33448f115f4246a9068936eba14e148d4259e9fa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Makefile to build libopencm3 documentation

# 14 September 2012
# (C) Ken Sarkies <ksarkies@internode.on.net>

# setup TARGETS if not set for legacy and ease of debug.
TARGETS ?= stm32/f0 stm32/f1 stm32/f2 stm32/f3 stm32/f4 stm32/f7 \
		   stm32/l0 stm32/l1 stm32/l4 \
		   efm32/g efm32/gg efm32/hg efm32/lg efm32/tg \
		   lm3s lm4f \
		   msp432/e4 \
		   lpc13xx lpc17xx lpc43xx \
		   sam/3a sam/3n sam/3s sam/3u sam/3x \
		   vf6xx

TARGETS_DIRS = $(subst /,,$(TARGETS))

doc: html


DoxygenLayout.xml: templates/DoxygenLayout_Root.xml
	../scripts/gendoxylayout.py --template $< --out $@ $(TARGETS_DIRS)

define gen_DOC_TARGET
DOC_TARGETS += doc_$(1)

$(1)/:
	@mkdir -p $$@

$(1)/doxy.sourcelist: $(1)/
	@../scripts/gendoxylist ../lib/$(TARGET_SRC_DIR) $(1)

$(1)/Doxyfile: templates/Doxyfile_Device | $(1)/
	@cat $$< | sed -s s/#device#/$(1)/g > $$@

$(1)/DoxygenLayout_$(1).xml: templates/DoxygenLayout_Device.xml | $(1)/
	@../scripts/gendoxylayout.py --template $$< --out $$@ --target $(1) $$(TARGETS_DIRS)

doc_$(1): $(1)/doxy.sourcelist $(1)/Doxyfile $(1)/DoxygenLayout_$(1).xml
	@(cd $(1); doxygen)
endef

$(foreach TARGET_SRC_DIR, $(TARGETS), $(eval $(call gen_DOC_TARGET,$(subst /,,$(TARGET_SRC_DIR)))))

html: $(DOC_TARGETS) DoxygenLayout.xml
	doxygen

clean:
	@rm -rf html/ $(TARGETS_DIRS) DoxygenLayout.xml doxygen.log 
 
.PHONY: doc html $(DOC_TARGETS)