title: Function and difference between $() and ${} in Makefile
body: <p>In makefile, <code>${CC} -o myfile myfile.c</code> and <code>$(CC) -o myfile myfile.c</code> both work fine even without definition of CC.
  My question is:</p>
  <ol>
  <li>How to use <code>$(..)</code> and <code>${..}</code>?</li>
  </ol>
  <ul>
  <li>Are they just convert the string in <code>{}</code> or <code>()</code> to lowercase if that string is not defined?</li>
  <li>Why does <code>$${dir}</code> need two <code>$$</code> in<br />
  <code>for dir in ${DIR}; do (cd $${dir}; ${MAKE}); done</code></li>
  </ul>
  <ol start="2">
  <li>Is there any differences between <code>${}</code> and <code>$()</code>?</li>
  </ol>