summaryrefslogtreecommitdiff
path: root/modules.mk
blob: 7ea7cd7cb84ba8f39eb4ea9f0d1ebbdc3a9125bc (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
#Include all selected obj-y files from folder
include Makefile
include $(CONFIG)

build:
	for files in $(obj-y) ; do \
		($(MAKE) -C ./ -f  $(TOP_DIR)/modules.mk $$files ); \
		cp $$files $(DEPLOY)/ ; \
	done
ifeq ($(CONFIG_BUILD_HANDOUTS),y)
	for files in $(obj-handout-y) ; do \
                ($(MAKE) -C ./ -f  $(TOP_DIR)/modules.mk $$files ); \
		cp $$files $(HANDOUT)/ ; \
        done
endif

%.pdf:
	echo "Build" $@
	TEXINPUTS=`pwd`/../..:.:..:$(TEXINPUTS) $(BUILD) $(subst .pdf,.tex,$@)

clean:
	rm -f *.aux
	rm -f *.log
	rm -f *.nav
	rm -f *.toc
	rm -f *.pdf
	rm -f *.snm
	rm -f *.bbl
	rm -f *.blg
	rm -f *.out
	rm -f *.vrb

build_master_pres:
ifneq ($(filter-out pres_%,$(obj-y)), )
	`echo "\input{$(CURDIR)/../section.tex}" >> ${TOP_DIR}/$(MASTER_PRES)`
	for files in $(subst .pdf,.tex,$(filter-out pres_%,$(obj-y))) ; do \
		`echo "\input{$(CURDIR)/$$files}" >> ${TOP_DIR}/$(MASTER_PRES)` ;\
	done
endif

.PHONY: clean