title: How to replace .c and .cpp file together?
body: <p>I am currently have an Android.mk file. For some requirement I need to write a standard GNU make file to build the same program.</p>
  
  <p>As you know in Android native build, we simply put all source files together like</p>
  
  <pre><code>LOCAL_SRC_FILES := a.c b.c d.cpp e.cpp
  </code></pre>
  
  <p>Now I want to do something in Makefile like:</p>
  
  <pre><code>OBJ = $(LOCAL_SRC_FILES: .c=.o)
  </code></pre>
  
  <p>This will only transform .c files with .o object targets. How can I combine the condition <strong>".c or .cpp"</strong> together?</p>