root / latex / note_w06.tex @ d1ed66aa
History | View | Annotate | Download (3.05 KB)
1 | d1ed66aa | Quynh PX Nguyen | %!TEX root = note.tex |
---|---|---|---|
2 | |||
3 | %%%%%%%%%%%%%%%%%% |
||
4 | % WEEK 6 |
||
5 | %%%%%%%%%%%%%%%%%% |
||
6 | \section{Week 6} |
||
7 | \subsection{Install Boost into OpenWRT Image} |
||
8 | |||
9 | There were some error related to no *.so found in the \texttt{build\_dir}. I do not know why. |
||
10 | |||
11 | But after I choose specific Boost library to install, including the \texttt{graph}, then the error got resolved. Is it due to the fact that the \texttt{graph} also include the *.cpp file, and those implementation file then get compiled into the \texttt{shared objects *.so}. |
||
12 | |||
13 | \begin{lstlisting} |
||
14 | ./scripts/feeds install boost |
||
15 | make menuconfig |
||
16 | # choose boost in libraries |
||
17 | |||
18 | # Verify whether we can compile & install Boost successfully |
||
19 | make package/boost/compile |
||
20 | make package/boost/install |
||
21 | |||
22 | # compile to get the OpenWrt Image |
||
23 | \end{lstlisting} |
||
24 | |||
25 | \subsection{Makefile} |
||
26 | Below is some general note about Makefile. |
||
27 | |||
28 | http://stackoverflow.com/questions/9688200/difference-between-shared-objects-so-static-libraries-a-and-dlls-so |
||
29 | |||
30 | http://stackoverflow.com/questions/8229620/why-does-the-c-boost-package-only-contain-hpp-files |
||
31 | |||
32 | what is boost-build.jam |
||
33 | |||
34 | |||
35 | https://www.gnu.org/software/make/manual/html\_node/Call-Function.html |
||
36 | |||
37 | http://www.tutorialspoint.com/makefile/makefile\_quick\_guide.htm |
||
38 | |||
39 | |||
40 | The \$(INSTALL\_DIR) variable contains a command to prepare the install \# directory if it does not already exist. Likewise \$(INSTALL\_BIN) contains the \# command to copy the binary file from its current location (in our case the build \# directory) to the install directory. |
||
41 | |||
42 | |||
43 | http://gargoyle-router.com/old-openwrt-coding.html\#part2 |
||
44 | |||
45 | Detailed instruction with explanation on what Makefile, and OpenWrt Makefile do during compilation. With example that use STL library, and porting STL to the OpenWrt Image. This example is the step-by-step approach, it shows you also the non-functioning example, and then it shows you how to make it work. Any modification is explained in deep. |
||
46 | |||
47 | |||
48 | Variable and function references in recipes have identical syntax and semantics to references elsewhere in the makefile. They also have the same quoting rules: if you want a dollar sign to appear in your recipe, you must double it (‘\$\$’). For shells like the default shell, that use dollar signs to introduce variables, it’s important to keep clear in your mind whether the variable you want to reference is a make variable (use a single dollar sign) or a shell variable (use two dollar signs) |
||
49 | |||
50 | \begin{lstlisting} |
||
51 | LIST = one two three |
||
52 | all: |
||
53 | for i in $(LIST); do \ |
||
54 | echo $$i; \ |
||
55 | done |
||
56 | |||
57 | # results in the following command being passed to the shell: |
||
58 | |||
59 | for i in one two three; do \ |
||
60 | echo $i; \ |
||
61 | done |
||
62 | |||
63 | |||
64 | # which generates the expected result: |
||
65 | |||
66 | one |
||
67 | two |
||
68 | \end{lstlisting} |
||
69 | |||
70 | \subsection{Boost Graph Library (BGL)} |
||
71 | \href{http://stackoverflow.com/a/31734150}{Using Boost Graph Library}: this comment is really helpful. It's not giving an example, but it provides |
||
72 | |||
73 | \subsection{Summary - Week 6} |
||
74 | Read book about STL, Template. Making notes on paper |