I want to draw following figure, I was not able to manage drawing its arrow format where like a tree-like format:
Reference: The Linux Programming Interface, Figure 41-1
My beginner approach:
\documentclass[tikz, border=1cm]{standalone}
\usetikzlibrary{shapes}
\begin{document}
\begin{tikzpicture}
[ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
arrow/.style={->, >=stealth, semithick},
] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\draw[help lines] (0,0) grid (8,4);
[
>=latex,shorten >=2pt,shorten <=2pt,shape aspect=1,
% arrow/.style={->, >=stealth, very thick},
% arrow/.style={<->, >=stealth, semithick},
block/.style={}
every node/.style = {font=\footnotesize}
]
\node[
rectangle,
double=black,
double distance =0.5pt,
shape border rotate=90,
draw,
fill=white,
shape aspect=0.2,
font={\scriptsize\baselineskip=8pt},
inner xsep=3pt,
align=left,
] (A) at (1,4) {\scriptsize \$ gcc -g -c \\ \,\, -fPIC - Wall \\ \,\, mod1.c mod2.c mod3.c};
\node[circle,
shape border rotate=90,
inner xsep=0pt,
draw] (B) at (-0.9,4.3) {\tiny 1};
\node[
rectangle,
double=black,
double distance =0.5pt,
shape border rotate=90,
draw,
fill=white,
font={\scriptsize\baselineskip=8pt},
inner xsep=3pt,
align=left,
] (B) at (2,2) {mod1.o code};
\node[
rectangle,
double=black,
double distance =0.5pt,
shape border rotate=90,
draw,
fill=white,
font={\scriptsize\baselineskip=8pt},
inner xsep=3pt,
align=left,
] (C) at (2,1) {mod2.o code};
\node[
rectangle,
double=black,
double distance =0.5pt,
shape border rotate=90,
draw,
fill=white,
font={\scriptsize\baselineskip=8pt},
inner xsep=3pt,
align=left,
] (D) at (2,0) {mod3.o code};
\draw [arrow] (A.south) -- (B.west);
\draw [arrow] (A.south) -- (C.west);
\draw [arrow] (A.south) -- (D.west);
\end{tikzpicture}
\end{document}
Here I was unable to manage to draw tree-format arrows as:
[*]
│
├──> [...]
├──> [...]
└──> [...]