1 #
2 # ======== makefile ========
3 #
4 export XDC_INSTALL_DIR
6 export IPCTOOLS=$(CURDIR)/src/etc
8 DOXYGENVER=1.8.9.1
10 USERGUIDE_VER = sprugo6e.pdf
12 GA_SUFFIX =
13 ENG_SUFFIX = _eng
15 RELEASE_TYPE_SUFFIX = $($(RELEASE_TYPE)_SUFFIX)
17 VERSTRDOTSUFF := $(shell cat version.txt)$(RELEASE_TYPE_SUFFIX)
18 MAJVER := $(shell cat version.txt)$(RELEASE_TYPE_SUFFIX)
19 MAJMIN := ipc_$(shell cat version.txt | sed -e 's/\./_/g')$(RELEASE_TYPE_SUFFIX)
20 RELNOTE := ipc_$(shell cat version.txt | sed -e 's/\./_/g')$(RELEASE_TYPE_SUFFIX)
22 .all-files: j = 1
23 .all-files: opt = -k
24 .all-files: t = .interfaces
25 .all-files: .product .docs .eclipse .zip-file
27 .interfaces: .productview
28 @echo "running xdc [$@] ..."
29 @$(XDC) .interfaces -j $(j) -PR src/ti/sdo
31 .exports-ipc: $(IPCTOOLS)/packages .productview
32 $(XDC_INSTALL_DIR)/xdc XDCPATH="$(IPC_INSTALL_DIR)/packages;$(IPCTOOLS)/packages;$(BIOS_INSTALL_DIR)/packages" release -j $(j) -P src/ipc
34 .exports: .exports-ipc
36 PLUGINVERCMD = \
37 sed -e 's/version\s*=\s*.*;/version = \"$(VERSTRDOTSUFF)\";/' \
38 -e 's/\(ipc_[a-z0-9_]*_release_notes\)/$(RELNOTE)_release_notes/'
40 .eclipse: .eclipse-only
42 .eclipse-only: .docs
43 @echo creating product plugin
44 @src/scripts/cdoc2toc.ksh exports/$(MAJMIN)/docs/cdoc/toc.xml > exports/$(MAJMIN)/docs/cdoc/eclipse_cdoc_toc.xml
45 @$(PLUGINVERCMD) src/eclipse/Product.xdc > src/eclipse/Product.xdc.tmp
46 mv src/eclipse/Product.xdc.tmp src/eclipse/Product.xdc
48 $(XDC_INSTALL_DIR)/xdc -P src/eclipse
49 $(XDC_INSTALL_DIR)/xs --xdcpath="$(CURDIR)/exports/$(MAJMIN)/packages;$(BIOS_INSTALL_DIR)/packages;./src;$(XDC_INSTALL_DIR)/packages" \
50 xdc.tools.product.plugingen -p exports/$(MAJMIN) -m eclipse.Product
52 .productview: $(IPCTOOLS)/packages
53 @$(XDC_INSTALL_DIR)/xdc XDCPATH="$(IPCTOOLS)/packages;$(BIOS_INSTALL_DIR)/packages" release -j $(j) -P src/ti/sdo/ipc/productview
54 # @cp -R src/ti/sdo/ipc/productview $(IPC_INSTALL_DIR)/packages/ti/sdo/ipc
56 .product: .productview $(IPCTOOLS)/packages/ti/ipc/utils/genbundle/package .exports .gen-release-notes
58 @rm -rf exports/$(MAJMIN)
59 @mkdir -p exports/$(MAJMIN)
61 @echo "making bundle ..."
62 @$(XDC_INSTALL_DIR)/xs --xdcpath "$(IPCTOOLS)/packages;src;$(IPC_INSTALL_DIR)/packages" \
63 ti.ipc.utils.genbundle \
64 exports/$(MAJMIN) \
65 $(MAJMIN) \
66 product.xdt \
67 xdcRootDir=$(XDC_INSTALL_DIR) \
68 biosRootDir=$(BIOS_INSTALL_DIR) \
69 releaseType=$(RELEASE_TYPE) \
70 linuxToolchain=$(GCARMV5T_LINAROVER) \
71 qnxVer=$(QNX_VER_DESC) \
72 bspVerDRA74x=$(QNX_BSP_VER_DRA74X) \
73 bspVerDRA72x=$(QNX_BSP_VER_DRA72X)
75 @mkdir -p exports/$(MAJMIN)/packages
76 @mkdir -p exports/$(MAJMIN)/linux
77 @mkdir -p exports/$(MAJMIN)/qnx
78 @mkdir -p exports/$(MAJMIN)/hlos_common
79 mkdir -p exports/$(MAJMIN)/docs
80 mkdir -p exports/$(MAJMIN)/docs/icons
81 mkdir -p exports/$(MAJMIN)/docs/relnotes_archive
83 @echo "copying files to product ..."
84 @cp -R src/ipc/packages/ti exports/$(MAJMIN)/packages/ti
85 # Copying product build file
86 @cp $(IPC_INSTALL_DIR)/ipc-bios.bld exports/$(MAJMIN)/ipc-bios.bld
87 @cp $(IPC_INSTALL_DIR)/*.mak exports/$(MAJMIN)
88 @cp -R $(IPC_INSTALL_DIR)/hlos_common/* exports/$(MAJMIN)/hlos_common
89 # TODO: Blindly copying the linux built tree into the product tree and all the
90 # nessessary autotoolsfiles. Need Makefile and object file cleanup
91 @cp -R $(IPC_INSTALL_DIR)/linux/* exports/$(MAJMIN)/linux
92 @cp $(IPC_INSTALL_DIR)/aclocal.m4 exports/$(MAJMIN)
93 @cp $(IPC_INSTALL_DIR)/configure* exports/$(MAJMIN)
94 @cp $(IPC_INSTALL_DIR)/Makefile.* exports/$(MAJMIN)
95 @cp -R $(IPC_INSTALL_DIR)/qnx/* exports/$(MAJMIN)/qnx
96 @cp $(IPC_INSTALL_DIR)/Android.mk exports/$(MAJMIN)
98 @echo "copying docs to product ..."
99 @cp src/docs/IPC_Install_Guide_*.pdf exports/$(MAJMIN)/docs
100 @cp src/docs/$(USERGUIDE_VER) exports/$(MAJMIN)/docs/IPC_Users_Guide.pdf
101 @cp src/docs/tilogo.gif exports/$(MAJMIN)/docs/tilogo.gif
102 @cp src/docs/titagline.gif exports/$(MAJMIN)/docs/titagline.gif
103 @cp -R src/docs/icons exports/$(MAJMIN)/docs
104 @cp -R src/docs/relnotes_archive exports/$(MAJMIN)/docs
105 @cp -R src/docs/ipc_release_notes.html exports/$(MAJMIN)/$(MAJMIN)_release_notes.html
106 @cp -R src/docs/ipc_reports.html exports/$(MAJMIN)/$(MAJMIN)_reports.html
107 @cp src/docs/misra.txt exports/$(MAJMIN)/docs
108 @cp src/docs/coverity.txt exports/$(MAJMIN)/docs
110 .zip-file: .product .docs .eclipse
111 @echo "archive product to a .zip file ..."
112 @cd exports; zip -r $(MAJMIN) $(MAJMIN)
114 #
115 # ======== .doxygen ========
116 # build doxygen from headers in ti/ipc
117 #
118 .doxygen: .product $(IPCTOOLS)/doxygen_templates/$(DOXYGENVER)
119 @echo "Generating doxygen ............"
120 cd $(IPCTOOLS)/default; ln -s -f ../doxygen_templates/$(DOXYGENVER) doxygen_templates
121 $(IPCTOOLS)/tdox "exports/$(MAJMIN)/packages/ti/ipc exports/$(MAJMIN)/packages/ti/grcm exports/$(MAJMIN)/packages/ti/pm src/etc_doxygen" \
122 exports/$(MAJMIN)/docs/doxygen \
123 -s "exports/$(MAJMIN)/packages/" \
124 -e "package */ti/ipc/namesrv/* */ti/ipc/remoteproc/* */ti/ipc/rpmsg/* */ti/ipc/transports/* */ti/ipc/*/*/*" \
125 -n "IPC API" \
126 -d \
127 -v $(MAJVER) \
128 -o src/etc_doxygen/doxyoverride \
129 -f "*.h doxygen.txt"
130 @chmod -R u+w exports/$(MAJMIN)/docs/doxygen
131 @chmod -R a+r exports/$(MAJMIN)/docs/doxygen
132 @rm -rf exports/$(MAJMIN)/docs/doxygen/latex
134 #
135 # ======== .docs ========
136 # build cdoc information
137 #
138 .docs: .doxygen
139 @echo "Generating cdoc ..."
140 # filter out undesired packages with xdcpkg and egrep
141 @$(XDC_INSTALL_DIR)/xs --xdcpath "$(CURDIR)/src/ipc/packages;$(BIOS_INSTALL_DIR)/packages;$(XDC_INSTALL_DIR)/packages" \
142 xdc.tools.cdoc -od:exports/$(MAJMIN)/docs/cdoc -s -P -title "IPC API Documentation" ` \
143 $(XDC_INSTALL_DIR)/bin/xdcpkg src/ipc/packages | \
144 egrep -v -e "/tests*|/stress|/manual|/samples|/examples|/apps" | \
145 xargs`
147 #
148 # ======= Release Notes
149 .gen-release-notes:
150 #Update relnotes archive with html file to display directory
151 echo "Making index.html file for release notes archive directory..."
152 @cd src/docs/relnotes_archive/; ../../scripts/GenRelArchive.sh > index.html
154 $(IPCTOOLS)/packages/ti/ipc/utils/genbundle/package:
155 $(XDC_INSTALL_DIR)/xdc XDCPATH="$(XDC_INSTALL_DIR)/packages;$(IPCTOOLS)/packages" release -Pr $(IPCTOOLS)/packages
157 #
158 # ======== .clean ========
159 #
160 # clean rules
161 #
162 .clean: .clean-product
163 @echo cleaning exports ...
164 rm -rf exports
165 mkdir exports
167 .clean-product:
168 @rm -rf exports/$(MAJMIN)
171 .clean-tests:
172 @echo "Running xdc clean"
173 @$(XDC) clean -P \
174 `$(XDCROOT)/bin/xdcpkg src/ti/sdo | \
175 egrep -e "/tests|/manual" | xargs`